diff --git a/api_specifications/public/pelion_dm_public_openapi.yaml b/api_specifications/public/pelion_dm_public_openapi.yaml index 60c67b48..5718a52e 100644 --- a/api_specifications/public/pelion_dm_public_openapi.yaml +++ b/api_specifications/public/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,13 +183,16 @@ 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 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. @@ -54,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 @@ -86,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 @@ -123,7 +271,7 @@ definitions: required: - end_market type: object - AccountInfo: + AccountCreationResp: description: Represents an account in requests and responses. properties: address_line1: @@ -153,7 +301,8 @@ definitions: type: string x-nullable: true admin_id: - description: The ID of the admin user created for this account. + 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 @@ -164,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 @@ -179,12 +333,20 @@ 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 maxItems: 10 type: array + 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 @@ -192,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 @@ -231,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 @@ -275,11 +437,20 @@ definitions: 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: List of limits as key-value pairs if requested. + 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 @@ -387,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' @@ -397,64 +573,12 @@ definitions: example: '2018-02-14T15:24:14Z' format: date-time type: string - required: - - end_market - - etag - - id - - object - - status - - tier - type: object - AccountInfoList: - 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/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 - 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 - AccountUpdateReq: - description: Represents an account creation request. + AccountInfo: + description: Represents an account in requests and responses. properties: address_line1: - description: Postal address line 1. Required for commercial accounts only. + description: Postal address line 1. example: 110 Fulbourn Rd maxLength: 100 type: string @@ -466,79 +590,125 @@ 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 maxItems: 10 type: array - x-nullable: true + 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. Required for commercial - accounts only. + description: The city part of the postal address. example: Cambridge maxLength: 100 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. 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. + 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. Required for commercial - accounts only. + 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 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. + example: 1NC25_0001 + 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 x-nullable: true email: - description: The company email address for this account. Required for commercial - accounts only. + description: The company email address for this account. example: info@arm.com pattern: ^(?=.{3,254}$).+\@.+ type: string x-nullable: true end_market: - description: The end market for this account. + description: Account end market. example: IT - maxLength: 100 + type: string + etag: + description: API resource entity version. + example: '1' + type: string + 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`. @@ -554,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. @@ -564,427 +749,239 @@ 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 - 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 - type: string - x-nullable: true - address_line2: - description: Postal address line 2. - example: ' ' - maxLength: 100 + reason: + description: A note with the reason for account status update. + example: Subscription paid. 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 + reference_note: + description: A reference note for updating the status of the account. + example: ARM-INT-0001 type: string x-nullable: true - company: - description: The name of the company. Required for commercial accounts only. - example: ARM Holdings Plc - maxLength: 100 + sales_contact: + description: Email address of the sales contact. + example: sales@arm.com + pattern: ^(?=.{3,254}$).+\@.+ type: string x-nullable: true - contact: - description: The name of the contact person for this account. Required for - commercial accounts only. - example: J. Doe + state: + description: The state part of the postal address. + example: ' ' 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 + 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: + $ref: '#/definitions/AccountInfo' + type: array 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. + template_id: + description: Account template ID. + example: 01619571e7160242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string x-nullable: true - display_name: - description: The display name for the account. - example: ARM - maxLength: 100 + 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 - email: - description: The company email address for this account. Required for commercial - accounts only. - example: info@arm.com - pattern: ^(?=.{3,254}$).+\@.+ + 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' + format: date-time type: string - x-nullable: true - end_market: - description: The end market for this account. - example: IT - 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 - 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 + required: + - end_market + - etag + - id + - object + - status + - tier + type: object + AccountInfoList: + properties: + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - x-nullable: true - notification_emails: - description: A list of notification email addresses. + data: + description: A list of entities. items: - pattern: ^(?=.{3,254}$).+\@.+ - type: string + $ref: '#/definitions/AccountInfo' 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. + 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 - 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}$).+\@.+ + object: + description: 'Entity name: always `list`.' + enum: + - list type: string - x-nullable: true - state: - description: The state part of the postal address. - example: ' ' - maxLength: 100 + 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 - x-nullable: true + 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 - ActiveServicePackage: - description: An active service package. + AccountLimitation: + description: This object represents an account limitation. 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 - type: string - firmware_update_count: - description: Size of firmware update quota of this service package. + billing_period: + description: Billing period of the account limitation. 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. + created_at: + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' 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 - required: - - id - - created - - modified - - start_time - - expires - - firmware_update_count - - grace_period - type: object - ActiveSession: - description: Represents an active user session. - properties: - account_id: - description: The UUID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - 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 - object: - description: 'Entity name: always ''user-session''' - enum: - - user-session - 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. - type: string - status: - description: The status of the API key. - 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 + description: + description: Description of the account limitation. + readOnly: true 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}' + description: Entity ID. + example: 01619571d01d0242ac12000600000000 type: string - key: - description: The API key. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + 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 - last_login_time: - description: The timestamp of the latest API key usage, in milliseconds. - example: 1518630727688 - format: int64 + 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: The display name for the API key. - example: API key gorgon - maxLength: 100 + description: Name of the account limitation. type: string object: - description: 'Entity name: always ''api-key''' + 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 - 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 + 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 - 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 @@ -996,7 +993,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 @@ -1007,236 +1005,76 @@ 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 - type: string - type: object - AsyncIDResponse: - properties: - ct: - description: The content type. - example: text/plain - type: string - error: - description: An optional error message describing the error. - 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== - type: string - status: - description: The asynchronous response status code for a device operation - related to a proxy request or manual subscription. - example: 200 - type: integer - type: object - BadRequestErrorResponse: - description: 400 Bad request response. - properties: - 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 - object: - description: Always set to `error`. - enum: - - error - type: string - request_id: - description: Request ID. - type: string - type: - description: Error type. Always set to `validation_error`. - enum: - - validation_error - 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. - 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 - 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. - type: string - object: - description: API Resource name. - type: string - url: - description: The URL to download raw billing data. - type: string - required: - - object - - url - - filename - type: object - BlackListedDeviceData: - properties: - account_id: - description: account id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' - 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 - type: string - endpoint_name: - description: endpoint name - example: Endpoint_1234 - type: string - id: - description: id of the recorded failed bootstrap attempt - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' - type: string - object: - enum: - - denied_device - type: string - 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 - BrandingColor: - properties: - color: - description: The color given as name (purple) or as a hex code. - example: '#f3f93e' - type: string - x-nullable: true - object: - description: 'Entity name: always ''branding_color''' - enum: - - branding_color - readOnly: true - type: string - reference: - description: Color name. - enum: &id018 - - 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 - updated_at: - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - type: string - type: object - BrandingColorList: - properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + after: + description: The entity ID to fetch after the given one. + example: 01619571f3c00242ac12000600000000 + readOnly: true type: string data: description: A list of entities. items: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/AccountResponse' + readOnly: true type: array has_more: - description: Flag indicating whether there are more results. + description: Flag indicating whether there is more results. example: false + readOnly: true 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 + readOnly: true type: integer object: - description: 'Entity name: always `list`.' + description: 'Entity name: always ''list''' enum: - list + readOnly: true type: string order: description: 'The order of the records to return based on creation time. Available @@ -1244,2456 +1082,2606 @@ definitions: enum: - ASC - DESC + readOnly: true type: string total_count: - description: The total number of records, if requested. - example: 20 + description: The total number or records, if requested. It might be returned + also for small lists. + example: 5 format: int32 + readOnly: true type: integer - required: - - data - - has_more - - limit - - object - - total_count type: object - BrandingImage: + AccountUpdateReq: + description: Represents an account creation request. properties: - object: - description: 'Entity name: always ''branding_image''' - enum: - - branding_image - readOnly: true - type: string - reference: - description: Name of the image. - enum: &id019 - - 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 - static_uri: - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true + address_line1: + description: Postal address line 1. Required for commercial accounts only. + example: 110 Fulbourn Rd + 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 + address_line2: + description: Postal address line 2. + example: ' ' + maxLength: 100 type: string - type: object - BrandingImageList: - 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. + x-nullable: true + aliases: + description: An array of aliases for the tenant account ID. The aliases must + be globally unique. items: - $ref: '#/definitions/BrandingImage' + 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, 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 - BulkResponse: - properties: - account_id: - 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 + x-nullable: true + city: + description: The city part of the postal address. Required for commercial + accounts only. + example: Cambridge + maxLength: 100 type: string - created_at: - description: The time of receiving the bulk creation task. - format: date-time + 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 - 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 + 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 - etag: - description: etag - example: '1' - pattern: '[A-Za-z0-9]{0,256}' + x-nullable: true + country: + description: The country part of the postal address. Required for commercial + accounts only. + example: United Kingdom + maxLength: 100 type: string - 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 + 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 - id: - description: Bulk ID - pattern: ^[A-Za-z0-9]{32} + 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 - object: - enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads + x-nullable: true + end_market: + description: The end market for this account. + example: IT + maxLength: 100 type: string - processed_count: - description: The number of enrollment identities processed until now. - example: 0 + 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 - 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 + x-nullable: true + idle_timeout: + description: Reference token expiration time in minutes. + maximum: 120 + minimum: 1 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 - CampaignDeviceMetadata: - properties: - campaign: - description: The device's campaign ID - example: 015bf72fccda00000000000100100280 - type: string - created_at: - description: The time the campaign 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 + x-nullable: true + mfa_status: + description: The enforcement status of multi-factor authentication, either + `enforced` or `optional`. enum: - - pending - - updated_connector_channel - - failed_connector_channel_update - - deployed - - manifestremoved - - deregistered - type: string - description: - description: Description - example: '' - maxLength: 2000 - type: string - device_id: - description: The device ID - example: 015c2fec9bba0000000000010010036f - type: string - etag: - description: API resource entity version - example: '2017-05-22T12:37:58.753425Z' - type: string - id: - description: The metadata record ID - example: 015c3029f6f7000000000001001000c3 - type: string - mechanism: - description: How the firmware is delivered (connector or direct) - example: connector - type: string - mechanism_url: - description: The Device Management Connect URL - example: '' + - enforced + - optional type: string - name: - description: The record name - example: default_object_name - maxLength: 128 + 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 - object: - description: 'The entity name: always ''update-campaign-device-metadata''' - example: update-campaign-device-metadata + x-nullable: true + postal_code: + description: The postal code part of the postal address. + example: CB1 9NJ + maxLength: 100 type: string - updated_at: - description: 'The record was modified in the database format: date-time' - example: '2017-05-22T12:37:58.776736Z' - format: date-time + x-nullable: true + state: + description: The state part of the postal address. + example: ' ' + maxLength: 100 type: string + x-nullable: true type: object - CampaignDeviceMetadataPage: + AccountUpdateRootReq: + description: Represents an account update request. properties: - after: - description: The entity ID to fetch after the given one - example: 'null' + address_line1: + description: Postal address line 1. Required for commercial accounts only. + 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/CampaignDeviceMetadata' + pattern: '[\w\-._]{8,100}' + type: string + maxItems: 10 type: array - has_more: - description: A 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 - type: integer - object: - description: 'The entity name: always ''list''' - example: list + 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 - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' + 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 + 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. An administrator can set this + property on tenant accounts only. + 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. An administrator can set this + property on tenant accounts only. + 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. 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 + 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: - - ASC - - DESC - example: ASC + - enforced + - optional type: string - total_count: - description: The total number or records, if requested. It may be returned - also for small lists. - example: '1' + 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 + 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}$).+\@.+ + type: string + x-nullable: true + state: + description: The state part of the postal address. + example: ' ' + maxLength: 100 + type: string + x-nullable: true type: object - CampaignMetrics: + 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: - created_at: - description: The time the metrics were created. - example: '2017-05-22T12:37:55.576563Z' + created: + description: Service package creation time in RFC3339 date-time with millisecond + accuracy and UTC time zone. format: date-time 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''' - example: update-campaign-metrics + expires: + description: Service package expiration time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time 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' + firmware_update_count: + description: Size of firmware update quota of this service package. 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. + 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 + required: + - id + - created + - modified + - start_time + - expires + - firmware_update_count + - grace_period type: object - CertificateEnrollment: + ActiveSession: + description: Represents an active user session. properties: - certificate_name: - description: The certificate name. - example: customer.dlms - maxLength: 50 + account_id: + description: The UUID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string created_at: description: Creation UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + example: '2018-02-13T09:35:20Z' format: date-time 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 + ip_address: + description: IP address of the client. + example: 127.0.0.1 type: string - enroll_result_detail: - description: Additional information in case of failure. - example: The device is currently processing too many certificate renewals. + login_time: + description: The login time of the user. + example: '2018-02-14T17:52:07Z' + format: date-time type: string - enroll_status: - description: The status of certificate enrollment request. + object: + description: 'Entity name: always ''user-session''' enum: - - new - - completed + - user-session + 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 + - package_tokens_edit + 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. + + 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 + owner: + description: The owner of this API key. Only an administrator can set the + owner of an API key. + type: string + status: + description: The status of the API key. Only an administrator can set the + status of an API key. + 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: Entity instance signature. + 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 certificate enrollment ID. - example: 01612df56f3b0a580a010fc700000000 + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + 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: + description: The display name for the API key. + example: API key gorgon + maxLength: 100 type: string object: + description: 'Entity name: always ''api-key''' enum: - - certificate-enrollment + - 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. + 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: '2018-02-14T15:24:14Z' format: date-time type: string required: - - created_at - etag - id - - device_id - - certificate_name + - key + - name + - object type: object - CertificateEnrollmentListResponse: + ApiKeyInfoRespList: 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/ApiKeyInfoResp' 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. + ApiKeyUpdateReq: + description: Represents an API key in requests towards Device Management. properties: - algorithm: - description: The algorithm and its key size used for generating the certificate. - Defaults to RSA2048. + 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 + 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: - - RSA2048 - - RSA3072 - - EC224 - - EC256 - - EC384 - - EC521 - - ECDSA224 - - ECDSA256 - - ECDSA384 - - ECDSA521 + - ACTIVE + - INACTIVE type: string - validity: - description: Validity for the certificate in days. - format: int32 - type: integer type: object - CertificateIssuerConfigListResponse: + Application: + description: Represents an application in Device Management. properties: - after: &id001 - description: An offset token for current page. - example: '01631667477600000000000100100374' + account_id: + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true type: string - data: - description: List of certificate issuers. + created_at: + description: Creation UTC time RFC3339. + example: '2020-02-18T09:16:40Z' + format: date-time + readOnly: true + type: string + description: + description: The description of the application. + example: Application to control the warp drive + maxLength: 500 + type: string + etag: + description: API resource entity version. + example: '1' + readOnly: true + type: string + groups: + description: A list of group IDs this application belongs to. items: - $ref: '#/definitions/CertificateIssuerConfigResponse' + example: 01705c6383f6c85b76f92f4e00000000 + type: string 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 - type: string - order: &id005 - description: The creation time based order of the entries. - example: DESC - type: string - total_count: &id006 - 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 - x-nullable: true - type: object - CertificateIssuerConfigResponse: - properties: - certificate_issuer_id: - description: 'The ID of the certificate issuer. - - Null if Device Management internal HSM is used. - - ' - example: 01648415a2a30242ac18000500000000 + id: + description: The ID of the application. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true type: string - x-nullable: true - created_at: - description: Created UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + last_used_at: + description: The time of the latest application usage. + example: '2020-02-14T15:24:14Z' format: date-time + readOnly: true type: string - etag: - description: Entity instance signature. - example: '1' - type: string - id: - description: 'The ID of the certificate issuer configuration. - - ' - example: 01648415a2a30242ac18000500000000 + name: + description: The display name for the application. + example: Application warp + maxLength: 100 type: string - is_custom: - example: true - type: boolean object: + description: 'Entity name: always ''application''' enum: - - certificate-issuer-configuration + - application + readOnly: true type: string - reference: - description: The certificate name to which the certificate issuer configuration - applies. - example: customer.dlms + 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: Updated UTC time RFC3339. - example: '2017-02-01T00:00:00Z' + description: Last update UTC time RFC3339. + example: '2020-02-19T11:54:32Z' format: date-time + readOnly: true type: string + required: + - name type: object - CertificateIssuerInfo: + ApplicationList: 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 + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' 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" + data: + description: A list of entities. + items: + $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, or equal to `total_count`. + example: 50 + format: int32 + type: integer + object: + description: 'Entity name: always `list`.' enum: - - GLOBAL_SIGN - - CFSSL_AUTH - example: GLOBAL_SIGN - type: string - name: - description: Certificate issuer name, unique per account. - example: GS Issuer - maxLength: 50 + - list type: string - object: + order: + description: 'The order of the records to return based on creation time. Available + values: ASC, DESC; by default ASC.' enum: - - certificate-issuer + - ASC + - DESC type: string + total_count: + description: The total number of records, if requested. + example: 20 + format: int32 + type: integer required: - - issuer_type - type: object - CertificateIssuerInfoListResponse: - 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 + - data + - has_more + - limit + - object + - total_count 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 + ArchiveInfoResponse: + description: This object represents the response for the archive info request. properties: - description: - description: General description of the certificate issuer. - maxLength: 100 + download_size_bytes: + description: The size of the archive file in bytes. + example: 2402668 + type: integer + 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 - 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 + license_type: + description: The license agreement type required for downloading Factory Configurator + Utility. + example: fcu type: string - name: - description: Certificate issuer name, unique per account. - maxLength: 50 + license_version: + description: The license agreement version required for downloading Factory + Configurator Utility. + example: '1.0' type: string - 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 + 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 - 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 + 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 - CertificateIssuerVerifyResponse: + AsyncID: properties: - message: - description: 'Provides details in case of failure. - - ' - example: message describing the verification failure + async-response-id: + description: Asynchronous response unique ID. + example: 9e3c96b8-c4d7-496a-ab90-cc732b9b560e type: string - successful: - description: 'Indicates whether the certificate issuer was verified successfully. - - ' - example: false - type: boolean type: object - CfsslAttributes: - description: 'Describes the attributes required to connect to the CFSSL server. - - ' + AsyncIDResponse: properties: - cfssl_label: - description: 'The label that is used by CFSSL when creating the certificate. - - ' + ct: + description: The content type. + example: text/plain type: string - cfssl_profile: - description: 'The profile that is configured on the CFSSL server and is used - by CFSSL when creating the certificate. + error: + description: 'An optional error message describing the error. Please refer + to status listing above. ' + example: TIMEOUT type: string - host_url: - description: 'The URL to connect to the CFSSL server. - - ' + id: + description: The unique ID of the asynchronous response. + example: 9e3c96b8-c4d7-496a-ab90-cc732b9b560e type: string - required: - - host_url + 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== + 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://www.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 - CfsslAuthCredentials: - description: 'Describes the credentials required when using CFSSL authenticated - signing. - - ' + 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: - 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}$ + 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 + object: + description: Always set to `error`. + enum: + - error + type: string + request_id: + description: Request ID. + type: string + type: + description: Error type. Always set to `validation_error`. + enum: + - validation_error type: string required: - - hmac_hex_key + - object + - message + - request_id + - type + - code + - fields type: object - ChannelMetadata: + BadRequestErrorResponseField: + description: Single field that failed validation. properties: - delivery_mechanism: - description: Channel delivery mechanism. - enum: - - CALLBACK - - LONG_POLLING - - WEB_SOCKET - example: CALLBACK + 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 - CreateCertificateIssuerConfig: + BillingReportRawDataResponse: + description: The response includes the URL to download raw billing data. properties: - certificate_issuer_id: - description: 'The ID of the certificate issuer. - - ' - example: 01648415a2a30242ac18000500000000 - maxLength: 32 + filename: + description: The filename of the raw billing data file to download. Contains + file extensions. 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} + object: + description: API Resource name. + type: string + url: + description: The URL to download raw billing data. type: string required: - - reference - - certificate_issuer_id + - object + - url + - filename type: object - CredentialsResponseData: + 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: - certificate: - description: PEM-format X.509 server certificate used to validate the server - certificate received during the TLS/DTLS handshake. + color: + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' type: string - url: - description: Server URI that the client connects to. + x-nullable: true + 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 + 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: + BrandingColorList: 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/BrandingColor' 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: + BrandingColorUpdate: properties: - description: - description: Description for the developer certificate. Maximum 500 characters. - Please see [TrustedCertificateReq](../current/api-references/account-management-api.html#trustedcertificatereq). - maxLength: 500 + color: + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' 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 + reference: + description: Color name. + enum: *id001 type: string required: - - name + - reference type: object - DeveloperCertificateResponseData: + BrandingImage: properties: - account_id: - description: Account to which the developer certificate belongs. - type: string - created_at: - description: Creation UTC time RFC3339. - format: date-time - type: string - description: - description: Description for the developer certificate. - 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. - type: string - id: - description: ID that uniquely identifies the developer certificate. - type: string - name: - description: Name of the developer certificate. - type: string object: - description: 'Entity name: always `trusted-cert`.' - type: string - security_file_content: - description: Content of the `security.c` file flashed to the device to provide - security credentials. - type: string - type: object - 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: - description: The expiration date of the certificate used to connect to bootstrap - server. - format: date + description: 'Entity name: always ''branding_image''' + enum: + - branding_image + readOnly: true 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 + reference: + description: Name of the image. + enum: &id026 + - 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 - connector_expiration_date: - description: The expiration date of the certificate used to connect to LwM2M - server. - format: date + static_uri: + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true 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' + updated_at: + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true 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: description - maxLength: 2000 - type: string - device_class: - description: An ID representing the model and hardware revision of the device. - example: '' - maxLength: 32 + type: object + BrandingImageList: + properties: + after: + description: The entity ID to retrieve after the given one. + example: 01619571f3c00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - device_execution_mode: - 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)\n - 1 - development\ - \ devices\n - 5 - production devices" - enum: - - 0 - - 1 - - 5 - example: 0 + 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 + format: int32 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 + object: + description: 'Entity name: always `list`.' + enum: + - list type: string - endpoint_name: - description: The endpoint name given to the device. - example: 00000000-0000-0000-0000-000000000000 - readOnly: true + 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 - endpoint_type: - description: The endpoint type of the device. For example, the device is a - gateway. - example: '' - maxLength: 64 + 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 + BulkResponse: + properties: + account_id: + description: ID + example: 00005a4e027f0a580a01081c00000000 type: string - enrolment_list_timestamp: - description: The claim date/time. - example: '2017-05-22T12:37:55.576563Z' + completed_at: + description: 'The time the bulk creation task was completed. + + Null when creating bulk upload or delete.' format: date-time type: string - etag: - description: The entity instance signature. - example: '2017-05-22T12:37:55.576563Z' + created_at: + description: The time of receiving the bulk creation task. 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. - example: '' - type: string - id: - description: The ID of the device. The device ID is used across all Device - Management APIs. - example: '00000000000000000000000000000000' - type: string - issuer_fingerprint: &id011 - description: SHA256 fingerprint of the certificate used to validate the signature - of the device certificate. - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' + 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 - manifest: - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' - 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 + etag: + description: etag + example: '1' + pattern: '[A-Za-z0-9]{0,256}' type: string - mechanism_url: - description: The address of the connector to use. - example: '' + 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: The name of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + x-nullable: true + id: + description: Bulk ID + pattern: ^[A-Za-z0-9]{32} type: string object: - description: The API resource entity. - example: device - type: string - 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. enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - enrollment-identity-bulk-uploads + example: enrollment-identity-bulk-uploads type: string - updated_at: - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' + 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 - vendor_id: - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 - type: string - DeviceDataPostRequest: + type: object + CampaignDeviceMetadata: 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 - type: string - x-nullable: true - ca_id: - description: The certificate issuer's ID. - example: '00000000000000000000000000000000' - maxLength: 500 + campaign: + description: The device's campaign ID. + example: 015bf72fccda00000000000100100280 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 + created_at: &id014 + description: The time the entity was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - 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: '' + 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: - description: The description of the device. - example: '' + description: Description. + example: a description 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: - description: "The execution mode from the certificate of the device.\nPermitted\ - \ values:\n - 0 - unspecified execution mode (default)\n - 1 - development\ - \ devices\n - 5 - production devices" - 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. - 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 + device_id: + description: The device ID. + example: 015c2fec9bba0000000000010010036f type: string - host_gateway: - description: The ID of the host gateway, if appropriate. - example: '' + etag: &id015 + description: API resource entity version. + example: '2017-05-22T12:37:58.753425Z' type: string - issuer_fingerprint: *id011 - manifest: - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' + id: + description: The metadata record ID. + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' type: string mechanism: - description: The ID of the channel used to communicate with the device. - enum: - - connector - - direct + description: How the firmware is delivered (connector or direct). + example: connector type: string mechanism_url: - description: The address of the connector to use. - example: '' + description: The Device Management Connect URL. type: string name: - description: The name of the device. - example: 00000000-0000-0000-0000-000000000000 + default: default_object_name + description: The record name. maxLength: 128 type: string - serial_number: - description: The serial number of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 64 - type: string - state: - description: The current state of the device. - enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + object: + description: 'The entity name: always ''update-campaign-device-metadata''.' + example: update-campaign-device-metadata type: string - vendor_id: - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 255 + updated_at: &id016 + description: The time the entity was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - DeviceDataPutRequest: + type: object + CampaignDeviceMetadataPage: 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 - 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 - description: - description: The description of the device. - example: '' - maxLength: 2000 - 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 - 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 + after: + description: The entity ID to fetch after the given one. + example: 'null' type: string - host_gateway: - description: The ID of the host gateway, if appropriate. - example: '' + data: + description: A list of entities. + items: + $ref: '#/definitions/CampaignDeviceMetadata' + type: array + has_more: + description: A 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 + type: integer + object: + description: 'The entity name: always ''list''.' + example: list type: string - name: - description: The name of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + order: + description: 'The order of the records to return. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC + example: ASC type: string - DeviceEqNeqFilter: + total_count: + description: The total number or records, if requested. It may be returned + also for small lists. + example: '1' + type: integer + type: object + CampaignMetrics: properties: - account_id: - type: string - auto_update: - type: boolean - bootstrap_expiration_date: + created_at: + description: The time the metrics were created. 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 - ca_id: - 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 - custom_attributes: - additionalProperties: - type: string - type: object - deployed_state: - type: string - deployment: - type: string - description: - type: string - device_class: - type: string - device_execution_mode: + failed_count: + description: Running total of devices that could not be updated. + example: '0' + format: int32 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' - format: date-time - type: string - firmware_checksum: - type: string - host_gateway: - type: string - id: - type: string - manifest: - type: string - manifest_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - mechanism: - type: string - 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 - vendor_id: + object: + description: 'Entity name: always ''update-campaign-metrics''.' + example: update-campaign-metrics 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 - DeviceEventData: + CertificateEnrollment: 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 + certificate_name: + description: The certificate name. + example: customer.dlms + maxLength: 50 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. + example: '2017-01-01T00:00:00Z' format: date-time type: string - description: - example: Device record created - type: string device_id: - example: '00000000000000000000000000000000' + description: The device ID. + example: 01625daa23230a580a0100bd00000000 type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + enroll_result: + description: The result of certificate enrollment request. + enum: + - success + - failure + example: success type: string - event_type: - description: Event code - example: UPD2_100 - maxLength: 100 + enroll_result_detail: + description: Additional information in case of failure. + example: The device is currently processing too many certificate renewals. type: string - event_type_category: - description: Category code which groups the event type by a summary category. - example: FAIL_MANIFEST_REJECTED + enroll_status: + description: The status of certificate enrollment request. + enum: + - new + - completed type: string - event_type_description: - description: Generic description of the event - example: FAIL + etag: + description: Entity instance signature. + example: '1' type: string id: - example: '00000000000000000000000000000000' + description: The certificate enrollment ID. + example: 01612df56f3b0a580a010fc700000000 type: string 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: - 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 + enum: + - certificate-enrollment type: string - DeviceEventInNinFilter: - properties: - date_time: - 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 - description: - type: string - device_id: - type: string - event_type: - type: string - id: - type: string - state_change: - type: boolean - DeviceEventPage: + required: + - created_at + - etag + - id + - device_id + - certificate_name + type: object + CertificateEnrollmentListResponse: properties: after: - example: null + description: The entity ID to fetch after the given one. + example: 01625daa23230a580a0100bd00000000 type: string data: - example: '[]' + description: List of certificate enrollments. items: - $ref: '#/definitions/DeviceEventData' + $ref: '#/definitions/CertificateEnrollment' type: array has_more: - example: false + description: Flag indicating whether there are more results. type: boolean limit: - example: 1000 + description: The number of results to return. + format: int32 type: integer object: - example: list + description: Describes the type of objects in the list. + enum: + - list type: string order: - example: DESC + description: 'Record order based on creation time. Acceptable values: ASC, + DESC. Default: ASC.' + enum: + - ASC + - DESC type: string total_count: - example: 1 + description: The total number of records. + format: int32 type: integer - DeviceGroup: + type: object + CertificateGenerationReq: + description: Generate a new service provider certificate. properties: - created_at: - description: The time the campaign was created. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - custom_attributes: &id021 - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - 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 - description: &id022 - description: The description of the group. - example: Devices on the factory floor. - maxLength: 2000 + 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 - devices_count: - description: The number of devices in this group. - example: 10 + validity: + description: Validity for the certificate in days. + format: int32 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: &id023 - 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 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: + CertificateIssuerConfigListResponse: properties: - after: + after: &id002 description: An offset token for current page. example: '01631667477600000000000100100374' type: string data: + description: List of certificate issuers. items: - $ref: '#/definitions/DeviceGroup' + $ref: '#/definitions/CertificateIssuerConfigResponse' type: array - has_more: - description: Are there more results available. + has_more: &id003 + description: More results are 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. + 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: - description: The type of this API object is a "list". + object: &id005 + description: The type of this API object is `list`. example: list type: string - order: - description: The creation time based order of the entries. + order: &id006 + description: Record order based on creation time. example: DESC type: string - total_count: + total_count: &id007 example: 1 format: integer type: integer type: object - DeviceGteLteFilter: + CertificateIssuerConfigRequest: 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 + certificate_issuer_id: + description: 'Certificate issuer ID. + + For LwM2M, may be null if Device Management internal certificate issuer + is used.' + example: 01648415a2a30242ac18000500000000 type: string - connector_expiration_date: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 + x-nullable: true created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - enrolment_list_timestamp: - example: '2017-05-22T12:37:55.576563Z' + description: Created UTC time RFC3339. + example: '2017-01-01T00:00:00Z' 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 + description: Entity instance signature. + example: '1' type: string - type: object - DeviceInNinFilter: - properties: - account_id: + id: + description: Certificate issuer ID. configuration. + example: 01648415a2a30242ac18000500000000 type: string - auto_update: + is_custom: + example: true type: boolean - 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 + object: + enum: + - certificate-issuer-configuration type: string - ca_id: + reference: + description: The certificate name to which the certificate issuer configuration + applies. + example: customer.dlms type: string - connector_expiration_date: - example: '2017-05-22T12:37:55.576563Z' + updated_at: + description: Updated UTC time RFC3339. + example: '2017-02-01T00:00:00Z' format: date-time type: string + type: object + CertificateIssuerInfo: + properties: created_at: - example: '2017-05-22T12:37:55.576563Z' + description: Creation UTC time RFC3339. + example: '2017-01-01T00:00:00Z' format: date-time type: string - custom_attributes: - additionalProperties: - type: string - type: object - deployed_state: - type: string - deployment: - type: string description: + description: General description for the certificate issuer. + example: GlobalSign sample issuer + maxLength: 100 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 + x-nullable: true etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - firmware_checksum: - type: string - host_gateway: + description: Entity instance signature. + example: '1' type: string id: + description: Certificate issuer ID. + example: 01234567890ABCDEF01234567890ABCDEF type: string - manifest: - type: string - manifest_timestamp: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - mechanism: - type: string - mechanism_url: + issuer_attributes: + additionalProperties: &id008 + type: string + 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_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 + example: GLOBAL_SIGN type: string name: + description: Certificate issuer name, unique per account. + example: GS Issuer + maxLength: 50 type: string - serial_number: - type: string - state: - type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - vendor_id: + object: + enum: + - certificate-issuer type: string + required: + - issuer_type type: object - DevicePage: + CertificateIssuerInfoListResponse: properties: - after: - description: An offset token for current page. - example: '01631667477600000000000100100374' - type: string + after: *id002 data: + description: List of certificate issuers. items: - $ref: '#/definitions/DeviceData' + $ref: '#/definitions/CertificateIssuerInfo' 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 - type: string - order: - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - example: DESC - type: string - total_count: - example: 1 - format: integer - type: integer - DeviceQuery: + 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: - 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 + description: + description: General description of the certificate issuer. + maxLength: 100 type: string - etag: - description: The entity instance signature. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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: '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 + 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 - id: - description: The ID of the query. - example: '00000000000000000000000000000000' + name: + description: Certificate issuer name, unique per account. + maxLength: 50 + type: string + 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 query. - example: '00000000000000000000000000000000' + description: Certificate issuer name. + maxLength: 50 type: string - object: - description: The API resource entity. - example: device-query + type: object + CertificateIssuerVerifyResponse: + properties: + message: + description: Provides details in case of failure. + example: Message describing the verification failure type: string - query: - description: The device query. - example: id=00000000000000000000000000000000 + successful: + description: Indicates whether the certificate issuer was verified successfully. + 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 - updated_at: - description: The time the object was updated. - 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 + host_url: + description: The URL to connect to the CFSSL server. + example: http://my.cfssl.service:5555 type: string required: - - created_at - - etag - - id - - name - - object - - query - - updated_at - DeviceQueryEqNeqFilter: + - host_url + type: object + CfsslAuthCredentials: + description: Describes the credentials required when using CFSSL authenticated + signing. properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - etag: - example: '2017-05-22T12:37:55.576563Z' + required: + - hmac_hex_key + type: object + ChannelMetadata: + properties: + delivery_mechanism: + description: Channel delivery mechanism. + enum: + - CALLBACK + - LONG_POLLING + - WEB_SOCKET + example: CALLBACK + type: string + type: object + CreateCertificateIssuerConfig: + properties: + certificate_issuer_id: + description: Certificate issuer ID. + example: 01648415a2a30242ac18000500000000 + maxLength: 32 + 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} + 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 + required: + - description + type: object + CreateTrustAnchorResponse: + properties: + created_at: &id017 + description: Creation UTC time. + example: '2017-01-01T00:00:00Z' format: date-time type: string - id: + description: + description: Notes about the trust anchor. + format: free text + maxLength: 256 + minLength: 1 type: string - name: + etag: &id018 + description: Entity instance signature, 1 or Unix timestamp of last customer + update. + example: '1' type: string - query: + 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 - updated_at: - example: '2017-05-22T12:37:55.576563Z' + id: &id019 + description: The ID of the entity. + example: 01612df56f3b0a580a010fc700000000 + pattern: '[A-Fa-f0-9]{32}' + type: string + object: &id020 + description: The API resource entity + example: trust-anchor + type: string + public_key: + description: The generated 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 + description: Update UTC time. + example: '2017-01-01T00:00:00Z' format: date-time type: string - DeviceQueryGteLteFilter: + type: object + CredentialsResponseData: properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + certificate: + description: PEM-format X.509 server certificate used to validate the server + certificate received during the TLS/DTLS handshake. type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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://www.pelion.com/docs/device-management-api/account-management/). + maxLength: 500 type: string - DeviceQueryInNinFilter: + x-nullable: true + name: + description: Name of the developer certificate. Must be unique. Maximum 100 + characters. Please see [TrustedCertificateReq](https://www.pelion.com/docs/device-management-api/account-management/). + maxLength: 100 + type: string + required: + - name + type: object + DeveloperCertificateResponseData: properties: + account_id: + description: Account to which the developer certificate belongs. + type: string created_at: - example: '2017-05-22T12:37:55.576563Z' + description: Creation UTC time RFC3339. format: date-time type: string + description: + description: Description for the developer certificate. + 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: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: API resource entity version. type: string id: + description: ID that uniquely identifies the developer certificate. type: string name: + description: Name of the developer certificate. type: string - query: + object: + description: 'Entity name: always `trusted-cert`.' type: string - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + security_file_content: + description: Content of the `security.c` file flashed to the device to provide + security credentials. type: string - DeviceQueryPage: + type: object + DeviceBlockCategory: properties: - after: - example: null + description: + example: Suspended for maintenance. + type: string + object: + description: 'Entity name: always ''device-block-category''.' + example: device-block-category + type: string + reference: + example: maintenance + type: string + updated_at: + format: date-time + type: string + type: object + DeviceBlockCategoryPage: + properties: + after: + description: An offset token for current page. type: string data: - example: '[]' items: - $ref: '#/definitions/DeviceQuery' + $ref: '#/definitions/DeviceBlockCategory' type: array has_more: + description: More results are available. example: false type: boolean limit: - example: 1000 - format: 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 + maximum: 1000 + minimum: 2 type: integer object: + description: The type of this API object is 'list'. example: list type: string order: + description: Order of entries based on creation time. example: DESC type: string total_count: example: 1 format: integer type: integer - required: - - limit - - order - - object - - has_more - - total_count - - data - DeviceQueryPatchRequest: + type: object + DeviceData: properties: - name: - description: The name of the query. - maxLength: 200 - type: string - query: - description: The device query. - maxLength: 1000 + account_id: + description: The ID of the associated account. + example: '00000000000000000000000000000000' type: string - DeviceQueryPostPutRequest: - properties: - name: - description: The name of the query. - maxLength: 200 + 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 - query: - description: The device query. - maxLength: 1000 + 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 - required: - - name - - query - DeviceRequest: - properties: - accept: - description: The content type of an accepted response. - example: text/plain + ca_id: + description: The certificate issuer's ID. + example: '00000000000000000000000000000000' + maxLength: 500 type: string - content-type: - description: The content type of the payload. - example: text/plain + 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. + format: date type: string - method: - description: The CoAP request method. Allowed values are GET, POST, PUT and - DELETE. - example: GET + 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 - payload-b64: - description: The base64 encoded payload to send to the device. - example: dmFsdWUxCg== + 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 - uri: - description: The URI path of the requested resource. - example: /5/0/1 + deployment: + description: 'DEPRECATED: The last deployment used on the device.' + example: '' type: string - required: - - method - - uri - type: object - Endpoint: - properties: - name: - description: Unique Device Management Device ID representing the endpoint. - example: 015f3850a657000000000001001002ab + description: + description: The description of the device. + example: Temperature measuring device + maxLength: 2000 type: string - q: - description: 'Determines whether the device is in queue mode. - - - **Queue mode** - - - When an endpoint is in queue mode, messages sent to the endpoint do not - wake up the physical device. The messages are queued and delivered when - the device wakes up and connects to Device Management Connect. You can also - use the queue mode when the device is behind an NAT and cannot be reached - directly by Device Management Connect.' - example: false - type: boolean - status: - description: Deprecated and the value is always ACTIVE. Only used for API - backwards compatibility reasons. - example: ACTIVE + device_class: + description: An ID representing the model and hardware revision of the device. + example: '' + maxLength: 32 type: string - type: - description: Type of endpoint. (Free text) - example: Light + 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 - type: object - EndpointData: - properties: - ep: - description: Unique Device Management device ID. - example: 015f3850a657000000000001001002ab + 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 - ept: - description: Endpoint type. - example: Light + endpoint_type: + description: The endpoint type of the device. For example, the device is a + gateway. + example: '' + maxLength: 64 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 + enrolment_list_timestamp: + description: The claim date/time. + example: '2017-05-22T12:37:55.576563Z' + format: date-time 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}$ + etag: + description: The entity instance signature. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - required: - - enrollment_identity - type: object - EnrollmentIdentities: - properties: - after: - description: ID - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} + firmware_checksum: + description: The SHA256 checksum of the current firmware image. + example: '0000000000000000000000000000000000000000000000000000000000000000' type: string - data: + groups: + description: An array containing an ID of each group this device belongs to. items: - $ref: '#/definitions/EnrollmentIdentity' + example: '00000000000000000000000000000000' + type: string type: array - has_more: - example: true - type: boolean - limit: - description: Range 2-1000, or default. - example: 50 - maximum: 1000 - minimum: 2 - type: integer - object: - enum: - - list - example: list + host_gateway: + description: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. + example: '' type: string - order: - default: ASC - enum: - - ASC - - DESC - example: ASC + id: + description: The ID of the device. The device ID is used across all Device + Management APIs. + example: '00000000000000000000000000000000' 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 + 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 - claimed_at: - description: The time the device was claimed. - format: date-time + x-nullable: true + last_operator_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' + 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 type: string - created_at: - description: The time of the enrollment identity creation. + 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 - 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}$ + last_system_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' type: string - etag: - example: 7642xfaxz - pattern: '[A-Za-z0-9]{1,256}' + 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 - 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. + 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 - id: - description: Enrollment identity. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - type: string - object: + 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: - - enrollment - example: enrollment + - enabled + - blocked + example: enabled 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. + manifest: + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' type: string - object: - description: 'Entity name: `error`.' + manifest_timestamp: + description: The timestamp of the current manifest version. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - request_id: - description: Request ID from JWT. + mechanism: + description: 'NOT USED: The ID of the channel used to communicate with the + device.' + enum: + - connector + - direct type: string - type: - description: Error type. + mechanism_url: + description: 'NOT USED: The address of the connector to use.' + example: '' type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - ErrorResponse: - 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 - type: object - type: array - message: - description: A human readable informative explanation - example: Validation error + name: + 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: Entity name, always `error`. + description: The API resource entity. + example: device + type: string + operator_suspended: + description: Device has been suspended by operator. + type: boolean + serial_number: + description: The [serial number](https://www.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://www.pelion.com/docs/device-management-api/connect/) can + be queued. The device sends events for [subscribed](https://www.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. + + * Deregistered: The device has requested deregistration, or its registration + has expired.' enum: - - error + - unenrolled + - cloud_enrolling + - bootstrapped + - registered + - deregistered type: string - request_id: - description: ID of the request. - example: 0161991d63150242ac12000600000000 + system_suspended: + description: Is the device suspended by the system? + type: boolean + updated_at: + description: The time this data object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - type: - description: Error type used to categorise the error. - example: validation_error + vendor_id: + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 type: string - required: - - code - - message - - object - - request_id - - type - type: object - EventType: + DeviceDataPostRequest: properties: - campaign_id: - description: ID of the associated campaign. + 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 + x-nullable: true + ca_id: + description: The certificate issuer's ID. example: '00000000000000000000000000000000' + maxLength: 500 type: string - count: - example: 10 - type: integer - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 + 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 description: - example: Update error, nonspecific network error + description: The description of the device. + example: '' + maxLength: 2000 type: string - event_type: - example: UPD4_FAIL_101 + device_class: + description: An ID representing the model and hardware revision of the device. + maxLength: 32 type: string - id: - example: upd_fail_101 + 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 - object: - example: event-type + endpoint_name: + description: The endpoint name given to the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 64 type: string - summary_status: - example: FAIL + endpoint_type: + description: The endpoint type of the device. For example, the device is a + gateway. + example: '' + maxLength: 64 type: string - summary_status_id: - example: fail + host_gateway: + description: The ID of the host gateway, if appropriate. + example: '' type: string - type: object - EventTypeList: - properties: - after: - description: The entity ID to fetch after the given one - example: 'null' - type: string - data: - items: - $ref: '#/definitions/EventType' - type: array - has_more: - description: A flag indicating whether there are more results - example: 'false' - type: boolean - limit: - description: 'The number of results to return, (range: 2-1000), or equals - to total_count' - example: '50' - type: integer - object: - description: 'The entity name: always ''list''' - example: list + issuer_fingerprint: *id013 + manifest: + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' + mechanism: + description: The ID of the channel used to communicate with the device. 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' - type: integer - type: object - EventTypeSummary: - properties: - campaign_id: - description: ID of the associated campaign. - example: '00000000000000000000000000000000' + - connector + - direct type: string - count: - example: 10 - type: integer - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + mechanism_url: + description: The address of the connector to use. + example: '' type: string - id: - description: ID of the event type description - enum: - - fail - - success - - info - - skipped - example: fail + name: + description: The name of the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 128 type: string - object: - example: summary_status + serial_number: + description: The serial number of the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 64 type: string - summary_status: - description: The event type description. + state: + description: The current state of the device. enum: - - FAIL - - SUCCESS - - INFO - - SKIPPED - example: FAIL + - unenrolled + - cloud_enrolling + - bootstrapped + - registered + - deregistered type: string - type: object - EventTypeSummaryList: - properties: - after: - description: The entity ID to fetch after the given one - example: 'null' + vendor_id: + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 type: string - data: - items: - $ref: '#/definitions/EventTypeSummary' - type: array - has_more: - description: A flag indicating whether there are more results - example: 'false' + DeviceDataPutRequest: + properties: + auto_update: + description: 'DEPRECATED: Mark this device for automatic firmware update.' type: boolean - limit: - description: 'The number of results to return, (range: 2-1000), or equals - to total_count' - example: '50' - type: integer - object: - description: 'The entity name: always ''list''' - 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: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' - enum: - - ASC - - DESC - example: ASC + 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: - description: The total number or records, if requested. It may be returned - also for small lists. - example: '1' - type: integer - type: object - FeaturePolicy: - description: Represents a feature policy. Either the feature or the resource must - be specified. - properties: - action: - description: Comma-separated list of actions, empty string represents all - actions. - example: GET + 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 - 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 + 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 - inherited: - description: Flag indicating whether this feature is inherited or overwritten - specifically. - example: false - type: boolean - resource: - description: Resource that is protected by this policy. - example: /v3/update-campaign + endpoint_type: + description: The endpoint type of the device. For example, the device is a + gateway. + example: '' + maxLength: 64 type: string - type: object - Field: - properties: - message: - description: Message describing the erroneous situation. + host_gateway: + description: The ID of the host gateway, if appropriate. + example: '' type: string name: - description: Name of the erroneous field. + description: The name of the device. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 128 type: string - required: - - message - - name - type: object - FieldMessageEntry: + DeviceEqNeqFilter: properties: - field: - description: Field name. + account_id: type: string - message: - description: Error message related to the field. + auto_update: + type: boolean + bootstrap_expiration_date: + example: '2017-05-22' + format: date + type: string + bootstrapped_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + ca_id: + type: string + component_attributes: + additionalProperties: + type: string + type: object + connector_expiration_date: + example: '2017-05-22' + format: date type: string - type: object - FirmwareImage: - properties: created_at: - description: The time the object was created example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: - description: The firmware image file URL - example: http://example.com/00000000000000000000000000000000 + custom_attributes: + additionalProperties: + type: string + type: object + deployed_state: type: string - datafile_checksum: - description: The checksum (sha256) generated for the datafile - example: '0000000000000000000000000000000000000000000000000000000000000000' + deployment: type: string - datafile_size: - description: The size of the datafile in bytes - format: int64 - type: integer description: - description: The description of the object - example: '' - maxLength: 2000 type: string - etag: - description: The entity instance signature - example: '2017-05-22T12:37:55.576563Z' - format: date-time + device_class: type: string - id: - description: The firmware image ID - example: '00000000000000000000000000000000' + device_execution_mode: + type: integer + device_key: type: string - name: - description: The firmware image name - example: '' - maxLength: 128 + endpoint_name: type: string - object: - description: The API resource entity - example: firmware-image + endpoint_type: type: string - updated_at: - description: The time the object was updated + enrolment_list_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - required: - - created_at - - datafile - - datafile_checksum - - description - - etag - - id - - name - - object - - updated_at - FirmwareImageEqNeqFilter: - properties: - created_at: + etag: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: + firmware_checksum: type: string - datafile_checksum: + host_gateway: type: string - datafile_size: - type: integer - description: + id: type: string - etag: + manifest: + type: string + manifest_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - id: + mechanism: + type: string + 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 - FirmwareImageGteLteFilter: + vendor_id: + type: string + type: object + DeviceEventData: 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 type: string - etag: + 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 - updated_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: + example: Device record created type: string - FirmwareImageInNinFilter: - properties: - created_at: + device_id: + example: '00000000000000000000000000000000' + type: string + etag: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: + event_type: + description: Event code + example: UPD2_100 + maxLength: 100 type: string - datafile_checksum: + event_type_category: + description: Category code that groups the event type by a summary category. + example: FAIL_MANIFEST_REJECTED type: string - datafile_size: - type: integer - description: + event_type_description: + description: Generic description of the event. + example: FAIL type: string - etag: + id: + example: '00000000000000000000000000000000' + type: string + 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: + type: string + device_id: + type: string + event_type: + type: string id: type: string - name: + state_change: + type: boolean + DeviceEventGteLteFilter: + properties: + date_time: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - updated_at: + DeviceEventInNinFilter: + properties: + date_time: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareImagePage: + description: + type: string + device_id: + type: string + event_type: + type: string + id: + type: string + state_change: + type: boolean + DeviceEventPage: properties: after: example: null @@ -3701,128 +3689,135 @@ definitions: data: example: '[]' items: - $ref: '#/definitions/FirmwareImage' + $ref: '#/definitions/DeviceEventData' type: array has_more: + example: false type: boolean limit: - format: int32 + example: 1000 type: integer object: 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 type: integer - FirmwareManifest: + DeviceGroup: properties: created_at: - description: The time the object was created + description: The time the group was created. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - datafile: - description: The URL of the firmware manifest binary - example: http://example.com/00000000000000000000000000000000 + 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 - datafile_size: - description: The size of the datafile in bytes - format: int64 + devices_count: + description: The number of devices in this group. + example: 10 type: integer - description: - description: The description of the firmware manifest - example: '' - maxLength: 2000 - type: string - device_class: - description: The class of the device - example: 00000000-0000-0000-0000-000000000000 - type: string etag: - description: The entity instance signature example: '2017-05-22T12:37:55.576563Z' format: date-time type: string id: - description: The firmware manifest ID - example: '00000000000000000000000000000000' - type: string - key_table: - description: The key table of pre-shared keys for devices - example: http://example.com - format: uri + description: The group ID. + example: 015c3029f6f7000000000001001000c3 type: string - name: - description: The name of the object - example: '' + name: &id030 + description: Name of the group. + example: My devices maxLength: 128 type: string object: - description: The API resource entity - example: firmware-manifest - type: string - timestamp: - description: The firmware manifest version as a timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: 'Entity name: always `device-group`.' + example: device-group type: string 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 - required: - - created_at - - datafile - - description - - device_class - - etag - - id - - name - - object - - timestamp - - updated_at - FirmwareManifestEqNeqFilter: + type: object + DeviceGroupManipulation: properties: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + device_id: + example: '00000000000000000000000000000000' type: string - datafile: + required: + - device_id + type: object + DeviceGroupPage: + properties: + after: + description: An offset token for current page. + example: '01631667477600000000000100100374' type: string - datafile_size: + data: + items: + $ref: '#/definitions/DeviceGroup' + type: array + has_more: + description: More results are available. + 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 + maximum: 1000 + minimum: 2 type: integer - description: - type: string - device_class: - type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + object: + description: The type of this API object is 'list'. + example: list type: string - id: + order: + description: Record order based on creation time. + example: DESC type: string - name: + total_count: + example: 1 + format: integer + type: integer + type: object + DeviceGteLteFilter: + properties: + bootstrap_expiration_date: + example: '2017-05-22' + format: date type: string - timestamp: + bootstrapped_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - updated_at: + connector_expiration_date: + example: '2017-05-22' + format: date + type: string + created_at: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareManifestGteLteFilter: - properties: - created_at: + enrolment_list_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -3830,7 +3825,7 @@ definitions: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - timestamp: + manifest_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string @@ -3838,1037 +3833,1249 @@ definitions: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - FirmwareManifestInNinFilter: - properties: + type: object + DeviceInNinFilter: + properties: + account_id: + type: string + auto_update: + type: boolean + bootstrap_expiration_date: + example: '2017-05-22' + format: date + type: string + bootstrapped_timestamp: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + ca_id: + type: string + component_attributes: + additionalProperties: + type: string + type: object + connector_expiration_date: + example: '2017-05-22' + format: date + type: string 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 + deployment: type: string - datafile_size: - type: integer description: 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' format: date-time type: string + firmware_checksum: + type: string + host_gateway: + type: string id: type: string - name: + manifest: type: string - timestamp: + manifest_timestamp: example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + mechanism: + type: string + 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 - FirmwareManifestPage: + vendor_id: + type: string + type: object + DevicePage: properties: after: - example: null + description: An offset token for current page. + example: '01631667477600000000000100100374' type: string data: - example: '[]' items: - $ref: '#/definitions/FirmwareManifest' + $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: The type of this API object is a "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: The order of the records based on creation time, `ASC` or `DESC`; + by default `ASC`. + example: DESC type: string total_count: - format: int32 + example: 1 + format: integer type: integer - ForbiddenErrorResponse: - description: 403 Forbidden. + DeviceQuery: properties: - code: - description: Response code. Always set to 403. - enum: - - 403 - 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 `forbidden`. - enum: - - forbidden + created_at: + description: The timestamp of when the query was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time 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. - - ' - properties: - api_key: - description: 'Unique ID for API client (provided by GlobalSign). - - ' - example: e510e289e6cd8947 - maxLength: 1000 + etag: + description: The entity instance signature. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - api_secret: - description: 'API Secret matching the API key (provided by GlobalSign). - - ' - example: a477a8393d17a55ecb2ba6a61f58feb84770b621 - format: password - maxLength: 250 + id: + description: The ID of the query. + example: 015c30671894000000000001001001e9 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 + name: + description: The name of the query. + example: example-stored-device-query 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 + object: + description: The API resource entity. + example: device-query 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 + query: + description: The device query. + example: id=0158d38771f70000000000010010038c type: string - required: - - api_key - - api_secret - - client_certificate - - private_key - type: object - GroupCreationInfo: - description: This object is used when creating new groups. - 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 + updated_at: + description: The time the object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string required: + - created_at + - etag + - id - name - type: object - GroupSummary: - description: This object contains basic information about groups. + - object + - query + - updated_at + DeviceQueryEqNeqFilter: 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' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string etag: - description: API resource entity version. - example: '1' + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string id: - description: The ID of the group. - example: 01619571dec00242ac12000600000000 - pattern: '[a-f0-9]{32}' type: string name: - description: The name of the group. - example: Administrators - maxLength: 100 type: string - object: - description: 'Entity name: always `group`.' - enum: - - group + query: type: string updated_at: - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' + example: '2017-05-22T12:37:55.576563Z' 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: + DeviceQueryGteLteFilter: + 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 + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + DeviceQueryInNinFilter: + 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 + id: + type: string + name: + type: string + query: + type: string + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + DeviceQueryPage: 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. + example: '[]' items: - $ref: '#/definitions/GroupSummary' + $ref: '#/definitions/DeviceQuery' 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 + example: 1000 + format: integer 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.' - enum: - - ASC - - DESC + example: DESC type: string total_count: - description: The total number of records, if requested. - example: 20 - format: int32 + example: 1 + format: integer type: integer required: - - data - - has_more - limit + - order - object + - has_more - total_count - type: object - GroupUpdateInfo: - description: This object is used when Update groups. + - data + DeviceQueryPatchRequest: properties: name: - description: The group name. - maxLength: 100 + description: The name of the query. + maxLength: 200 + type: string + query: + description: The device query. + maxLength: 1000 + type: string + DeviceQueryPostPutRequest: + properties: + name: + description: The name of the query. + maxLength: 200 + type: string + 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: - name - type: object - IdentityProviderCreationReq: - description: This object is used for creating new federated identity provider - module. + - query + DeviceRequest: properties: - description: - description: Description for the identity provider. - maxLength: 500 + accept: + description: The content type of an accepted response. + example: text/plain type: string - name: - description: Name of the identity provider. - maxLength: 100 + content-type: + description: The content type of the payload. + example: text/plain type: string - saml2_attributes: - $ref: '#/definitions/SAML2Req' - description: SAML2 specific attributes. - status: - description: Status of the identity provider. - enum: - - ACTIVE - - SUSPENDED + method: + description: The CoAP request method. Allowed values are GET, POST, PUT and + DELETE. + example: GET type: string - type: - description: Identity provider type. - enum: - - SAML2 + payload-b64: + description: The base64 encoded payload to send to the device. + example: dmFsdWUxCg== + type: string + uri: + description: The URI path of the requested resource. + example: /5/0/1 type: string required: - - name - - type + - method + - uri type: object - IdentityProviderInfo: + DeviceToPelionMessagesCounter: + description: The number of messages from the device to Device Management. + properties: + 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: + - total_count + - registrations + - registration_updates + - registration_deletes + - observations + - est_requests + - proxy_responses + - bootstrap_requests + type: object + EchoDevice: + description: The Device Echo object representing the device. 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' + description: Response creation UTC time. + example: 2020-10-20 10:30:55.123000 format: date-time type: string - description: - description: Description for the identity provider. - maxLength: 500 + device_id: + description: The device ID. + example: 015f3850a657000000000001001002ab type: string - etag: - description: API resource entity version. - example: '1' + endpoint_name: + description: The endpoint name. + example: Sensor3222454 type: string - id: - description: Entity ID. - example: 01619571d01d0242ac12000600000000 - pattern: '[a-f0-9]{32}' + last_desired_at: + description: The last time a write command was initiated on a resource. + example: 2019-10-20 10:30:55.123000 + format: date-time type: string - name: - description: Name of the identity provider. - maxLength: 100 + last_reported_at: + description: The last time any resource's reported value was updated. + example: 2019-10-20 10:30:55.123000 + format: date-time 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 + 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 format: date-time type: string required: - - etag - id - - name - - object - - type type: object - IdentityProviderList: + EchoResource: + description: The representation of a single resource of the device stored in Device + Echo. 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 + 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 - 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 - IdentityProviderUpdateReq: - description: Update existing federated identity provider module. + EchoResourceDesired: + description: Resource value written, or queued to be written to the device. properties: - description: - description: Description for the identity provider. - maxLength: 500 - type: string - name: - description: Name of the identity provider. - maxLength: 100 + desired_at: + description: The time of the latest value write was initiated. + example: 2019-10-20 10:30:55.123000 + format: date-time type: string - saml2_attributes: - $ref: '#/definitions/SAML2Req' - description: SAML2 specific attributes. status: - description: Status of the identity provider. - enum: - - ACTIVE - - SUSPENDED + 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 + format: date-time type: string - type: - description: Identity provider type. - enum: - - SAML2 + value: + description: The desired value in base64 encoded format. + example: RGVzaXJlZCB2YWx1ZS4= + format: byte type: string - required: - - name - - type type: object - Image: - format: binary - type: string - InternalServerErrorResponse: - description: 500 Internal server error response. + EchoResourceReported: + description: Reported single resource data received from the device. properties: - code: - description: Response code. Always set to 500. - enum: - - 500 - type: integer - message: - description: A human-readable message with detailed info. + content_type: + description: Content type of the reported resource value. + example: text/plain type: string - object: - description: Always set to `error`. - enum: - - error + 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 + format: date-time type: string - request_id: - description: Request ID + reported_at: + description: The time the last value was reported. + format: date-time type: string - type: - description: Error type. Always set to `internal_error`. - enum: - - internal_error + 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: - - object - - message - - request_id - - type - - code + - enrollment_identity type: object - ListOfPreSharedKeysWithoutSecret: + EnrollmentIdentities: properties: after: - description: An offset token for current page. - example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 - 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 + description: ID + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} type: string data: - description: Array of the PSK entries. The array is empty if there are no - PSKs. items: - $ref: '#/definitions/PreSharedKeyWithoutSecret' - minLength: 0 + $ref: '#/definitions/EnrollmentIdentity' type: array has_more: - description: More results are available. example: true type: boolean limit: - description: The value of limit query parameter from the request, or default - if not specified. + description: Range 2-1000, or default. example: 50 + maximum: 1000 + minimum: 2 type: integer object: - description: The type of this API object is a "list". + enum: + - list example: list type: string order: - description: Record order based on creation time. - example: DESC + default: ASC + enum: + - ASC + - DESC + example: ASC type: string + total_count: + example: 100 + format: int32 + minimum: 1 + type: integer required: - object - limit + - after - order - has_more + - total_count - data type: object - LoginHistory: - description: Represents an entry in login history. + EnrollmentIdentity: properties: - date: - description: UTC time RFC3339 for this login attempt. - example: '2018-02-14T17:52:07Z' + account_id: + description: ID + example: 00005a4e027f0a580a01081c00000000 + type: string + claimed_at: + description: The time the device was claimed. format: date-time type: string - ip_address: - description: IP address of the client. - example: 127.0.0.1 + created_at: + description: The time of the enrollment identity creation. + format: date-time 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 + 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 - 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. + 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 - name: - description: Name of the identity provider. - readOnly: true + etag: + example: 7642xfaxz + pattern: '[A-Za-z0-9]{1,256}' type: string - type: - description: Identity provider type. + 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: Enrollment identity. + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} + type: string + object: enum: - - NATIVE - - MBED - - SAML2 - - OIDC - readOnly: true + - enrollment + example: enrollment type: string required: + - object - id + - etag + - account_id + - created_at + - expires_at + - claimed_at + - enrollment_identity + - enrolled_device_id type: object - NotificationData: + ErrorObjectResponse: properties: - ct: - description: Content type. - example: text/plain - type: string - ep: - description: Device Management Device ID. - example: 015f3850a657000000000001001002ab + 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. 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 + object: + description: 'Entity name: `error`.' type: string - path: - description: URI path. - example: /sen/light + request_id: + description: Request ID from JWT. type: string - payload: - description: Base64 encoded payload. - example: My4zMQ== + type: + description: Error type. type: string + required: + - code + - fields + - message + - object + - request_id + - type type: object - NotificationEntry: - description: Represents an account notification entry. + ErrorResponse: properties: - account_id: - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + 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 + type: object + type: array + message: + description: A human readable informative explanation + example: Validation error + type: string + object: + description: Entity name, always `error`. + enum: + - error + type: string + request_id: + description: ID of the request. + example: 0161991d63150242ac12000600000000 + type: string + type: + description: Error type used to categorise the error. + example: validation_error + type: string + required: + - code + - message + - object + - request_id + - type + type: object + EstRequestsCounter: + description: The number of certificate creation requests received from devices + during bootstrap. + format: int64 + minimum: 0 + type: integer + EventType: + properties: + campaign_id: + description: ID of the associated campaign. + example: 016e652be671000000000001001001e5 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. + description: + example: Update error, nonspecific network error type: string - etag: - description: API resource entity version. - example: '1' + event_type: + example: UPD4_FAIL_101 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. + example: upd_fail_101 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}$).+\@.+ + description: 'Entity name: always ''event-type''.' + example: event-type type: string - subject: - description: The subject of this account notification entry. - example: Account locked. + summary_status: + example: FAIL 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_id: + example: fail type: string - required: - - etag - - id - - object type: object - NotificationEntryList: + EventTypeList: 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. + enum: + - fail + - skipped + - info + - success items: - $ref: '#/definitions/NotificationEntry' + $ref: '#/definitions/EventType' 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 - ParentAccountInfo: - description: Represents parent account contact details in responses. + EventTypeSummary: 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 - 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 - id: - description: The ID of the parent account. - example: 01619571dad80242ac12000600000000 - pattern: '[a-f0-9]{32}' + campaign_id: + description: ID of the associated campaign. + example: 016e652be6710000000000010010013d type: string - type: object - PasswordPolicy: - properties: - minimum_length: - description: Minimum length for the password. - example: '8' - maximum: 512 - minimum: 8 + count: + example: 10 type: integer - required: - - minimum_length - type: object - 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 - expires: - description: Service package expiration 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 - firmware_update_count: - description: Size of firmware update quota of this service package. - format: int32 - type: integer id: - description: ID of this service package. + description: ID of the event type description. + enum: + - fail + - success + - info + - skipped + example: fail type: string - modified: - description: Service package latest modified time in RFC3339 date-time with - millisecond accuracy and UTC time zone. - format: date-time + object: + description: 'Entity name: always ''summary_status''.' + example: summary_status type: string - previous_id: - description: Previous service package ID. + summary_status: + description: The event type description. + enum: + - FAIL + - SUCCESS + - INFO + - SKIPPED + example: FAIL type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + type: object + EventTypeSummaryList: + properties: + after: + description: The entity ID to fetch after the given one. + example: 'null' type: string - required: - - id - - previous_id - - created - - modified - - start_time - - expires - - firmware_update_count + data: + items: + $ref: '#/definitions/EventTypeSummary' + type: array + has_more: + description: A flag indicating whether there are more results. + example: 'false' + type: boolean + limit: + description: 'The number of results to return, (range: 2-1000), or equals + to total_count.' + example: '50' + 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 + 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 - PreSharedKey: + FeaturePolicy: + description: Represents a feature policy. Either the feature or the resource must + be specified. 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}$ + action: + description: Comma-separated list of actions, empty string represents all + actions. + example: GET 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}$ + 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 + 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 + inherited_type: + description: Indicates the type of entity this policy is inherited from. + enum: + - account + - template + - tier_template + example: account + readOnly: true + type: string + resource: + description: Resource that is protected by this policy. + example: /v3/update-campaign type: string - required: - - endpoint_name - - secret_hex type: object - PreSharedKeyWithoutSecret: + Field: 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 + message: + description: Message describing the erroneous situation. 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}$ + name: + description: Name of the erroneous field. type: string required: - - endpoint_name + - message + - name type: object - Presubscription: + FieldMessageEntry: properties: - endpoint-name: - description: The device ID. - example: 015f3850a657000000000001001002ab + field: + description: Field name. type: string - endpoint-type: - example: Light + message: + description: Error message related to the field. type: string - 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. + FirmwareImage: 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 + created_at: *id014 + datafile: + description: The firmware image file URL. + example: http://bucket.com/myimage.elf type: string - expires: - description: Service package expiration time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + datafile_checksum: + description: The checksum (sha256) generated for the datafile. + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e type: string - firmware_update_count: - description: Size of firmware update quota of this service package. - format: int32 + 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 + etag: *id015 id: - description: ID of this service package. + description: The firmware image ID. + example: 016e652be671000000000001001001e5 + pattern: '[A-Fa-f0-9]{32}' type: string - modified: - description: Service package latest modified time in RFC3339 date-time with - millisecond accuracy and UTC time zone. - format: date-time + name: + description: The firmware image name. + format: free text + maxLength: 128 type: string - next_id: - description: Next service package ID if this service package has a pending - renewal or null. + object: + description: 'Entity name: always ''firmware-image''.' + example: firmware-image type: string - previous_id: - description: Previous service package ID. + updated_at: *id016 + FirmwareImageEqNeqFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - reason: - description: Reason the service package was ended. - enum: - - renewed - - terminated + datafile: type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + datafile_checksum: 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 + datafile_size: type: integer - campaign_name: - description: 'Campaign name of quota usage entry. - - Null if quota usage entry type is not `reservation` or `reservation release`.' + description: type: string - time: - description: Added time of quota usage entry in RFC3339 date-time with millisecond - accuracy and UTC time zone. + etag: + example: '2017-05-22T12:37:55.576563Z' 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: - - amount - - type - - time - type: object - ReportAccountContactInfo: - description: Account contact information. - properties: - address_line1: + id: + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' type: string - address_line2: + name: type: string - city: + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - company: + FirmwareImageGteLteFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - contact: + etag: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - country: + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - email: + FirmwareImageInNinFilter: + properties: + created_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + datafile: + type: string + datafile_checksum: + type: string + datafile_size: + type: integer + description: + type: string + 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: type: string - postal_code: + updated_at: + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - state: + FirmwareImagePage: + properties: + after: + example: null type: string - required: - - id - - company - type: object - ReportBillingData: + data: + items: + $ref: '#/definitions/FirmwareImage' + 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 based on creation time, `ASC` or `DESC`; + by default `ASC`. + enum: + - ASC + - DESC + example: ASC + type: string + total_count: + format: int32 + type: integer + FirmwareManifest: properties: - active_devices: + 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 + datafile_size: + description: The size of the firmware manifest in bytes. format: int64 - minimum: 0 type: integer - firmware_updates: + 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 - minimum: 0 type: integer - generated: - description: Billing report generated time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + 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 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: *id015 + 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/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 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 - period_end: - description: Billing report end time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + 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 - period_start: - description: Billing report start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. + 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 type: string - sda_tokens: - format: int64 - minimum: 0 + 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 + FirmwareManifestGteLteFilter: + 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 + 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: + 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. @@ -4882,9 +5089,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 @@ -4893,571 +5100,714 @@ 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. + after: + description: An offset token for the current page. + example: '01631667477600000000000100100374' + pattern: '[A-Fa-f0-9]{32}' type: string - month: - description: Month of requested billing report. - pattern: ^\d{4}-\d{2}$ - type: string - object: - description: Billing report response object. Always set to `billing-report`. - enum: - - billing-report - 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. + data: + description: The list of trust anchors of the account. items: - $ref: '#/definitions/SubtenantAccountReport' + $ref: '#/definitions/TrustAnchorResponse' type: array - required: - - id - - object - - account - - billing_data - - subtenants - - aggregated - - month - type: object - Resource: - properties: - obs: - description: '''Determines whether you can subscribe to changes for this resource. - It can have values `true` or `false`.''' - example: true + has_more: + description: Indicates whether additional results are available. + example: false 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 - type: string - type: - description: '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).' - example: text/plain + 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: The type of this API object is a `list`. + example: list type: string - uri: - description: The resource URL. - example: /sen/light + order: + description: Indicates how to order the entries based on when they were created. + enum: + - ASC + - DESC + example: DESC type: string - required: - - uri + total_count: + example: 1 + format: integer + type: integer type: object - ResourcePath: - description: A resource URI. - example: /sen/light - type: string - ResourcesData: - 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). + GlobalSignCredentials: + description: 'The credentials required to connect to the GlobalSign account. - 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 - SAML2Info: - description: Represents SAML2 specific attributes in responses. + The values should be taken from GlobalSign support upon account creation.' properties: - assertion_endpoint: - description: URL of the service provider's assertion endpoint. - type: string - idp_entity_id: - description: Entity ID of the identity provider. + api_key: + description: Unique ID for API client (provided by GlobalSign). + example: e510e289e6cd8947 + maxLength: 1000 type: string - idp_x509_certs: - description: List of public X509 certificates of the identity provider in - PEM format. - items: - type: string - type: array - slo_endpoint: - description: URL of the identity provider's SLO endpoint. + api_secret: + description: API secret matching the API key (provided by GlobalSign). + example: a477a8393d17a55ecb2ba6a61f58feb84770b621 + format: password + maxLength: 250 type: string - sp_entity_id: - description: Entity ID of the service provider. + 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 type: string - 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 + 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 - sso_endpoint: - description: URL of the identity provider's SSO endpoint. + 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: + - api_key + - api_secret + - client_certificate + - private_key type: object - SAML2Req: + GroupCreationInfo: + description: This object is used when creating new groups. properties: - entity_descriptor: - description: Base64 encoded string representation of an XML file. Contains - an entity descriptor document for the identity provider. Can be used as - an alternative method to provide the identity provider's attributes. - type: string - idp_entity_id: - description: Entity ID of the identity provider. - type: string - idp_x509_certs: - description: List of public X509 certificates of the identity provider. Certificates - must be in PEM format. - items: - type: string - type: array - slo_endpoint: - description: URL of the identity provider's SLO endpoint. - 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. - type: string - sso_endpoint: - description: URL of the identity provider's SSO endpoint. + 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 - ServerCredentialsResponseData: + GroupIdList: + items: + example: 01705c6383f6c85b76f92f4e00000000 + type: string + type: array + GroupSummary: + description: This object contains basic information about groups. 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 + 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 etag: description: API resource entity version. + example: '1' type: string id: - description: Unique entity ID. - type: string - object: - description: 'Entity name: always `server-credentials`.' + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - server_certificate: - description: PEM-format X.509 server certificate used to validate the server - certificate received during the TLS/DTLS handshake. + name: + description: The name of the group. + example: Administrators + maxLength: 100 type: string - server_uri: - description: Server URI that the client connects to. + object: + description: 'Entity name: always `group`.' + enum: + - group 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. + updated_at: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' format: date-time 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 + user_count: + description: The number of users in this group. + example: 1 + format: int32 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 + - account_id + - apikey_count + - etag + - id + - name + - object + - user_count type: object - ServicePackageQuota: - description: Quota of the service package. + GroupSummaryList: 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/GroupSummary' + 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: Always set to `service-package-quota`. + description: 'Entity name: always `list`.' enum: - - service-package-quota + - list type: string - quota: - description: Available quota for the service package. - format: int64 - minimum: 0 + 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 - - quota + - total_count type: object - ServicePackageQuotaHistoryItem: - description: Quota history item. + GroupUpdateInfo: + description: This object is used when Update groups. properties: - added: - description: Added time of quota history entry in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + name: + description: The group name. + maxLength: 100 type: string - amount: - description: Negative or positive quota usage. - format: int64 - type: integer - id: - description: Service package quota history ID. - maxLength: 32 - minLength: 32 + 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 - reason: - description: Type of quota usage entry. + 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: - - reservation - - reservation_release - - reservation_termination - - package_creation - - package_renewal - - package_termination + - ACTIVE + - SUSPENDED + type: string + type: + description: Identity provider type. + enum: + - SAML2 + - OIDC 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: - - id - - added - - amount - - reason + - name + - type type: object - ServicePackageQuotaHistoryReservation: - description: Service package quota history reservation object. + IdentityProviderInfo: properties: account_id: - description: Account ID. - maxLength: 250 - minLength: 1 + description: The ID of the account the identity provider belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - campaign_name: - description: Campaign name for this reservation. - maxLength: 250 - minLength: 1 + 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: Reservation ID. - maxLength: 250 - minLength: 1 + 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 ''identity-provider''' + enum: + - identity-provider + type: string + 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 + 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 type: string required: + - etag - id - - account_id - - campaign_name - ServicePackageQuotaHistoryResponse: - description: Quota history of the service package. + - name + - object + - type + type: object + 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 - 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. - type: string - previous_id: - description: Previous service package ID, or null. + description: + description: Description for the identity provider. + maxLength: 500 type: string - start_time: - description: Service package start time in RFC3339 date-time with millisecond - accuracy and UTC time zone. - format: date-time + 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 + - OIDC type: string required: - - id - - start_time - - expires - - firmware_update_count - ServicePackageReport: - description: Account's current service package data included in reporting. + - name + - type + type: object + IdpPublicKey: + description: Represents provider's public key and key ID used to sign ID tokens. + PEM-encoded. 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 + key: + description: The public key. + type: string + kid: + description: The public key ID. + type: string 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. + Image: + format: binary + type: string + InternalServerErrorResponse: + description: 500 Internal server error response. properties: - active: - $ref: '#/definitions/ActiveServicePackage' - description: Currently active service package. Can be null. - type: object + code: + description: Response code. Always set to 500. + enum: + - 500 + type: integer + message: + description: A human-readable message with detailed info. + type: string object: - description: Always set to `service-packages`. + description: Always set to `error`. enum: - - service-packages + - error + type: string + request_id: + description: Request ID + type: string + type: + description: Error type. Always set to `internal_error`. + enum: + - internal_error 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 + - message + - request_id + - type + - code type: object - SubscriptionsList: - description: A list of resource URIs, one per line. - example: /sen/light - type: string - SubtenantAccountReport: - description: Billing report for subtenant account. + KeyValue: 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. + key: + type: string + value: + type: string required: - - account - - billing_data - type: object - SubtenantReportAccountContactInfo: - description: Subtenant account contact information. + - key + - value + ListOfPreSharedKeysWithoutSecret: properties: - address_line1: + after: + description: An offset token for current page. + example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 type: string - address_line2: + 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 - city: + 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 + 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 - company: + order: + description: Record order based on creation time. + example: DESC type: string - contact: + required: + - object + - limit + - order + - has_more + - data + type: object + Log: + properties: + account_id: + description: The ID of the account associated with the device. + example: 0168e7bff4f2263cf4be560700000000 type: string - country: + app_name: + description: A tag indicating which application or software module produced + the log message. + example: modbus type: string - customer_subtenant_id: - description: Account subtenant ID, if a subtenant. + created_at: + description: RFC 3339 UTC timestamp indicating when the resource entity was + created. + example: '2017-07-21T17:32:28Z' + format: date-time type: string - email: + device_id: + description: Device ID. + example: 00005a4e027f0a580a01081c00000000 + type: string + etag: + description: Entity instance signature, or Unix timestamp of last customer + update. + example: stdout type: string id: - description: Account ID. + description: mUUID Entity ID. Each device log has a unique ID. + example: 2d238a89038b4ddb84699dd36a901063 + pattern: /^[(0-9)(a-f)]{32}$/ type: string - phone_number: + level: + description: Log entry severity level. + enum: + - DEBUG + - TRACE + - INFO + - WARNING + - ERROR + - CRITICAL + example: ERROR type: string - postal_code: + message: + description: Log message body. + example: 'ModbusRTU Driver: Failed to start undefined' type: string - state: + object: + description: Device log resource name. + example: device-log + type: string + 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 + type: + description: Device log type. + example: syslog type: string - required: - - id - - company - - customer_subtenant_id type: object - SubtenantServicePackageReport: + LoginHistory: + description: Represents an entry in login history. properties: - quota_usage: - items: - $ref: '#/definitions/QuotaUsageReport' - type: array + 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: - - quota_usage + - date + - ip_address + - success + - user_agent type: object - TrustedCertificateReq: - description: Represents a trusted certificate in upload requests. + LoginProfile: + description: Represents a user login profile in Device Management. 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. + foreign_id: + description: The ID of the user in the identity provider's service. + example: fed/user_007 + readOnly: true type: string - description: - description: Human readable description of this certificate. - maxLength: 500 + id: + description: ID of the identity provider. + example: 01619571f3c00242ac12000600000000 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: Name of the identity provider. + example: Pelion + readOnly: true type: string - service: - description: Service name where the certificate must be used. + type: + description: Identity provider type. enum: - - lwm2m - - bootstrap + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE + readOnly: true 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.' + required: + - id + type: object + LogsPage: + properties: + after: + description: An offset token for current page. type: string - status: - description: Status of the certificate. - enum: - - ACTIVE - - INACTIVE + x-nullable: true + data: + items: + $ref: '#/definitions/Log' + type: array + has_more: + description: Indicates whether more results are available. + example: false + type: boolean + 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 - required: - - certificate - - name - - service + order: + description: Entry order based on creation time. + example: DESC + type: string + total_count: + example: 1 + format: integer + type: integer type: object - TrustedCertificateResp: - description: Represents a trusted certificate in responses. + 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 - 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 + error_msg: + description: The error message if there was an error while transmitting the + account notification. + example: Connection error. 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' @@ -5467,90 +5817,55 @@ definitions: 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 + message: + description: The message contained in this account notification entry. + example: User limit has been reached. 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. + description: 'Entity name: always ''notification-entry''' enum: - - lwm2m - - bootstrap + - notification-entry type: string - status: - description: Status of the certificate. - enum: - - ACTIVE - - INACTIVE - example: ACTIVE + receiver: + description: The receiver this account notification entry. + example: example@email-receiver.test + pattern: ^(?=.{3,254}$).+\@.+ 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 + description: The subject of this account notification entry. + example: Account locked. type: string - valid: - description: This read-only flag indicates whether the certificate is valid - or not. - example: true - readOnly: true + success: + description: A flag indiciating whether the sending of this account notification + entry was successful, true or false. type: boolean - validity: - description: Expiration time in UTC formatted as RFC3339. - example: '2038-02-14T15:24:14Z' - format: date-time + 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 @@ -5578,3007 +5893,8595 @@ 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 - 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: - autostop_reason: - description: Text description of why a campaign failed to start or why a campaign - stopped. - example: Insufficient billing credit. - type: string - created_at: - description: The time the update campaign was created - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - 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 - type: string - etag: - description: The entity instance signature - example: '2017-05-22T12:37:58.753425Z' + 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 - finished: - description: The campaign finish timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + x-nullable: true + client_secret: + description: Client secret needed to authenticate and gain access to identity + provider's API. type: string - id: - description: The campaign ID - example: '00000000000000000000000000000000' + x-nullable: true + end_session_endpoint: + description: URL of the provider's end session endpoint. type: string - name: - description: The campaign name - example: campaign - maxLength: 128 + x-nullable: true + issuer: + description: Issuer of the identity provider. type: string - object: - description: The API resource entity - example: update-campaign + jwks_uri: + description: URL of the provider's JSON web key set document. type: string - phase: - description: The current phase of the campaign. - readOnly: true + 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 - root_manifest_id: - example: '00000000000000000000000000000000' + x-nullable: true + revocation_endpoint: + description: URL of the provider's token revocation endpoint. type: string - root_manifest_url: - example: http://example.com/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 - started_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + token_endpoint: + description: URL of the OAuth 2.0 authorization endpoint. type: string - state: - description: 'DEPRECATED: The state of the campaign (use phase instead).' + 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: - - draft - - scheduled - - allocatingquota - - allocatedquota - - quotaallocationfailed - - checkingmanifest - - checkedmanifest - - devicefetch - - devicecopy - - devicecheck - - publishing - - deploying - - deployed - - manifestremoved - - expired - - stopping - - autostopped - - userstopped - - conflict + - POST + - GET 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: [] - updated_at: - description: The time the object was updated - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - 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 + userinfo_endpoint: + description: URL of the OAuth 2.0 UserInfo endpoint. type: string x-nullable: true - UpdateCampaignEqNeqFilter: + 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: - created_at: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - description: + 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 - device_filter: + id: + description: The ID of the parent account. + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - etag: - 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 - finished: - 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 + 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 - name: - type: string - root_manifest_id: - 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: - 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' + 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 + - previous_id + - created + - modified + - start_time + - expires + - firmware_update_count + type: object + PreSharedKey: 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 + 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 - when: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - x-nullable: true - UpdateCampaignInNinFilter: + 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: - type: string - device_filter: - type: string - etag: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - finished: - example: '2017-05-22T12:37:55.576563Z' - format: date-time + required: + - endpoint_name + type: object + Presubscription: + properties: + endpoint-name: + description: Device Management device ID. + example: 015f3850a657000000000001001002ab type: string - id: + endpoint-type: + example: Light type: string - name: + 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 - root_manifest_id: + end_time: + description: Service package end time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - started_at: - 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: + 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 - updated_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 - when: - example: '2017-05-22T12:37:55.576563Z' + 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. + type: string + 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 - UpdateCampaignPage: + 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: - after: - example: null - type: string - data: - example: '[]' - items: - $ref: '#/definitions/UpdateCampaign' - type: array - has_more: - type: boolean - limit: + amount: + description: Amount of quota usage entry. Negative if quota consumption. + format: int64 type: integer - object: - example: list + campaign_name: + description: 'Campaign name of quota usage entry. + + Null if quota usage entry type is not `reservation` or `reservation release`.' type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' + 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: - - ASC - - DESC - example: ASC + - reservation + - reservation_release + - reservation_termination + - package_renewal + - package_creation + - package_termination + - package_tokens_edit type: string - total_count: - type: integer - UpdateCampaignPostRequest: + required: + - amount + - type + - time + type: object + RegisterWebsocketChannel: properties: - 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 - type: string - name: - description: The name for this campaign - example: campaign - maxLength: 128 + 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 - object: - description: The API resource entity - example: update-campaign + address_line2: type: string - root_manifest_id: - example: '00000000000000000000000000000000' - maxLength: 32 + alias: type: string - state: - description: 'DEPRECATED: The state of the campaign (use phase instead)' + business_model: + description: The business model selected for the account to generate the billing + reports. 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: - description: - description: An optional description of the campaign - example: '' - maxLength: 2000 + - active_device_business_model + - api_calls_1_business_model type: string - device_filter: - description: The filter for the devices the campaign is targeting at - example: id__eq=00000000000000000000000000000000 + city: type: string - name: - description: The campaign's name - example: campaign - maxLength: 128 + company: type: string - object: - description: The API resource entity - example: update-campaign + contact: type: string - root_manifest_id: - example: '00000000000000000000000000000000' - maxLength: 32 + country: 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 + customer_subtenant_id: + description: Account tenant ID, valid only for tenants. 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 + email: type: string - x-nullable: true - UpdatedResponse: - description: Represents a response to an update request. - properties: - code: - description: Response code. - example: 200 - format: int32 - type: integer id: - description: Entity ID. - example: 01619571dad80242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - message: - description: A human readable message with detailed info. - example: success + description: Account ID. type: string - object: - description: 'Entity name: ''user'', ''api-key'', ''group'', ''policy'' or - ''account''.' - enum: - - user - - api-key - - group - - policy - - account + phone_number: type: string - request_id: - description: Request ID. - example: 0161991d63150242ac12000600000000 - pattern: '[a-f0-9]{32}' + postal_code: type: string - type: - description: 'Response type: success.' - enum: - - success + state: type: string required: - - code - id - - message - - object - - request_id - - type + - company type: object - UploadChunkInfo: + ReportBillingData: properties: - created_at: &id012 - description: The time the entity was created - example: '2017-05-22T12:37:55.576563Z' + 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 - etag: &id013 - description: API resource entity version - example: '2017-05-22T12:37:58.753425Z' + 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 - 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. + period_start: + description: Billing report start time in RFC3339 date-time with millisecond + accuracy and UTC time zone. + format: date-time type: string - id: - description: The chunk number - example: 1 - type: integer - length: - description: The length of the chunk - example: 1234 + 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 ''upload-info''' - example: upload-info + description: Always set to `error`. + enum: + - error type: string - updated_at: &id014 - description: The time the entity was updated - example: '2017-05-22T12:37:55.576563Z' - format: date-time + request_id: + description: Request ID type: string - upload_job_id: - description: The upload job ID. - example: '00000000000000000000000000000000' + type: + description: Error type. Always set to `report_not_found`. + enum: + - report_not_found type: string + required: + - object + - message + - request_id + - type + - code type: object - UploadChunkInfoPage: + ReportResponse: + description: Billing report response. properties: - after: - example: null + 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 - data: - items: - $ref: '#/definitions/UploadChunkInfo' - type: array - has_more: - type: boolean - limit: - format: int32 - type: integer - object: - example: list + month: + description: Month of requested billing report. + pattern: ^\d{4}-\d{2}$ type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' + object: + description: Billing report response object. Always set to `billing-report`. enum: - - ASC - - DESC - example: ASC + - billing-report type: string - total_count: - format: int32 - type: integer - UploadJob: + 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: + - id + - object + - account + - billing_data + - month + type: object + Resource: properties: - complete: - description: A flag that indicates job completion - example: false + obs: + description: '''Determines whether you can subscribe to changes for this resource. + It can have values `true` or `false`.''' + example: true type: boolean - created_at: *id012 - description: &id025 - description: Human-readable description - example: New Linux update for my devices - maxLength: 2000 - type: string - etag: *id013 - firmware_image_id: - description: ID of the firmware image - empty until the Upload Job is complete - example: '00000000000000000000000000000000' - type: string - id: - description: The upload job ID - example: '00000000000000000000000000000000' - type: string - name: &id026 - description: Human-readable name - example: New Linux update - maxLength: 128 + rt: + description: Application-specific resource type that describes this resource, + created by the [client application](https://www.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 - object: - description: 'Entity name: always ''upload-job''' - example: upload-job + 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 - status: - description: Status of the upload job - example: in_progress + 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://www.pelion.com/docs/device-management/current/resources/resource-model.html).' + example: /sen/light type: string - updated_at: *id014 + required: + - uri type: object - UploadJobPage: + ResourceArray: + items: + $ref: '#/definitions/Resource' + type: array + ResourcePath: + description: A resource URI. + example: /sen/light + type: string + ResourcesData: properties: - after: - example: null + ct: + description: Content type. + example: text/plain type: string - data: - items: - $ref: '#/definitions/UploadJob' - type: array - has_more: + 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 - limit: - format: int32 - type: integer - object: - example: list + path: + description: Resource's URI path. + example: /sen/light type: string - order: - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' - enum: - - ASC - - DESC - example: ASC + rt: + description: 'Application-specific resource type that describes this resource. + It is created by the [client side application](https://www.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 - total_count: - format: int32 - type: integer - UserInfoReq: - description: Represents a user in requests towards Device Management. + type: object + 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: - address: - description: Address. - maxLength: 100 + assertion_endpoint: + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. 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 + 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 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. - type: string x-nullable: true - phone_number: - description: Phone number. - maxLength: 100 + slo_endpoint: + description: URL of the identity provider's SLO endpoint. type: string x-nullable: true - username: - description: A username. - pattern: '[\w\-,._@+=]{4,30}' + sp_entity_id: + description: Entity ID of the service provider. + 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 + type: string + x-nullable: true + 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. + SAML2Req: properties: - account_id: - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + 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 - active_sessions: - description: List of active user sessions. + idp_entity_id: + description: Entity ID of the identity provider. + type: string + idp_x509_certs: + description: List of public X509 certificates of the identity provider. Certificates + must be in PEM format. items: - $ref: '#/definitions/ActiveSession' + type: string type: array - address: - description: Address. - example: 110 Fulbourn Rd, Cambridge, United Kingdom + slo_endpoint: + description: URL of the identity provider's SLO endpoint. type: string - x-nullable: true - created_at: - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' - format: date-time + 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 - creation_time: - description: A timestamp of the user creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 + sso_endpoint: + description: URL of the identity provider's SSO endpoint. + type: string + type: object + 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: + 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://www.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 - 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: + default: v2 + description: 'Serialization type: v2 - specified in NotificationMessage.' + enum: + - v2 + example: v2 type: string - email_verified: - description: A flag indicating whether the user's email address has been verified - or not. - example: 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. + format: date-time + type: string 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 - 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 + description: 'Entity name: always `server-credentials`.' type: string - password: - description: The password when creating a new user. It will be generated when - not present in the request. - example: PZf9eEUH43DAPE9ULINFeuj + server_certificate: + description: PEM-format X.509 server certificate used to validate the server + certificate received during the TLS/DTLS handshake. 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 + server_uri: + description: Server URI that the client connects to. 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: 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 - 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' + 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 type: string - username: - description: A username. - example: admin - pattern: '[\w\-,._@+=]{4,30}' + 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`. + enum: + - service-package-quota type: string - x-nullable: true + quota: + description: Available quota for the service package. + format: int64 + minimum: 0 + type: integer required: - - account_id - - email - - etag - - id - object - - status + - quota type: object - UserInfoRespList: + ServicePackageQuotaHistoryItem: + description: Quota history item. properties: - after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + added: + description: Added time of quota history entry in RFC3339 date-time with millisecond + accuracy and UTC time zone. + 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 + - package_tokens_edit + type: string + 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 + 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. + properties: + after: + 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}' - 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}$).+\@.+ + id: + description: ID of this service package. type: string - etag: - description: API resource entity version. - example: '1' + previous_id: + description: Previous service package ID, or null. 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 - 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}' + - service-packages 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: - - account_id - - email - - etag - - id - object - - user_id - type: object - UserInvitationRespList: + - previous + StatisticsReportListResponse: properties: after: - description: The entity ID to fetch after the given one. - example: 01619571f3c00242ac12000600000000 - pattern: '[a-f0-9]{32}' + description: An offset token for the current page. + example: '01631667477600000000000100100374' type: string data: - description: A list of entities. + description: List of manufacturing statistics. items: - $ref: '#/definitions/UserInvitationResp' + $ref: '#/definitions/StatisticsReportResponse' type: array + end: + example: '2020-03-30T07:30:00.000' + format: date-time + type: string has_more: - description: Flag indicating whether there are more results. + description: Indicates whether additional results are available. 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 (2-1000). Values outside of this + range are set to the closest limit. example: 50 - format: int32 + maximum: 1000 + minimum: 2 type: integer object: - description: 'Entity name: always `list`.' - enum: - - list + description: The API object type. The object type of this API is "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.' - enum: - - ASC - - DESC + 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: - description: The total number of records, if requested. - example: 20 - format: int32 + 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: - - data - - has_more - - limit - object - - total_count + - id + - timestamp + - active_devices + - firmware_updates + - sda_tokens type: object - UserUpdateReq: - description: Represents a user in requests towards Device Management. + StatisticsViewResponse: + description: Contains the statistics view of Device Management usage information. properties: - address: - description: Address. - maxLength: 100 + after: + description: The ID after which to fetch the statistics view. + pattern: '[0-9a-fA-F]{32}' type: string - x-nullable: true - email: - description: The email address. Not allowed to update other user's email address. - pattern: ^(?=.{3,254}$).+\@.+ + data: + description: List of statistics view records. Empty list if no records are + available. + items: + $ref: '#/definitions/StatisticsSeriesRecord' + type: array + has_more: + description: Indicates whether a new statistics view response is available. + type: boolean + limit: + default: 50 + description: Maximum number of statistics view records on a page. + format: int32 + maximum: 1000 + minimum: 2 + type: integer + object: + description: Always `list`. + enum: + - list type: string - x-nullable: true - full_name: - description: The full name of the user. - maxLength: 100 + order: + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' type: string - x-nullable: true - groups: - description: A list of group IDs this user belongs to. Can be updated by the - Account Admin only. + total_count: + 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 + - order + type: object + SubjectList: + description: Represents arrays of user and API key IDs. + properties: + 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 - x-nullable: true - phone_number: - description: Phone number. - maxLength: 100 + users: + description: An array of user IDs. + items: + type: string + type: array + type: object + 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: + 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: + - account + - billing_data + type: object + SubtenantReportAccountContactInfo: + description: Tenant account contact information. + properties: + address_line1: 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. + address_line2: + type: string + alias: + type: string + business_model: + description: The business model selected for the account to generate the billing + reports. enum: - - ENROLLING - - INVITED - - ACTIVE - - RESET - - INACTIVE - example: ACTIVE + - active_device_business_model + - api_calls_1_business_model type: string - x-nullable: true - username: - description: A username. - pattern: '[\w\-,._@+=]{4,30}' + city: type: string - x-nullable: true + 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 - Webhook: + SubtenantServicePackageReport: properties: - headers: - additionalProperties: - type: string - description: The headers (key/value) sent with the notification. Optional. - example: '{"authorization" : "f4b93d6e-4652-4874-82e4-41a3ced0cd56"}' - 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 + quota_usage: + items: + $ref: '#/definitions/QuotaUsageReport' + type: array required: - - url + - quota_usage type: object - WebsocketChannel: + TierHistory: properties: - queueSize: - default: 0 - description: Number of events in the channel's event queue waiting to be delivered. - example: 0 - type: integer - 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. - enum: - - connected - - disconnected - example: disconnected + 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 + updatedAt: + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string type: object - error-response: + TokenRequest: properties: - code: - description: HTTP response code. - format: int32 - type: integer - fields: - description: Details of the error fields. + 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/fields' + $ref: '#/definitions/AudienceItem' + maxItems: 50 + minItems: 1 type: array - message: - description: Description of the error. - type: string - object: - description: Response type, always "error". + 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 - request_id: - description: Request ID. + required: + - grant_type + - aud + - scope + - cnf + type: object + TokenResponse: + properties: + access_token: + description: The generated CWT (CBOR Web Token) access token as a Base64 string. + format: byte type: string - type: - description: Type of error. + granted_until: + description: Grant expiration UTC time RFC3339. + format: date-time type: string type: object - fields: + 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: - message: - description: Error description. + created_at: *id017 + description: + description: The updated notes about the trust anchor. + format: free text + maxLength: 256 + minLength: 1 type: string - name: - description: The field name in the request for which the validation has failed. + 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 - metric: - 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 + TrustedCertificateReq: + description: Represents a trusted certificate in upload 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: 'DEPRECATED: Certificate is used in enrollment mode. Default + value is 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: [] + 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.' + 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 - 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 + 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 - 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 + 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 - 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. + 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 request for which the validation has failed. + type: string + type: object + metric: + 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. The number of failed [Connect + API](https://www.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](/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://www.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 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](https://www.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://www.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://www.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://www.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://www.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 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. + 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, TLS or DTLS packet overhead. It only contains + 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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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://www.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.\n\nDevice Management delivers requests from the\ + \ queue in the order of insertion, one at a time, and not concurrently.\n\n\ + 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.\nIf 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\ + \nFor 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 RESOURCE_NOT_FOUND, + DEVICE_NOT_CONNECTED, MALFORMED_JSON_CONTENT, + + MALFORMED_ASYNC_ID and QUEUE_IS_FULL' + schema: + type: string + 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_FOUNDThe device is not in the device registry. It has either requested\ + \ for register delete\n or it has not connected in time and is expired.
URI_PATH_DOES_NOT_EXISTSThe device does not have requested resource. Check the resource\ + \ path is correct.
" + schema: + type: string + summary: Send an asynchronous request to read, write or post to a device resource. + tags: + - Device data - requests + x-origin: /home/circleci/project/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: /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. + 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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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://www.pelion.com/docs/device-management-api/connect/ + x-origin: /home/circleci/project/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://www.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://www.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://www.pelion.com/docs/device-management-api/connect/ + 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](https://www.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://www.pelion.com/docs/device-management-api/connect/ + x-origin: /home/circleci/project/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://www.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + or use the **write** attribute to set [notification rules](https://www.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://www.pelion.com/docs/device-management-api/connect/ + x-origin: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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://www.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: /home/circleci/project/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: /home/circleci/project/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://www.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html + x-origin: /home/circleci/project/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://www.pelion.com/docs/device-management/current/integrate-web-app/event-notification.html + x-origin: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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://www.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: /home/circleci/project/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 + - 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: /home/circleci/project/notification-service/public/swagger.yaml + /v2/subscriptions: + delete: + description: 'Remove presubscriptions. + + + **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 presubscriptions. + tags: + - Device data - subscriptions + x-origin: /home/circleci/project/device-server/public/swagger.yaml + get: + description: 'Retrieve presubscription data. The server returns a JSON structure. + If there are no presubscribed 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 presubscriptions. + tags: + - Device data - subscriptions + x-origin: /home/circleci/project/device-server/public/swagger.yaml + put: + consumes: + - application/json + description: "A presubscription 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 presubscription 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://www.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://www.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 presubscription 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://www.pelion.com/docs/device-management/current/resources/resource-change-webapp.html)." + operationId: updatePreSubscriptions + parameters: + - description: Array of presubscriptions. + 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 presubscriptions. + tags: + - Device data - subscriptions + x-origin: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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://www.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: /home/circleci/project/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://www.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: /home/circleci/project/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://www.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 presubscription. + + + 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://www.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://www.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: 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 to receive updates about resource changes. + tags: + - Device data - subscriptions + x-origin: /home/circleci/project/device-server/public/swagger.yaml + /v3/access-keys: + get: + description: 'Retrieve an array of access keys. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys \ + + -H ''Authorization: Bearer '' + + ```' + 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: /home/circleci/project/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. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/access-keys/{access_key_id} + \ + + -H ''Authorization: Bearer '' + + ```' + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts: + get: + description: 'Retrieve an array of tenant accounts, optionally filtered by status + and tier level. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \ + + -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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new account. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \ + + -H ''Authorization: Bearer '' \ + + -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"}'' + + ```' + 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`. + +
    + +
  • `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 + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/me: + get: + description: 'Retrieve information about the account. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies + \ + + -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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update the account. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"phone_number": "12345678"}'' + + ```' + 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: /home/circleci/project/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: /home/circleci/project/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: /home/circleci/project/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:** + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ + + -H ''Authorization: Bearer '' + + ```' + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update an account. + + Note: This endpoint is restricted to administrators. + + + **Example:** + + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"phone_number": "12345678"}'' + + ```' + operationId: updateAccount + parameters: + - description: The ID of the account to update. + in: path + name: account_id + required: true + type: string + - description: Details of the account to update. + in: body + name: body + required: true + schema: + $ref: '#/definitions/AccountUpdateRootReq' + 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' + '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: + - Tenant accounts - accounts + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/access-keys: + get: + description: 'Retrieve an array of access keys. + + Note: 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 '' + + ```' + operationId: getAllAccountAccessKeys + 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 + - 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' + '404': + description: An account with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all access keys. + tags: + - Tenant accounts - access keys + x-filter: + application_id: + - eq + status: + - eq + x-origin: /home/circleci/project/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:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/access-keys/{access_key_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAccountAccessKey + parameters: + - description: The ID of the account to retrieve. + in: path + 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: + '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 account or access key with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get access key. + tags: + - Tenant accounts - access keys + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys: + get: + deprecated: true + description: 'Retrieve an array of API keys, optionally filtered by the owner. + + Note: 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 '' + + ```' + operationId: getAllAccountApiKeys + 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 + - 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: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoRespList' + '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: Get all API keys. + 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}/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: /home/circleci/project/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 POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "MyKey1"}'' + + ```' + operationId: createAccountApiKey + parameters: + - description: Account ID. + in: path + 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: + '201': + description: New entity created. + schema: + $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: + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}: + delete: + deprecated: true + description: 'Delete an API key. + + 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} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteAccountApiKey + parameters: + - description: Account ID. + 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. + '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: Delete the API key. + tags: + - Tenant accounts - API keys + 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-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + get: + deprecated: true + 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: Account ID. + 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' + '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: + - 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/{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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + deprecated: true + description: 'Update API key details. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestApiKey25"}'' + + ```' + operationId: updateAccountApiKey + parameters: + - description: Account ID. + 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. + in: body + name: body + required: true + schema: + $ref: '#/definitions/ApiKeyUpdateReq' + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $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: + - Tenant accounts - API keys + 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-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/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/accounts/{account_id}/api-keys/{apikey_id}/groups + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -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: /home/circleci/project/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: /home/circleci/project/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/accounts/{account_id}/api-keys/{apikey_id}/groups + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: addAccountApiKeyToGroups + parameters: + - description: Account ID. + 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: + 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' + '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: + - 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 + deprecated: true + description: 'Add an API key to groups. + + 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/add + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: addAccountApiKeyToListedGroups + parameters: + - 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' + '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: + - 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/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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/api-keys/{apikey_id}/groups/remove: + post: + consumes: + - application/json + deprecated: true + description: 'Remove an API key from groups. + + 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/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + 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: 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 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: /home/circleci/project/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:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret + \ + + -H ''Authorization: Bearer '' + + ```' + 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: + '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: + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications: + get: + description: 'Retrieve an array of applications. - ' - 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. + Note: This endpoint is restricted to administrators. - ' - 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. + **Example:** - ' - 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. + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAllAccountApplications + parameters: + - description: The ID of the account to retrieve. + in: path + name: account_id + required: true 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 + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 + in: query + name: limit + required: false 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 + - description: The entity ID to retrieve after the given one. + in: query + name: after + required: false 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 - type: object - successful-response: - properties: - after: - description: The metric ID included in the request or null. + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + in: query + name: order + required: false 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. + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' + in: query + name: include + required: false 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: - /v2/device-requests/{device-id}: + - 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' + '404': + description: An account with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all applications. + tags: + - Tenant accounts - applications + x-filter: + status: + - eq + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: 'This API provides an interface to asynchronously call methods - on a device. - - - The `async-id` is provided by the client, enabling the client to track the - end-to-end flow with an identifier - - 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 - - [the notification channel](/docs/current/integrate-web-app/event-notification.html). - All responses are sent through the - - currently configured notification channel as an **AsyncIDResponse**. + description: 'Create a new application. + Note: This endpoint is restricted to administrators. - For `GET` methods, values may be fetched from an internal cache, instead of - contacting the device. + **Example:** - See also /v2/endpoints/{device-id}/{resourcePath}. + ``` + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications + -d ''{"name": "MyApplication1"}'' \ - You can write [Notification Rules](../connecting/resource-change-webapp.html#notification-rules) - for a + -H ''Authorization: Bearer '' \ - resource with PUT command. Please see example of the payload below. + -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 + - description: The details of the application to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/Application' + produces: + - application/json + responses: + '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: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}: + delete: + description: 'Delete the application. - { "method": "PUT", "uri": "/5/0/1?lt=10>=60&pmax=120" } + Note: This endpoint is restricted to administrators. - ``` + **Example:** ``` - Example URI: - - POST /v2/device-requests/015f2fa34d310000000000010030036c?async-id=123e4567-e89b-12d3-a456-426655440000 + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} + \ + -H ''Authorization: Bearer '' - Example payload to read value from resource /5/0/1: + ```' + 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: 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: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + get: + description: 'Retrieve details of an application. - { "method": "GET", "uri": "/5/0/1" } + Note: This endpoint is restricted to administrators. - Example payload to set notification rules for resource /5/0/1: + **Example:** - { "method": "PUT", "uri": "/5/0/1?lt=10>=60&pmax=120" } + ``` + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} + \ - Example payload to write value "value1" to resource /5/0/1: + -H ''Authorization: Bearer '' - { "method": "PUT", "uri": "/5/0/1%20?k1=v1&k2=v2%22", "accept": "text/plain", - "content-type": "text/plain", "payload-b64": "dmFsdWUxCg==" } + ```' + 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: Successful operation. + schema: + $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: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + description: 'Update application details. + Note: This endpoint is restricted to administrators. - Immediate response: - 202 Accepted + **Example:** + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id} + \ - Example AsyncIDResponse, delivered via the notification channel: + -H ''Authorization: Bearer '' \ - { "async-responses": [ { "id": "123e4567-e89b-12d3-a456-426655440000", "status": - 200, "payload": "dmFsdWUxCg==", "ct": "text/plain", "max-age": 600 } ] } + -H ''content-type: application/json'' \ - ``` + -d ''{"name": "TestApplication25"}'' - ' - operationId: createAsyncRequest + ```' + operationId: updateAccountApplication parameters: - - description: The device ID generated by Device Management. - format: uuid, 32 hexadecimal characters + - description: The ID of the account to retrieve. in: path - name: device-id + name: account_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}$ + - description: The ID of the application to update. + in: path + name: application_id required: true type: string - - description: Device request to send. + - description: New applicationattributes to store. in: body name: body required: true schema: - $ref: '#/definitions/DeviceRequest' + $ref: '#/definitions/Application' 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 TOO_MANY_REQUESTS + '200': + description: Successful operation. schema: - type: string - 401: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data, for example, invalid display name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': description: Authentication failure. - 404: - description: Device not found. Contains error DEVICE_NOT_FOUND. schema: - type: string - summary: Send an async request to device + $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: - - DeviceRequests - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/device-shared-keys: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_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 associated with the application. + 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}/applications/{application_id}/access-keys + \ - -H "Authorization: Bearer " + -H ''Authorization: Bearer '' ```' - operationId: listPreSharedKeys + operationId: getAllAccountApplicationAccessKeys 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 + - 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: 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 produces: - application/json responses: - 200: - description: List of PSKs. + '200': + description: Successful operation. schema: - $ref: '#/definitions/ListOfPreSharedKeysWithoutSecret' - 400: - description: Bad request. Contains the error as a string, either TOKEN_NOT_FOUND - or INVALID_LIMIT. - summary: List PSKs. + $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: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml + - Tenant accounts - applications + x-filter: + status: + - eq + x-origin: /home/circleci/project/auth/public/iam-identity-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: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml - /v2/device-shared-keys/{endpoint_name}: - delete: - description: 'Remove a PSK. + description: 'Create a new access key for the application. + 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 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: deletePreSharedKey + operationId: createAccountApplicationAccessKey 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 application. + in: path + name: application_id required: true type: string + - description: The details of the access key to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/AccessKey' + 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. + '201': + description: New entity created. schema: - type: string - 401: + $ref: '#/definitions/AccessKey' + '400': + description: Error in input data, for example, missing display name. + schema: + $ref: '#/definitions/ErrorResponse' + '401': description: Authentication failure. - summary: Remove a PSK. - tags: - - PreSharedKeys - x-origin: /home/circleci/project/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. + 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: + - Tenant accounts - applications + x-origin: /home/circleci/project/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. + 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 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: getPreSharedKey + operationId: deleteAccountApplicationAccessKey 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 application. + in: path + 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: Pre-shared key for the device (does not contain secret). + '204': + description: Deleted successfully. + '401': + description: Authentication failure. schema: - $ref: '#/definitions/PreSharedKeyWithoutSecret' - 400: - description: Bad request. Endpoint name validation failed. Contains error - INVALID_ENDPOINT_NAME. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. schema: - type: string - 401: - description: Authentication failure. - 404: - description: The PSK does not exist. - summary: Get a PSK. + $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: - - PreSharedKeys - x-origin: /home/circleci/project/connector-bootstrap/public/swagger.yaml - /v2/endpoints/{device-id}: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: 'Retrieves resources cached by Device Management Connect. This - call does not formulate a message to the device. + 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/v2/endpoints/{device-id} \ + 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: getEndpointResources + operationId: getAccountApplicationAccessKey parameters: - - description: A unique device ID for an 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 + - 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 response with an array of resources. + '200': + description: Successful operation. schema: - items: - $ref: '#/definitions/Resource' - type: array - 404: - description: Endpoint not found. - summary: List the resources on an endpoint. + $ref: '#/definitions/AccessKey' + '401': + description: Authentication failure. + schema: + $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: Get access key. tags: - - Endpoints - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/endpoints/{device-id}/{resourcePath}: - delete: - description: 'A request to delete a resource path must be handled by both Device - Management Client and Device Management - - Connect. - + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + description: 'Update access key details. - 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 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 ''{"name": "TestAccessKey"}'' ```' - operationId: deleteResourcePath + operationId: updateAccountApplicationAccessKey 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: '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 + - 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: - 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 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. - 412: - description: Precondition failed. Device responds with 4.12 CoAP response - code (through AsyncIDResponse). - 413: - description: Request entity too large (through AsyncIDResponse). - 415: - description: Media type is not supported by the endpoint (through AsyncIDResponse). - 429: - description: Cannot make a request at the moment; the queue is full or it - was cleared because the device deregistered, the registration expired - or the device was suspended. - 502: - description: TCP or TLS connection to endpoint cannot be established. - 503: - description: Operation cannot be executed because endpoint is currently - unavailable (through AsyncIDResponse). - 504: - description: Operation cannot be executed due to a time-out from the endpoint - (through AsyncIDResponse). - summary: Delete a resource path. - tags: - - Resources - x-origin: /home/circleci/project/device-server/public/swagger.yaml + $ref: '#/definitions/AccessKey' + '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, application or access key with the specified ID + does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update access key details. + tags: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/groups: get: - description: '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. - + description: 'Retrieve an array of policy groups associated with an application. - 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. + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/endpoints/{device-id}/{resourcePath} + 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: getResourceValue + operationId: getGroupsOfAccountApplication parameters: - - description: 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: '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.' + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 in: query - name: cacheOnly + name: limit 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`.' + type: integer + - description: The entity ID to retrieve after the given one. in: query - name: noResp + name: after required: false - type: boolean + 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: 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. - 412: - description: Precondition failed. Device responded with 4.12 CoAP code (through - AsyncIDResponse). - 413: - description: Request entity too large (through AsyncIDResponse). - 415: - description: Media type is not supported by the endpoint (through AsyncIDResponse). - 429: - description: Cannot make a request at the moment; the queue is full or it - was cleared because the device deregistered, the registration expired - or the device was suspended. - 502: - description: TCP or TLS connection to endpoint cannot be established. - 503: - description: Operation cannot be executed because endpoint is currently - unavailable (through AsyncIDResponse). - 504: - description: Operation cannot be executed due to a timeout from the endpoint - (through AsyncIDResponse). - summary: Read from a resource. - tags: - - Resources - x-origin: /home/circleci/project/device-server/public/swagger.yaml + $ref: '#/definitions/GroupSummaryList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '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: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/groups/add: 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 - description: '[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. + description: 'Add application to groups. - - 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 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 ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: executeOrCreateResource + operationId: addAccountApplicationToGroups 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 to add to the group. in: path - name: resourcePath + name: application_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: A list of IDs of the groups to update. 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/GroupIdList' + produces: + - application/json responses: - 202: - description: Accepted. Returns an asynchronous response ID. + '204': + description: Successful operation. + '400': + description: Error in input data. 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. - 412: - description: Precondition failed. Device responds with 4.12 CoAP response - code (through AsyncIDResponse). - 413: - description: Request entity too large (through AsyncIDResponse). - 415: - description: Media type is not supported by the endpoint (through AsyncIDResponse). - 429: - description: Cannot make a request at the moment; the queue is full or it - was cleared because the device deregistered, the registration expired - or the device was suspended. - 502: - description: TCP or TLS connection to endpoint cannot be established. - 503: - description: Operation cannot be executed because endpoint is currently - unavailable (through AsyncIDResponse). - 504: - description: Operation cannot be executed due to a time-out from the endpoint - (through AsyncIDResponse). - summary: Execute a function on a Resource or create new Object instance. - tags: - - Resources - x-origin: /home/circleci/project/device-server/public/swagger.yaml - put: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '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: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/applications/{application_id}/groups/remove: + 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 - description: '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. - - - 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. + description: 'Remove application from groups. - - Supported content types depend on the device and its resource. Device Management - translates HTTP to equivalent CoAP content type. + Note: This endpoint is restricted to administrators. **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 + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/applications/{application_id}/groups/remove \ - -H "content-type: text/plain" \ + -H ''Authorization: Bearer '' \ - -H ''Authorization: Bearer '' \ + -H ''content-type: application/json'' \ - -d ''1'' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: updateResourceValue + operationId: removeAccountApplicationFromGroups 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: Resource URL. + - description: The ID of the application to remove from the group. in: path - name: resourcePath + name: application_id required: true type: string - - description: The value to set to the resource. + - description: A list of IDs of the 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 + $ref: '#/definitions/GroupIdList' + produces: + - application/json responses: - 202: - description: Accepted. Returns an asynchronous response ID. + '204': + description: Successful operation. + '400': + description: Error in input data, for example, invalid group 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. - 412: - description: Precondition failed. Device responds with 4.12 CoAP response - code (through AsyncIDResponse). - 413: - description: Request entity too large (through AsyncIDResponse). - 415: - description: Media type is not supported by the endpoint (through AsyncIDResponse). - 429: - description: Cannot make a request at the moment; the queue is full or it - was cleared because the device deregistered, the registration expired - or the device was suspended. - 502: - description: TCP or TLS connection to endpoint cannot be established. - 503: - description: Operation cannot be executed because endpoint is currently - unavailable (through AsyncIDResponse). - 504: - description: Operation cannot be executed due to a time-out from the endpoint - (through AsyncIDResponse). - summary: Write to a Resource or use write-attributes (notification rules) for - a Resource. - tags: - - Resources - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/callback: + $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 that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove application from groups. + tags: + - Tenant accounts - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors: delete: - description: 'Deletes the callback URL. + description: 'Delete account branding colors for all themes. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example usage:** - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/callback - \ + `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 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. + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors/dark: + delete: + description: 'Delete account dark theme branding colors. - -H ''Authorization: Bearer '' + Note: This endpoint is restricted to administrators. - ```' - operationId: deregisterWebhook + + **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: &id017 - description: Successfully deleted. - 401: &id015 - description: Unauthorized. - 403: &id016 - description: Forbidden. The authorization token used is not an API key. - 404: - description: Callback URL does not exist. - summary: Delete callback URL. + '204': + description: Colors have been deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account or branding colors not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete colors in the dark theme. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: 'Shows the current callback URL if it exists. + 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/v2/notification/callback \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getWebhook + operationId: getAccountDarkColors + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string produces: - application/json responses: - 200: - description: URL found. + '200': + description: Successful operation. schema: - $ref: '#/definitions/Webhook' - 401: *id015 - 403: *id016 - 404: - description: The callback URL does not exist. - summary: Check callback URL. + $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: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml put: consumes: - application/json - description: 'Register a URL to which the server should deliver notifications - of the subscribed resource changes. To push notifications, you must 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, defined by the client with a subscription server message. - The given URL should 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 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 API key-specific. - - - One 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. - - - **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. - - - **Expiration of a callback URL:** - - - A 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). - - - **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 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. - - - **Example:** - - - 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. - - - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/callback \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{ - - "url": "{callback-url}", - - "headers": {"authorization" : "f4b93d6e-4652-4874-82e4-41a3ced0cd56"} - - }'' - - ```' - operationId: registerWebhook + 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: 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: List of branding colors. 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: *id015 - 403: *id016 - 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 + items: + $ref: '#/definitions/BrandingColorUpdate' + type: array + produces: + - application/json responses: - 200: - description: Success. + '204': + description: Colors have been set successfully. + '400': + description: Error in input data format. schema: - $ref: '#/definitions/ChannelMetadata' - 404: - description: Channel was not found. - summary: Get channel metadata. + $ref: '#/definitions/ErrorResponse' + '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: Updates an array of dark theme branding colors. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/pull: + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-colors/dark/{reference}: 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. + description: 'Resets the branding color to its dark theme default. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/pull \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteLongPollChannel + operationId: resetAccountDarkColor + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - description: The name of the branding color. + enum: *id001 + in: path + name: reference + required: true + type: string + produces: + - application/json 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: *id015 - summary: Delete notification Long Poll channel. + '204': + description: Deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Color or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Reset branding color to default. tags: - - Notifications - x-deprecation: - comment: Long polling is deprecated and should be used for development purposes - only. - end_of_life_at: '2019-11-01T00:00:00+00:00' - issued_at: '2017-02-10T15:23:00+00:00' - links: - - cloud.mbed.com/integrate-web-app/event-notification.html - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-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 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. + description: 'Retrieve the requested dark theme branding color. + Note: This endpoint is restricted to administrators. - 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. + **Example:** - **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**. + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} + \ + + -H ''Authorization: Bearer '' + ```' + operationId: getAccountDarkColor + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - description: The name of the branding color. + enum: *id001 + in: path + name: reference + required: true + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/BrandingColor' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Color or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get dark theme branding color. + 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. - 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 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 ''{ "color": "#f3f93e" }'' ```' - operationId: longPollNotifications + operationId: setAccountDarkColor + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - 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/BrandingColor' produces: - application/json responses: - 200: - description: Success. + '200': + description: Color has been set successfully. schema: - $ref: '#/definitions/NotificationMessage' - 204: - description: No new notifications. - 400: - description: Other type of channel already exists. - 401: *id015 - 409: - description: Conflict. Long poll request exists already. - 410: - description: Pull channnel 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/BrandingColor' + '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: Color or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Updates a dark theme branding color. tags: - - Notifications - x-deprecation: - comment: Long polling is deprecated and should be used for development purposes - only. - end_of_life_at: '2019-11-01T00:00:00+00:00' - issued_at: '2017-02-10T15:23:00+00:00' - links: - - cloud.mbed.com/integrate-web-app/event-notification.html - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/websocket: + - 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: '(PREVIEW) Delete a notification websocket channel bound to the - API key. This is required to change the channel from websocket to another - type. - + description: 'Delete account light theme branding colors. - **Example:** - - - ``` + Note: This endpoint is restricted to administrators. - curl -X DELETE https://api.us-east-1.mbedcloud.com/v2/notification/websocket - \ - -H ''Authorization: Bearer '' + **Example usage:** - ```' - operationId: deleteWebsocket + `curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountLightColors + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + produces: + - application/json responses: - 204: *id017 - 401: *id015 - 403: *id016 - 404: - description: Websocket channel doesn't exist. - summary: (PREVIEW) Delete websocket channel. + '204': + description: Colors have been deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account or branding colors not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete colors in the light theme. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: '(PREVIEW) Returns 200 with websocket connection status, if websocket - channel exists. + description: 'Retrieve light 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/v2/notification/websocket + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getWebsocket + operationId: getAccountLightColors + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string produces: - application/json responses: - 200: - description: Websocket found. + '200': + description: Successful operation. schema: - $ref: '#/definitions/WebsocketChannel' - 401: *id015 - 403: *id016 - 404: - description: No channel has been registered. - summary: (PREVIEW) Get websocket channel information. + $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: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-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). - - - 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. - - - **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. - + 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: 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: + '204': + description: Colors have been set successfully. + '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: Account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Updates an array of light theme branding colors. + 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 to its light theme default. - More about [notification sending logic](../integrate-web-app/event-notification.html#notification-sending-logic). + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v2/notification/websocket + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: registerWebsocket + operationId: resetAccountLightColor + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - description: The name of the branding color. + enum: *id001 + in: path + name: reference + required: true + type: string + produces: + - application/json 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. + '204': + description: Deleted successfully. + '401': + description: Authentication failure. schema: - $ref: '#/definitions/WebsocketChannel' - 201: - description: Channel succesfully registered. + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. schema: - $ref: '#/definitions/WebsocketChannel' - 400: - description: Other type of channel already exists. - 401: *id015 - 403: *id016 - summary: (PREVIEW) Register a websocket channel. + $ref: '#/definitions/ErrorResponse' + '404': + description: Color or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Reset branding color to default. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/notification/websocket-connect: - get: - description: ' - - (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. - - - Once the socket has been opened, it may be closed with one of the following - status codes. + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + get: + description: 'Retrieve the requested light theme branding color. + Note: This endpoint is restricted to administrators. - | Code | Description | - |------|-------------| + **Example:** - |**1000**|Socket closed by the client.| + ``` - |**1001**|Going away. Set when another socket was opened on the used channel, - or if the channel was deleted with a REST call, or if the server is shutting - down.| + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} - |**1006**|Abnormal loss of connection. This code is never set by the service.| + -H ''Authorization: Bearer '' - |**1008**|Policy violation. Set when the API key is missing or invalid.| + ```' + operationId: getAccountLightColor + parameters: + - description: The ID of the account. + in: path + name: account_id + required: true + type: string + - description: The name of the branding color. + enum: *id001 + in: path + name: reference + required: true + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/BrandingColor' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Color or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get light theme branding color. + tags: + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update a light theme branding color. - |**1011**|Unexpected condition. Socket is closed with this status at an attempt - to open a socket to an unexisting channel (without a prior REST PUT). This - code is also used to indicate closing socket for any other unexpected condition - in the server.| + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/notification/websocket-connect + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id)/branding-colors/light/primary \ - -H "Authorization:Bearer {apikey}" \ - - -H "Connection:upgrade" \ - - -H "Upgrade:websocket" \ - - -H "Sec-WebSocket-Version: 13" \ + -H ''Authorization: Bearer '' \ - -H "Sec-WebSocket-Key: {base64nonce}" \ + -H ''content-type: application/json'' \ - -N -I + -d ''{ "color": "purple" }'' ```' - operationId: connectWebsocket + operationId: setAccountLightColor parameters: - - default: Upgrade - in: header - name: Connection - required: true - type: string - - default: websocket - in: header - name: Upgrade + - description: The ID of the account. + in: path + name: account_id 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}"`. - - 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 + - description: The name of the branding color. + enum: *id001 + in: path + name: reference 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 branding color. + in: body + name: body required: true - type: string + schema: + $ref: '#/definitions/BrandingColor' + produces: + - application/json responses: - 101: - description: Switching protocols. - 426: - description: Upgrade required. Connect and/or Upgrade headers missing. - summary: (PREVIEW) Open the websocket. + '200': + description: Color set successfully. + schema: + $ref: '#/definitions/BrandingColor' + '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: Color or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Updates light theme branding color. tags: - - Notifications - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v2/subscriptions: + - Tenant user interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/branding-images: delete: - description: 'Removes pre-subscriptions. + description: 'Delete account branding images for all themes. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example usage:** - 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}/branding-images + -H ''Authorization: Bearer ''`' + operationId: deleteAllAccountImages + parameters: + - description: The ID of the account. + 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. - -H ''Authorization: Bearer '' + Note: This endpoint is restricted to administrators. - ```' - operationId: deletePreSubscriptions + + **Example usage:** + + `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: account_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: 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 images in the dark theme. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml + - Tenant user interface configuration - images + x-origin: /home/circleci/project/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 the metadata of all dark theme branding images. + + 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}/branding-images/dark + \ - -H ''Authorization: Bearer '' + -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 API key.' - summary: Get pre-subscriptions. - tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/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 + operationId: getAllAccountDarkImageData parameters: - - description: Array of pre-subscriptions. - in: body - name: presubsription + - description: The ID of the account. + in: path + name: account_id required: true - schema: - $ref: '#/definitions/PresubscriptionArray' + type: string produces: - - text/plain + - application/json 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 + '200': + description: Successful operation. + schema: + $ref: '#/definitions/BrandingImageList' + '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 metadata of all dark theme images. 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. + - 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. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE 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}/branding-images/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteEndpointSubscriptions + operationId: getAccountDarkImageData 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. in: path - name: device-id + 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: Successfully removed. - summary: Delete subscriptions from an endpoint. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/BrandingImage' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Unknown image reference, or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get metadata of a dark theme image. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - get: - description: 'Lists all subscribed resources from a single endpoint. + - 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: + post: + description: 'Revert an account branding image to dark theme default. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v2/subscriptions/{device-id} + 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 '' ```' - operationId: getEndpointSubscriptions + operationId: clearAccountDarkImage 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. in: path - name: device-id + 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: - - text/uri-list + - application/json responses: - 200: - description: List of subscribed resources. + '204': + description: Image reverted successfully. + '401': + description: Authentication failure. 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/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Unknown image reference, or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Revert an image to dark theme default. 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 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. + + 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}/branding-images/dark/{reference}/upload \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' + + -H ''content-type: image/png'' --data-binary ''@myimage.png'' ```' - operationId: deleteResourceSubscription + operationId: uploadAccountDarkImage 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. in: path - name: device-id + name: account_id required: true type: string - - description: The resource URL. + - description: Name of the branding images (icon or picture). + enum: *id026 in: path - name: resourcePath + 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: - 204: - description: Successfully removed subscription. - 404: - description: Endpoint or resource not found. - summary: Remove a subscription. + '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: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Unknown image reference, or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Upload a dark theme image. tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - get: - operationId: checkResourceSubscription + - 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: + post: + consumes: + - 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: 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. in: path - name: device-id + name: account_id required: true type: string - - description: The resource URL. + - description: Name of the branding images (icon or picture). + enum: *id026 in: path - name: resourcePath + 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: - 200: - description: Resource is subscribed. - 404: - description: Resource is not subscribed. - summary: Read subscription status + '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: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Unknown image reference. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Upload a dark theme image. 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. - + - 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. - **Notification rules** + Note: This endpoint is restricted to administrators. - 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). + **Example usage:** + `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 + 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 images in the light theme. + tags: + - Tenant user interface configuration - images + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + get: + description: 'Retrieve the metadata of all light theme branding images. - 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 GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: addResourceSubscription + operationId: getAllAccountLightImageData 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. in: path - name: resourcePath + name: account_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. + '200': + description: Successful operation. schema: - $ref: '#/definitions/AsyncID' - 400: - description: Bad request, malformed content. - 404: - description: Endpoint or its resource not found. - 412: - description: Precondition failed. Cannot make a subscription for a non-observable - resource (through AsyncIDResponse). - 429: - description: Cannot make a request at the moment; the queue is full or it - was cleared because the device deregistered, the registration expired - or the device was suspended. - 502: - description: 'Subscription failed: endpoint not connected.' - 503: - description: Subscription could not be established because the endpoint - is currently unavailable (through AsyncIDResponse). - 504: - description: Subscription could not be established due to a time-out from - the endpoint (through AsyncIDResponse). - summary: Subscribe to a resource path. - tags: - - Subscriptions - x-origin: /home/circleci/project/device-server/public/swagger.yaml - /v3/accounts: + $ref: '#/definitions/BrandingImageList' + '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 metadata of all light theme images. + 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}: get: - description: 'Returns an array of account objects, optionally filtered by status - and tier level. + description: 'Retrieve metadata for one account light theme branding image. + + 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}/branding-images/light/{reference} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccounts + operationId: getAccountLightImageData 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.' - in: query - name: include - required: false - type: string - - description: 'Format information for the query response. Supported: format=breakdown.' - in: query - name: format - required: false + - description: The ID of the account. + in: path + name: account_id + required: true type: string - - description: Property name returned from account-specific properties. - in: query - name: properties - required: false + - description: Name of the branding images (icon or picture). + enum: *id026 + in: path + name: reference + required: true type: string produces: - application/json @@ -8586,7 +14489,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/AccountInfoList' + $ref: '#/definitions/BrandingImage' '401': description: Authentication failure. schema: @@ -8595,81 +14498,47 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all accounts. + '404': + description: Unknown image reference, or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get metadata of a light theme image. tags: - - Tenant accounts - accounts - x-filter: - country: - - like - end_market: - - eq - parent: - - eq - status: - - eq - - in - - nin - tier: - - eq + - 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: - consumes: - - application/json - description: 'Create a new account. - - - **Example:** + description: 'Revert an account branding image to light theme default. - ``` + Note: This endpoint is restricted to administrators. - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts \ - -H ''Authorization: Bearer '' \ + **Example:** - -H ''content-type: application/json'' \ + ```curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/light/{reference}/clear + \ - -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"}'' + -H ''Authorization: Bearer '' ```' - operationId: createAccount + operationId: clearAccountLightImage parameters: - - description: Details of the account to create. - in: body - name: body + - 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 - 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 produces: - application/json responses: - '201': - description: Successful operation. - schema: - $ref: '#/definitions/AccountInfo' - '400': - description: Error in input data, for example, invalid username. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Image reverted successfully. '401': description: Authentication failure. schema: @@ -8678,45 +14547,74 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new account. + '404': + description: Unknown image reference, or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Revert an image to light theme default. tags: - - Tenant accounts - accounts + - Tenant user interface configuration - images x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/me: - get: - description: 'Retrieve detailed information about the account. + /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/me?include=policies + 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: getMyAccountInfo + operationId: uploadAccountLightImage parameters: - - description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts.' - in: query - name: include - required: false + - description: The ID of the account. + in: path + name: account_id + required: true type: string - - description: Property name to return from account-specific properties. - in: query - name: properties - required: false + - 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 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/AccountInfo' + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -8725,46 +14623,56 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get account info. + '404': + description: Unknown image reference, or account not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Upload a light theme image. tags: - - Account - profile + - Tenant user interface configuration - images x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + /v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart: + post: consumes: - - application/json - description: 'Update the account. - - - **Example:** - - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/me \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"phone_number": "12345678"}'' + - multipart/form-data + description: 'Upload a new account branding image as form data in PNG or JPEG + format. - ```' - operationId: updateMyAccount + Note: This endpoint is restricted to administrators.' + operationId: uploadAccountLightImageMultipart parameters: - - description: Details of the account to update. - in: body - name: body + - description: The ID of the account. + in: path + name: account_id required: true - schema: - $ref: '#/definitions/AccountUpdateReq' + 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 as multipart form data. + in: formData + name: image + required: true + type: file 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/AccountInfo' + $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': @@ -8775,15 +14683,28 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates attributes of the account. + '404': + description: Unknown image reference. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Upload a light theme image. tags: - - Account - profile + - Tenant user interface configuration - images x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/me/notifications: + /v3/accounts/{account_id}/identity-providers: get: - description: Retrieve notifications for an account. - operationId: getNofificationEntries + consumes: + - application/json + description: 'Retrieve an array of identity providers. + + 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 - default: 50 description: The number of results to return (2-1000). Default 50. format: int32 @@ -8791,81 +14712,31 @@ 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 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 notification events for an account. - tags: - - Account - email notification logs - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}: - get: - description: 'Retrieve detailed information about an account. - - - **Example:** - - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - - -H ''Authorization: Bearer '' - - ```' - operationId: getAccountInfo - parameters: - - description: The ID of the account to fetch. - in: path - name: account_id - required: true - type: string - description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts.' + total_count.' 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' + $ref: '#/definitions/IdentityProviderList' '401': description: Authentication failure. schema: @@ -8875,55 +14746,56 @@ 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: Get all identity providers. tags: - - Tenant accounts - accounts + - Tenant accounts - identity providers x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + post: consumes: - application/json - description: 'Update an account. - - - **Example:** - - - ``` - - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"phone_number": "12345678"}'' + description: 'Create a new identity provider. - ```' - operationId: updateAccount + Note: This endpoint is restricted to administrators.' + operationId: createAccountIdentityProvider parameters: - - description: The ID of the account to update. + - description: Account ID. in: path name: account_id required: true type: string - - description: Details of the account to update. + - 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/AccountUpdateRootReq' + $ref: '#/definitions/IdentityProviderCreationReq' produces: - application/json responses: - '200': - description: Successful operation. + '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/AccountInfo' + $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': @@ -8935,144 +14807,74 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account with the given ID not found. + description: Account not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Update attributes of an existing account. + summary: Create a new identity provider. tags: - - Tenant accounts - accounts + - Tenant accounts - identity providers x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys: - get: - description: '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 '' + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}: + delete: + description: 'Delete an identity provider by ID. - ```' - operationId: getAllAccountApiKeys + Note: This endpoint is restricted to administrators.' + operationId: deleteAccountIdentityProvider 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: 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 ID of the identity provider to delete. + in: path + name: identity_provider_id + required: true type: string produces: - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoRespList' + responses: + '204': + 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: An account with the given ID does not exist. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all API keys. + summary: Delete an identity provider by ID. tags: - - Tenant accounts - API keys - x-filter: - key: - - eq - owner: - - eq + - Tenant accounts - identity providers x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - 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. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"name": "MyKey1"}'' + get: + description: 'Retrieve an identity provider. - ```' - operationId: createAccountApiKey + Note: This endpoint is restricted to administrators.' + operationId: getAccountIdentityProvider parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: Details of the API key to create. - in: body - name: body + - description: The ID of the identity provider to retrieve. + in: path + name: identity_provider_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. + '200': + description: Successful operation. schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/IdentityProviderInfo' '401': description: Authentication failure. schema: @@ -9082,45 +14884,56 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the given ID does not exist. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new API key. + summary: Get an identity provider. tags: - - Tenant accounts - API keys + - Tenant accounts - identity providers x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}: - delete: - description: '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 '' + put: + consumes: + - application/json + description: 'Update an existing identity provider. - ```' - operationId: deleteAccountApiKey + Note: This endpoint is restricted to administrators.' + operationId: updateAccountIdentityProvider parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the API key to delete. + - description: The ID of the identity provider to update. in: path - name: apikey_id + 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: - '204': - description: Deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/IdentityProviderInfo' + '400': + description: Error in input data, for example, missing name. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -9130,26 +14943,30 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete the API key. + summary: Update an existing identity provider. tags: - - Tenant accounts - API keys + - Tenant accounts - identity providers x-origin: /home/circleci/project/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 + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate: + post: + consumes: + - application/json + description: 'Delete a service provider certificate. + + Note: This endpoint is restricted to administrators.' + operationId: deleteAccountSpCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the API key to retrieve. + - description: The ID of the identity provider whose certificate should be deleted. in: path - name: apikey_id + name: identity_provider_id required: true type: string produces: @@ -9157,8 +14974,12 @@ paths: responses: '200': description: Successful operation. + headers: + Content-Location: + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/IdentityProviderInfo' '401': description: Authentication failure. schema: @@ -9168,58 +14989,52 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API key details. + summary: Delete the service provider certificate. tags: - - Tenant accounts - API keys + - Tenant accounts - identity providers x-origin: /home/circleci/project/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"}'' + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate: + post: + consumes: + - application/json + description: 'Generate a new service provider certificate. - ```' - operationId: updateAccountApiKey + Note: This endpoint is restricted to administrators.' + operationId: generateAccountSpCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the API key to update. + - description: The ID of the identity provider for which to generate a certificate. in: path - name: apikey_id + name: identity_provider_id required: true type: string - - description: New API key attributes to be stored. + - description: Details of the service provider certificate to be generated. in: body name: body required: true schema: - $ref: '#/definitions/ApiKeyUpdateReq' + $ref: '#/definitions/CertificateGenerationReq' 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/ApiKeyInfoResp' + $ref: '#/definitions/IdentityProviderInfo' '400': - description: Error in input data, for example, missing display name. + description: Error in input data, for example, invalid certificate validity + value. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9231,63 +15046,46 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account ID or API key with the specified ID does not exist. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Update API key details. + summary: Generate a new service provider certificate. tags: - - Tenant accounts - API keys + - Tenant accounts - identity providers x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/api-keys/{apikey_id}/groups: - delete: + /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks: + post: consumes: - application/json - description: '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 '' \ - - -H ''content-type: application/json'' \ - - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + description: 'Refresh an OIDC IdP''s signing keys. - ```' - operationId: removeAccountApiKeyFromGroups + Note: This endpoint is restricted to administrators.' + operationId: refreshAccountJwks parameters: - - description: Account ID. + - description: The ID of the account to be managed. in: path name: account_id required: true type: string - - description: The ID of the API key to remove from the group. + - description: The ID of the identity provider for which to refresh the signing + keys. in: path - name: apikey_id + name: identity_provider_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. + headers: + Content-Location: + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/IdentityProviderInfo' '400': - description: Error in input data. + description: Not an OIDC IdP or JWKS URI is unspecified. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9299,71 +15097,81 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: An account or identity provider not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + summary: Refresh the OIDC signing keys. tags: - - Tenant accounts - API keys + - Tenant accounts - identity providers x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/accounts/{account_id}/limitations: get: - description: '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 '' + description: 'Retrieve an array of entitlement limitations. - ```' - operationId: getGroupsOfAccountApikey + Note: This endpoint is restricted to administrators.' + operationId: aggregatorGetAccountLimitations 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 + - description: The ID of the account. + in: path + name: account_id + required: true type: string - - description: 'Comma-separated additional data to return. Currently supported: - total_count.' + - description: Filter for finding account limitations by inheritance. True returns + also inherited limitations. False returns only non-inherited ones. in: query - name: include + name: inherited__eq required: false type: string - - description: Account ID. + produces: + - application/json + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/AccountLimitationList' + '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 entitlement limitations. + tags: + - Tenant accounts - entitlement 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: 'Retrieve an entitlement limitation. + + 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 API key. + - description: The ID of the limitation to be fetched. in: path - name: apikey_id + name: limitation_id required: true type: string produces: - application/json responses: '200': - description: Successful operation. + description: successful operation schema: - $ref: '#/definitions/GroupSummaryList' + $ref: '#/definitions/AccountLimitation' '401': description: Authentication failure. schema: @@ -9373,62 +15181,53 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or API key with the specified ID does not exist. + description: Limitation or account with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups associated with the API key. + summary: Get an entitlement limitation. tags: - - Tenant accounts - API keys + - Tenant accounts - entitlement limitations x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: - consumes: - - application/json - description: '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 '' \ - - -H ''content-type: application/json'' \ - - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + /v3/accounts/{account_id}/notifications: + get: + description: 'Retrieve an array of email notification logs. - ```' - operationId: addAccountApiKeyToGroups + Note: This endpoint is restricted to administrators.' + operationId: getAccountNofificationEntries parameters: - description: Account ID. 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 + - 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: A list of IDs of 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/UpdatedResponse' + $ref: '#/definitions/NotificationEntryList' '400': - description: Error in input data. + description: Error in input data, or missing or invalid parameters. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9436,100 +15235,122 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + 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. + description: An account with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key to a list of groups. + summary: Get email notifications. tags: - - Tenant accounts - API keys + - Tenant accounts - email notification logs 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. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys/{apikey_id}/reset-secret - \ - - -H ''Authorization: Bearer '' + /v3/accounts/{account_id}/notifications/{notification_id}: + get: + description: 'Retrieve an email notifications log entry. - ```' - operationId: resetAccountApiKeySecret + Note: This endpoint is restricted to administrators.' + operationId: getAccountNofificationEntry parameters: - - description: Account ID. + - description: The ID of the account for which this notification should be retrieved. in: path name: account_id required: true type: string - - description: The ID of the API key to reset. + - description: The ID of the notification entry to be retrieved. in: path - name: apikey_id + name: notification_id required: true type: string produces: - application/json responses: '200': - description: Successful operation. + description: successful operation schema: - $ref: '#/definitions/ApiKeyInfoResp' + $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: An account or API key with the specified ID does not exist. + description: No entry found for the given ID. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset the secret key. + summary: Get an email notification. tags: - - Tenant accounts - API keys + - Tenant accounts - email notification logs x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/dark: + /v3/accounts/{account_id}/policy-groups: get: - description: 'Retrieve dark theme branding colors for an account. + description: 'Retrieve an array of policy groups. + + 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 GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountDarkColors + operationId: getAllAccountGroups 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 + - 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/BrandingColorList' + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -9539,42 +15360,60 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get dark theme branding colors. + summary: Get policy groups. tags: - - Tenant user interface configuration - colors + - Tenant accounts - policy groups + x-filter: + name: + - eq x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + 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 + 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}/policy-groups + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "MyGroup1"}'' + + ```' + operationId: createAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: List of branding colors. + - description: Details of the group to create. in: body name: body required: true schema: - items: - $ref: '#/definitions/BrandingColor' - type: array + $ref: '#/definitions/GroupCreationInfo' produces: - application/json responses: - '204': - description: Colors have been set successfully. + '201': + description: New entity created. + schema: + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data format. + description: Error in input data, for example, invalid group name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9586,80 +15425,93 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates an array of dark theme branding colors. + '409': + description: A group with that name already exists. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new group. tags: - - Tenant user interface configuration - colors + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/dark/{reference}: + /v3/accounts/{account_id}/policy-groups/{group_id}: delete: - description: 'Resets the branding color of a tenant account to its dark theme - default. + 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}/branding-colors/dark/{reference} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: resetAccountDarkColor + operationId: deleteAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id018 + - description: The ID of the group to delete. in: path - name: reference + name: group_id required: true type: string produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/BrandingColor' + '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: Color or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset branding color to default. + summary: Delete a group. tags: - - Tenant user interface configuration - colors + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - 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```" - operationId: getAccountDarkColor + 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: Account ID. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id018 + - description: The ID of the group to retrieve. in: path - name: reference + name: group_id required: true type: string produces: @@ -9668,7 +15520,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/GroupSummary' '401': description: Authentication failure. schema: @@ -9678,61 +15530,63 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get dark theme branding color. + summary: Get policy group. tags: - - Tenant user interface configuration - colors + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + post: consumes: - application/json - description: 'Update a dark theme branding color of a tenant account. + description: 'Add users and API keys to groups. + + 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 POST 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'' \ - -d ''{ "color": "#f3f93e" }'' + -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' ```' - operationId: setAccountDarkColor + operationId: addSubjectsToAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id018 + - description: The ID of the group to update. in: path - name: reference + name: group_id required: true type: string - - description: The branding color. + - description: A list of users and API keys to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': - description: Color has been set successfully. + description: Successful operation. schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data format. + description: Error in input data, for example, the user or API key does + not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9744,42 +15598,68 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates a dark theme branding color. + '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 user interface configuration - colors + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-colors/light: - get: - description: 'Retrieve light theme branding colors for an account. + put: + consumes: + - application/json + description: 'Update a group name. + + 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 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'' \ + + -d ''{"name": "TestGroup2"}'' ```' - operationId: getAccountLightColors + operationId: updateAccountGroupName 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: 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/BrandingColorList' + $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: @@ -9789,42 +15669,65 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get light theme branding colors. + summary: Update the group name. tags: - - Tenant user interface configuration - colors + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys: + delete: 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 + 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: List of branding colors. + - description: The ID of the group to remove API keys from. + 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: - items: - $ref: '#/definitions/BrandingColor' - type: array + $ref: '#/definitions/SubjectList' produces: - application/json responses: - '204': - description: Colors have been set successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data format. + description: Error in input data, for example, the array of API keys is + missing. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -9836,49 +15739,79 @@ 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: Updates an array of light theme branding colors. + summary: Remove API keys from a group. tags: - - Tenant user interface configuration - colors + - 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 - /v3/accounts/{account_id}/branding-colors/light/{reference}: - delete: - description: 'Resets the branding color of a tenant account to its light theme - default. + 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 DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/light/{reference} + 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 '' ```' - operationId: resetAccountLightColor + operationId: getApiKeysOfAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id018 + - description: The ID of the group to retrieve API keys for. in: path - name: reference + 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/BrandingColor' + $ref: '#/definitions/ApiKeyInfoRespList' '401': description: Authentication failure. schema: @@ -9888,46 +15821,64 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Reset branding color to default. + summary: Get API keys in a group. tags: - - Tenant user interface configuration - colors + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'Retrieve the requested light theme branding color. + post: + deprecated: true + description: 'Add API keys to account groups. + + 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/{reference} + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountLightColor + operationId: addApiKeysToAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id018 + - description: The ID of the group to retrieve API keys for. in: path - name: reference + 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/BrandingColor' + $ref: '#/definitions/GroupSummary' + '400': + description: Successful operation. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -9937,61 +15888,71 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get light theme branding color. + '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 user interface configuration - colors + - 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 - put: - consumes: - - application/json - description: 'Update a light theme branding color of a tenant account. + /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/add: + post: + deprecated: true + description: 'Add API keys to account groups. + + Note: 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 + 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 ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{ "color": "purple" }'' + -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' ```' - operationId: setAccountLightColor + operationId: addListedApiKeysToAccountGroup parameters: - - description: Account ID. + - description: The ID of the account. in: path name: account_id required: true type: string - - description: The name of the branding color. - enum: *id018 + - description: The ID of the group to remove API keys from. in: path - name: reference + name: group_id required: true type: string - - description: The branding color. + - description: A list of API keys to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': - description: Color set successfully. + description: Successful operation. schema: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data format. + description: Successful operation. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10003,42 +15964,76 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Color or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Updates light theme branding color. + '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 user interface configuration - colors + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark: - get: - description: 'Retrieve the metadata of all dark theme branding images. + /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys/remove: + post: + consumes: + - application/json + deprecated: true + description: 'Remove API keys from groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark + 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 ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' ```' - operationId: getAllAccountDarkImageData + operationId: removeListedApiKeysFromAccountGroup 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 remove API keys from. + 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: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingImageList' + $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: @@ -10048,48 +16043,77 @@ 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 metadata of all dark theme images. + summary: Remove API keys from a group. tags: - - Tenant user interface configuration - images + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}: + /v3/accounts/{account_id}/policy-groups/{group_id}/applications: get: - description: 'Retrieve metadata of one account dark theme branding image. + 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}/branding-images/dark/{reference} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountDarkImageData + operationId: getApplicationsOfAccountGroup parameters: - - description: Account ID. + - 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: *id019 + - description: The ID of the group to retrieve applications for. in: path - name: reference + 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/BrandingImage' + $ref: '#/definitions/ApplicationList' '401': description: Authentication failure. schema: @@ -10099,46 +16123,61 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get metadata of a dark theme image. + summary: Get applications in a group. tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}/clear: + /v3/accounts/{account_id}/policy-groups/{group_id}/applications/add: post: - description: 'Revert an account branding image to dark theme default. + description: 'Add applications to account groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/clear + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/add \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' ```' - operationId: clearAccountDarkImage + operationId: addListedApplicationsToAccountGroup parameters: - - description: Account ID. + - 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: *id019 + - description: The ID of the group to add applications to. in: path - name: reference + 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: - '204': - description: Image reverted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Successful operation. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -10148,69 +16187,66 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Revert an image to dark theme default. + '409': + description: The application is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add applications to account group. tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}/upload: + /v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove: post: consumes: - - image/png - - image/jpeg - description: 'Upload a new account dark theme branding image in PNG or JPEG - format. + - application/json + description: 'Remove applications from groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference}/upload + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/applications/remove \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ - -H ''content-type: image/png'' --data-binary ''@myimage.png'' + -H ''content-type: application/json'' \ + + -d ''{"applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' ```' - operationId: uploadAccountDarkImage + operationId: removeListedApplicationsFromAccountGroup parameters: - - description: Account ID. + - 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: *id019 + - description: The ID of the group to remove applications from. in: path - name: reference + name: group_id required: true type: string - - description: The image in PNG or JPEG format. + - description: A list of applications to remove from the group. in: body name: body required: true schema: - $ref: '#/definitions/Image' + $ref: '#/definitions/SubjectList' 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 + '200': + description: Successful operation. 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, the array of applications + is missing. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10222,53 +16258,51 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a dark theme image. + summary: Remove applications from a group. tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart: - post: + /v3/accounts/{account_id}/policy-groups/{group_id}/users: + delete: 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 + 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: Account ID. in: path name: account_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id019 + - description: The ID of the group to remove users from. 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 + - description: A list of users to remove from the group. + in: body + name: body required: true - type: file + schema: + $ref: '#/definitions/SubjectList' 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 + '200': + description: Successful operation. 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, the last user to remove from + Administrators group. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10280,85 +16314,86 @@ paths: 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 dark theme image. + summary: Remove users from a group. tags: - - Tenant user interface configuration - images + - 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 - /v3/accounts/{account_id}/branding-images/light: get: - description: 'Retrieve the metadata of all light theme branding images. + 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}/branding-images/light + 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: getAllAccountLightImageData + operationId: getUsersOfAccountGroup parameters: - description: Account ID. in: path name: account_id required: true type: string - produces: - - application/json - responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/BrandingImageList' - '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 metadata of all light theme images. - 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}: - get: - description: '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 '' - - ```' - operationId: getAccountLightImageData - parameters: - - description: Account ID. + - description: The ID of the group to retrieve users for. in: path - name: account_id + name: group_id required: true type: string - - description: Name of the branding images (icon or picture). - enum: *id019 - 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: 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. + 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: - application/json @@ -10366,7 +16401,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/UserInfoRespList' '401': description: Authentication failure. schema: @@ -10376,44 +16411,64 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get metadata of a light theme image. + summary: Get users in a policy group. tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups + x-filter: + status: + - eq + - in + - nin 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. + 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}/branding-images/light/{reference}/clear + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: clearAccountLightImage + operationId: addUsersToAccountGroup parameters: - - description: Account ID. + - 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: *id019 + - description: The ID of the group to add users to. in: path - name: reference + 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/SubjectList' produces: - application/json responses: - '204': - description: Image reverted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummary' + '400': + description: Successful operation. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -10423,69 +16478,66 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Revert an image to light theme default. + '409': + description: The user is a member of the account group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add users to account group. tags: - - Tenant user interface configuration - images + - 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}/branding-images/light/{reference}/upload: + /v3/accounts/{account_id}/policy-groups/{group_id}/users/add: post: - consumes: - - image/png - - image/jpeg - description: 'Upload a new account light theme branding image in PNG or JPEG - format. + 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}/branding-images/light/{reference}/upload + curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id}/users/add \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: image/png'' --data-binary ''@myimage.png'' + -H ''Authorization: Bearer '' ```' - operationId: uploadAccountLightImage + operationId: addListedUsersToAccountGroup parameters: - - description: Account ID. + - 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: *id019 + - description: The ID of the group to retrieve users for. in: path - name: reference + name: group_id required: true type: string - - description: The image in PNG or JPEG format. + - description: A list of users to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/Image' + $ref: '#/definitions/SubjectList' 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 + '200': + description: Successful operation. schema: - $ref: '#/definitions/BrandingImage' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data format, for example, image is too large. + description: Successful operation. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10497,53 +16549,54 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a light theme image. + '409': + description: The user is a member of the account group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add users to account group. tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart: + /v3/accounts/{account_id}/policy-groups/{group_id}/users/remove: post: consumes: - - multipart/form-data - description: Upload a new account branding image as form data in PNG or JPEG - format. - operationId: uploadAccountLightImageMultipart + - 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: Account ID. + - 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: *id019 + - description: The ID of the group to remove users from. 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 + - description: A list of users to remove from the group. + in: body + name: body required: true - type: file + schema: + $ref: '#/definitions/SubjectList' 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 + '200': + description: Successful operation. 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, the last user to remove from + Administrators group. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10555,19 +16608,31 @@ paths: 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: Remove users from a group. tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers: + /v3/accounts/{account_id}/trusted-certificates: get: - consumes: - - application/json - description: Retrieve identity providers in an array. - operationId: getAllAccountIdentityProviders + 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}/trusted-certificates + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAllAccountCertificates parameters: - description: Account ID. in: path @@ -10581,14 +16646,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 @@ -10596,65 +16661,171 @@ paths: - description: 'Comma-separated additional data to return. Currently supported: total_count.' in: query - name: include + 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: string + type: boolean produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderList' + $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: Account not found. + description: An account with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all identity providers. + summary: Get trusted certificates. tags: - - Tenant accounts - identity providers + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: Create a new identity provider. - operationId: createAccountIdentityProvider + 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}/trusted-certificates + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d {"name": "myCert1", "description": "very important cert", "certificate": + "certificate_data", "service": "lwm2m"} + + ```' + operationId: addAccountCertificate parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: Details of the identity provider to create. + - description: A trusted certificate object with attributes. Signature is optional. in: body name: body required: true schema: - $ref: '#/definitions/IdentityProviderCreationReq' + $ref: '#/definitions/TrustedCertificateReq' 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 schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/TrustedCertificateResp' '400': - description: Error in input data, for example, too long name. + description: Invalid certificate data, certificate validation failed, certificate + already expired or certificate uses unsupported, or weak cipher. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10662,30 +16833,45 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account not found. + description: An account with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new identity provider. + summary: Upload new trusted certificate. tags: - - Tenant accounts - identity providers + - Tenant security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers/{identity_provider_id}: + /v3/accounts/{account_id}/trusted-certificates/{cert_id}: delete: - description: Delete an identity provider by ID. - operationId: deleteAccountIdentityProvider + description: 'Delete 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}/trusted-certificates/{cert_id} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteAccountCertificate 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 trusted certificate to delete. in: path - name: identity_provider_id + name: cert_id required: true type: string produces: @@ -10698,29 +16884,44 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, or identity provider is in use. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or certificate with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete an identity provider by ID. + summary: Delete a trusted certificate by ID. tags: - - Tenant accounts - identity providers + - Tenant security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: Manage identity providers of a tenant account. - operationId: getAccountIdentityProvider + description: 'Retrieve a trusted certificate. + + 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} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAccountCertificate 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 trusted certificate to retrieve. in: path - name: identity_provider_id + name: cert_id required: true type: string produces: @@ -10729,54 +16930,59 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderInfo' + $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: Account or identity provider not found. + description: An account or certificate with the given ID not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Retrieve identity provider by ID. + summary: Get a trusted certificate. tags: - - Tenant accounts - identity providers + - Tenant security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml put: consumes: - application/json - description: Update an existing identity provider. - operationId: updateAccountIdentityProvider + 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 identity provider to update. + - description: The ID of the trusted certificate to update. in: path - name: identity_provider_id + name: cert_id required: true type: string - - description: Details of the identity provider to update. + - description: A trusted certificate object with attributes. in: body name: body required: true schema: - $ref: '#/definitions/IdentityProviderUpdateReq' + $ref: '#/definitions/TrustedCertificateUpdateReq' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/TrustedCertificateResp' '400': - description: Error in input data, for example, missing name. + description: Invalid certificate data, certificate validation failed, certificate + already expired or certificate uses unsupported, or weak cipher. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -10784,45 +16990,73 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden. + description: Forbidden, only available for administrators of commercial + accounts. schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or certificate with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update an existing identity provider. + summary: Update trusted certificate. tags: - - Tenant accounts - identity providers + - Tenant security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate: - post: - consumes: - - application/json - description: Delete a service provider certificate. - operationId: deleteAccountSpCertificate + /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 GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: getAllAccountInvitations parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the identity provider whose certificate should be deleted. - in: path - name: identity_provider_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 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/UserInvitationRespList' '401': description: Authentication failure. schema: @@ -10832,52 +17066,108 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete the service provider certificate. + summary: Get user invitations. tags: - - Tenant accounts - identity providers + - Tenant accounts - user invitations + x-filter: + login_profiles: + - eq x-origin: /home/circleci/project/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: generateAccountSpCertificate + 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/accouns/{account_id}/user-invitations + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d {"email": "myemail@company.com"} + + ```' + operationId: createAccountInvitation + parameters: + - description: Account ID. + in: path + name: account_id + required: true + type: string + - description: A user invitation object with attributes. + in: body + name: body + required: true + schema: + $ref: '#/definitions/UserInvitationReq' + produces: + - application/json + responses: + '201': + description: New entity created. + schema: + $ref: '#/definitions/UserInvitationResp' + '400': + description: Error in input data, for example, invalid email address. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a user invitation. + 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. + + 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} + \ + + -H ''Authorization: Bearer '' + + ```' + operationId: deleteAccountInvitation parameters: - description: Account ID. 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 invitation to delete. in: path - name: identity_provider_id + name: invitation_id required: true type: string - - description: Details of the service provider certificate to be generated. - in: body - name: body - required: true - schema: - $ref: '#/definitions/CertificateGenerationReq' 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' - '400': - description: Error in input data, for example, invalid certificate validity - value. - schema: - $ref: '#/definitions/ErrorResponse' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -10887,41 +17177,41 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Account or identity provider not found. + description: An account or invitation with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Generate a new service provider certificate. + summary: Delete a user invitation. tags: - - Tenant accounts - identity providers + - Tenant accounts - user invitations x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/notifications: get: - description: Retrieve notifications. - operationId: getAccountNofificationEntries + 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 - - 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 invitation to retrieve. + in: path + name: invitation_id + required: true type: string produces: - application/json @@ -10929,43 +17219,41 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/NotificationEntryList' - '400': - description: Error in input data, or missing or invalid parameters. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/UserInvitationResp' '401': description: Authentication failure. 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 invitation with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the notification events of an account. + summary: Details of a user invitation. tags: - - Tenant accounts - email notification logs + - Tenant accounts - user invitations x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups: + /v3/accounts/{account_id}/users: get: - description: 'Retrieve all group information. + 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 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccountGroups + operationId: getAllAccountUsers parameters: - description: Account ID. in: path @@ -10979,14 +17267,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 @@ -10997,9 +17285,30 @@ paths: name: include required: false type: string - - description: Filter for group name. + - description: Filter for email address. in: query - name: name__eq + 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. + 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 produces: @@ -11008,7 +17317,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/GroupSummaryList' + $ref: '#/definitions/UserInfoRespList' '401': description: Authentication failure. schema: @@ -11018,58 +17327,73 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account with the specified ID does not exist. + description: An account with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all group information. + summary: Get users. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-filter: - name: + email: + - eq + login_profiles: - eq + status: + - eq + - in + - nin x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: 'Create a new group. + 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 + 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 ''{"name": "MyGroup1"}'' + -d {"email": "myemail@company.com"} ```' - operationId: createAccountGroup + operationId: createAccountUser parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: Details of the group to create. + - description: A user object with attributes. in: body name: body required: true schema: - $ref: '#/definitions/GroupCreationInfo' + $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/GroupSummary' + $ref: '#/definitions/UserInfoResp' '400': - description: Error in input data, for example, invalid group name. + description: Error in input data, for example, an invalid email address. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11085,38 +17409,40 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '409': - description: A group with that name already exists. + description: A user with the given username or email already exists. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new group. + summary: Create a new user. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}: + /v3/accounts/{account_id}/users/{user_id}: delete: - description: 'Delete a group. + 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}/policy-groups/{group_id} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteAccountGroup + operationId: deleteAccountUser parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to delete. + - description: The ID of the user to delete. in: path - name: group_id + name: user_id required: true type: string produces: @@ -11124,55 +17450,128 @@ paths: responses: '204': description: Deleted successfully. + '400': + description: Bad request, for example, trying to delete an active user. + 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. + description: An account or user with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete a group. + summary: Delete a user. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: 'Retrieve general information about the group. + 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}/users/{user_id} + \ + + -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 + 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' + '404': + description: An account or user with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Details of the user. + tags: + - Tenant accounts - users + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + consumes: + - application/json + description: 'Update user 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} + 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 ''{"username": "myusername"}'' ```' - operationId: getAccountGroupSummary + operationId: updateAccountUser parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve. + - description: The ID of the user to update. in: path - name: group_id + name: user_id required: true type: string + - 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/GroupSummary' + $ref: '#/definitions/UserInfoResp' + '400': + description: Error in input data, for example, an invalid email address. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -11182,61 +17581,70 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + 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: Get group information. + summary: Update user details. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: + /v3/accounts/{account_id}/users/{user_id}/groups: + delete: consumes: - application/json - description: 'Add users and API keys to groups. + deprecated: true + description: 'Remove user 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} + 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 ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: addSubjectsToAccountGroup + operationId: removeAccountUserFromGroups 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 user to remove from the group. in: path - name: group_id + name: user_id required: true type: string - - description: A list of users and API keys to add to the group. + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/SubjectList' + items: + type: string + type: array produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/UserInfoResp' '400': - description: Error in input data, for example, the user or API key does - not exist. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11248,66 +17656,78 @@ 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 of this API key is a member of the group already. + description: An account, user, or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add members to a group. + summary: Remove user from groups. tags: - - Tenant accounts - policy groups + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - consumes: - - application/json - description: 'Update a group name. + get: + description: 'Retrieve an array of policy groups associated with a user. + + 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 GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id}/groups \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"name": "TestGroup2"}'' + -H ''Authorization: Bearer '' ```' - operationId: updateAccountGroupName + 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 group to update. + - description: The ID of the user. in: path - name: group_id + name: user_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/UpdatedResponse' - '400': - description: Error in input data, for example, the group name is too long. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -11317,62 +17737,65 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: A group with that ID does not exist. + description: An account or user with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update the group name. + summary: Get policy groups for a user. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys: - delete: + post: consumes: - application/json - description: 'Remove API keys from groups. + deprecated: true + description: 'Add user to 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 + curl -X POST 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 ''{"apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: removeApiKeysFromAccountGroup + operationId: addAccountUserToGroups 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 user to add to the group. in: path - name: group_id + name: user_id required: true type: string - - description: A list of API keys to remove from the group. + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/SubjectList' + items: + type: string + type: array produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/UserInfoResp' '400': - description: Error in input data, for example, the array of API keys is - missing. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11384,71 +17807,74 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account, user, or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API keys from a group. + '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 - policy groups + - 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 - get: - description: 'List the API keys of the group with details. + /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}/policy-groups/{group_id}/api-keys + 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: getApiKeysOfAccountGroup + operationId: addAccountUserToListedGroups 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 retrieve API keys for. + - description: The ID of the user to add to the group. in: path - name: group_id + name: user_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 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/ApiKeyInfoRespList' + $ref: '#/definitions/UserInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -11458,50 +17884,67 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that 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 API keys of a group. + summary: Add user to a list of groups. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/policy-groups/{group_id}/users: - delete: + /v3/accounts/{account_id}/users/{user_id}/groups/remove: + post: consumes: - application/json - 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 + 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/accounts/{account_id}/users/{user_id}/groups/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: removeAccountUserFromListedGroups 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 remove users from. + - description: The ID of the user to remove from the group. in: path - name: group_id + name: user_id required: true type: string - - description: A list of users to remove from the group. + - description: A list of IDs of the groups to update. in: body name: body required: true schema: - $ref: '#/definitions/SubjectList' + $ref: '#/definitions/GroupIdList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/UserInfoResp' '400': - description: Error in input data, for example, the last user to remove from - Administrators group. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -11513,87 +17956,47 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or group with that ID does not exist. + description: An account, user, or group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove users from a group. + summary: Remove user from groups. tags: - - Tenant accounts - policy groups + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'List users of the group with details. + /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}/policy-groups/{group_id}/users + 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: getUsersOfAccountGroup + operationId: validateAccountUserEmail parameters: - description: Account ID. in: path name: account_id required: true type: string - - description: The ID of the group to retrieve users for. + - description: The ID of the user. in: path - name: group_id + name: user_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: 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. - 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: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/UserInfoRespList' + '204': + description: Email validation successfully requested. '401': description: Authentication failure. schema: @@ -11603,40 +18006,30 @@ 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: Get users of a group. + summary: Validate the user email. tags: - - Tenant accounts - policy groups - x-filter: - status: - - eq - - in - - nin + - Tenant accounts - users x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/trusted-certificates: + /v3/api-keys: get: - description: 'Retrieve trusted certificates in an array. + 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}/trusted-certificates - \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllAccountCertificates + 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 @@ -11644,14 +18037,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 @@ -11662,380 +18055,181 @@ paths: name: include required: false type: string - - description: Filter for certificate name. - in: query - name: name__eq - required: false - type: string - - description: Filter for service. + - description: API key filter. Do not include the private portion of the API + key (the last 32 characters). in: query - name: service__eq + name: key__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. + - description: 'Owner name filter. + + Note: This parameter is restricted to administrators.' 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 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/ApiKeyInfoRespList' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account with the given ID does not exist. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all trusted certificates. + summary: Get all API keys. tags: - - Tenant device security - certificates + - 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: - device_execution_mode: - - eq - - neq - enrollment_mode: - - eq - expire: - - eq - issuer: - - like - name: + key: - eq owner: - eq - service: - - eq - status: - - eq - subject: - - like - valid: - - eq x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: 'Upload new trusted certificates. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d {"name": "myCert1", "description": "very important cert", "certificate": - "certificate_data", "service": "lwm2m"} - - ```' - operationId: addAccountCertificate - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: A trusted certificate object with attributes. Signature is optional. - in: body - name: body - required: true - schema: - $ref: '#/definitions/TrustedCertificateReq' - produces: - - application/json - responses: - '201': - description: New entity created. - schema: - $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, only available for admins of commercial accounts. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account with the given ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Upload new trusted certificate. - tags: - - Tenant device security - certificates - x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/trusted-certificates/{cert_id}: - delete: - description: 'Delete the trusted certificate. + deprecated: true + description: 'Create a new API key. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/trusted-certificates/{cert_id} - \ + 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'' ```' - operationId: deleteAccountCertificate + operationId: createApiKey parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the trusted certificate to delete. - in: path - name: cert_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: 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, only available for admins of commercial accounts. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: Account or certificate with the given ID not found. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete trusted certificate by ID. + summary: Create a new API key. tags: - - Tenant device security - certificates + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/api-keys/me: get: - description: 'Retrieve a trusted certificate by ID. + deprecated: true + description: 'Retrieve details of current API key. **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/api-keys/me \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAccountCertificate - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the trusted certificate to retrieve. - in: path - name: cert_id - required: true - type: string + operationId: getMyApiKey + parameters: [] produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/TrustedCertificateResp' + $ref: '#/definitions/ApiKeyInfoResp' '401': description: Authentication failure. schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, only available for admins of commercial accounts. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: Account or certificate with the given ID not found. + description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get trusted certificate by ID. + summary: Get current API key. tags: - - Tenant device security - certificates + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml put: - 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 - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the trusted certificate to update. - in: path - name: cert_id - required: true - 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/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, only available for admins of commercial accounts. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: An account or certificate with the given ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Update trusted certificate. - 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. + deprecated: true + description: 'Update API key details. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations - \ + 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 ''{"name": "TestApiKey25"}'' ```' - operationId: getAllAccountInvitations + operationId: updateMyApiKey parameters: - - description: Account ID. - in: path - name: account_id + - description: New API key attributes to store. + in: body + name: body 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 - type: string + schema: + $ref: '#/definitions/ApiKeyUpdateReq' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInvitationRespList' + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data, for example, invalid API key name. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -12044,59 +18238,53 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Get the details of all user invitations. + summary: Update API key details. tags: - - Tenant accounts - user invitations - x-filter: - login_profiles: - - eq + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - post: + /v3/api-keys/me/groups: + delete: consumes: - application/json - description: 'Invite a new or existing user. + deprecated: true + description: 'Remove API key from groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accouns/{account_id}/user-invitations - \ + 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 {"email": "myemail@company.com"} + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: createAccountInvitation + operationId: removeMyApiKeyListedGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: A user invitation object with attributes. + - description: A list of IDs of 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/ApiKeyInfoResp' '400': - description: Error in input data, for example, invalid email address. + description: Error in input data. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -12107,42 +18295,64 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a user invitation. + summary: Remove API key from groups. tags: - - Tenant accounts - user invitations + - 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/ + 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}/user-invitations/{invitation_id}: - delete: - description: 'Delete an active user invitation sent to a new or existing user. + get: + deprecated: true + description: 'Retrieve an array of policy groups associated with the current + API key. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations/{invitation_id} - \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteAccountInvitation + operationId: getGroupsOfMyApiKey parameters: - - description: Account ID. - in: path - name: account_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 - - description: The ID of the invitation to delete. - in: path - name: invitation_id - required: true + - 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: - '204': - description: Deleted successfully. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -12151,218 +18361,180 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: An account or invitation with the specified ID does not exist. - schema: - $ref: '#/definitions/ErrorResponse' - summary: Delete a user invitation. + summary: Get policy groups of the current API key. tags: - - Tenant accounts - user invitations + - 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: /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. + post: + consumes: + - application/json + deprecated: true + description: 'Add API key to groups. **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/api-keys/me/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: getAccountInvitation + operationId: addMyApiKeyToGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the invitation to retrieve. - in: path - name: invitation_id + - description: A list of IDs of the groups to update. + in: body + name: body required: true - type: string + schema: + items: + type: string + type: array produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInvitationResp' + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. 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 or invitation with the specified ID does not exist. + '409': + description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Details of a user invitation. + summary: Add API key to a list of groups. tags: - - Tenant accounts - user invitations + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users: - get: - description: 'Retrieve details of all users. + /v3/api-keys/me/groups/add: + post: + consumes: + - application/json + deprecated: true + description: 'Add API key to groups. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users + 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: getAllAccountUsers + operationId: addMyApiKeyToListedGroups parameters: - - description: Account ID. - in: path - name: account_id + - description: A list of IDs of the groups to update. + in: body + name: body 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 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. - 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 + schema: + $ref: '#/definitions/GroupIdList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoRespList' + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. 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 with the given ID does not exist. + '409': + description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the details of all users. + summary: Add API key to a list of groups. tags: - - Tenant accounts - users - x-filter: - email: - - eq - login_profiles: - - eq - status: - - eq - - in - - nin + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/api-keys/me/groups/remove: 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: 'Remove API key from groups. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users + curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d {"email": "myemail@company.com"} + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' ```' - operationId: createAccountUser + operationId: removeMyApiKeyFromListedGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: A user object with attributes. + - description: A list of IDs of groups to update. 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 + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '201': - description: New entity created. + '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. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -12373,43 +18545,36 @@ paths: 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. + 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/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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}: + /v3/api-keys/{apikey_id}: delete: - description: 'Delete a user. + deprecated: true + description: 'Delete the API key. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: deleteAccountUser + operationId: deleteApiKey parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to delete. + - description: The ID of the API key to delete. in: path - name: user_id + name: apikey_id required: true type: string produces: @@ -12417,50 +18582,47 @@ paths: responses: '204': description: Deleted successfully. - '400': - description: Bad request, for example, trying to delete an active user. - schema: - $ref: '#/definitions/ErrorResponse' '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' '404': - description: An account or user with the specified ID does not exist. + description: An API key with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete a user. + summary: Delete API key. tags: - - Tenant accounts - users + - Account - API keys + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: 'Retrieve user details. + deprecated: true + description: 'Retrieve details of an API key. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users/{user_id} - \ - - -H ''Authorization: Bearer '' + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - ```' - operationId: getAccountUser - parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to retrieve. + -H ''Authorization: Bearer '' + + ```' + operationId: getApiKey + parameters: + - description: The ID of the API key to retrieve. in: path - name: user_id + name: apikey_id required: true type: string produces: @@ -12469,7 +18631,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UserInfoResp' + $ref: '#/definitions/ApiKeyInfoResp' '401': description: Authentication failure. schema: @@ -12479,60 +18641,56 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or user with the specified ID does not exist. + description: An API key with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Details of the user. + summary: Get API key. 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/{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: /home/circleci/project/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/{apikey_id} \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"username": "myusername"}'' + -d ''{"name": "TestApiKey25"}'' ```' - operationId: updateAccountUser + operationId: updateApiKey parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to update. + - description: The ID of the API key to update. in: path - name: user_id + name: apikey_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': @@ -12540,52 +18698,52 @@ 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 account or user with the given ID does not exist. + description: An API key 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: Update user details. + summary: Update API key details. tags: - - Tenant accounts - users + - Account - API keys + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}/groups: + /v3/api-keys/{apikey_id}/groups: delete: consumes: - application/json - description: 'Remove user from groups. + 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/accounts/{account_id}/users/{user_id}/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: removeAccountUserFromGroups + operationId: removeApiKeyFromGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to remove from the group. + - description: The ID of the API key to remove from the group. in: path - name: user_id + name: apikey_id required: true type: string - description: A list of IDs of the groups to update. @@ -12602,7 +18760,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/ApiKeyInfoResp' '400': description: Error in input data. schema: @@ -12616,28 +18774,36 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account, user, or group with that ID does not exist. + description: An API key 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/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 user''s groups. + 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}/users/{user_id}/groups + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfAccountUser + operationId: getGroupsOfApikey parameters: - default: 50 description: The number of results to return (2-1000). Default 50. @@ -12646,14 +18812,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 @@ -12664,14 +18830,9 @@ 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. + - description: The ID of the API key. in: path - name: user_id + name: apikey_id required: true type: string produces: @@ -12690,43 +18851,46 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or user with the specified ID does not exist. + description: An API key with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get user's groups. + summary: Get policy groups of an API key. 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}/groups + 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 post: consumes: - application/json - description: 'Add user to groups. + 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/accounts/{account_id}/users/{user_id}/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: addAccountUserToGroups + operationId: addApiKeyToGroups parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user to add to the group. + - description: The ID of the API key to add to the group. in: path - name: user_id + name: apikey_id required: true type: string - description: A list of IDs of the groups to update. @@ -12743,7 +18907,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/ApiKeyInfoResp' '400': description: Error in input data. schema: @@ -12757,49 +18921,204 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account, user, or group with that ID does not exist. + 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. + 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 + 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/{apikey_id}/groups/add + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + 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 + 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: 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. + 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: /home/circleci/project/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' - '409': - description: The user is a member of the group already. + '404': + description: An API key with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Add user to a list of 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/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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/accounts/{account_id}/users/{user_id}/validate-email: + /v3/api-keys/{apikey_id}/reset-secret: post: - description: 'Validate user email. + deprecated: true + description: 'Reset the secret key of the API key. **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/{apikey_id}/reset-secret \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: validateAccountUserEmail + operationId: resetSecret parameters: - - description: Account ID. - in: path - name: account_id - required: true - type: string - - description: The ID of the user. + - description: The ID of the API key to reset. in: path - name: user_id + 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': - description: Email validation successfully requested. + '200': + description: Successful operation. + schema: + $ref: '#/definitions/ApiKeyInfoResp' + '400': + description: Error in input data format. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -12809,28 +19128,35 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An account or user with the specified ID does not exist. + description: An API key with the specified ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Validate the user email. + summary: Reset the secret key. tags: - - Tenant accounts - users + - 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys: + /v3/applications: get: - description: 'Retrieve API keys in an array, optionally filtered by the owner. + 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/api-keys \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllApiKeys + operationId: getAllApplications parameters: - default: 50 description: The number of results to return (2-1000). Default 50. @@ -12839,14 +19165,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 @@ -12857,15 +19183,9 @@ paths: 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. + - description: Status filter. in: query - name: owner__eq + name: status__eq required: false type: string produces: @@ -12874,7 +19194,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/ApplicationList' '401': description: Authentication failure. schema: @@ -12883,50 +19203,50 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all API keys. + summary: Get all applications. tags: - - Account - API keys + - Account - applications x-filter: - key: - - eq - owner: + status: - eq x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: 'Create a new API key. + 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 -d ''{"name": - "MyKey1"}'' \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications -d ''{"name": + "MyApplication1"}'' \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' ```' - operationId: createApiKey + operationId: createApplication parameters: - - description: The details of the API key to create. + - description: The details of the application to create. in: body name: body required: true schema: - $ref: '#/definitions/ApiKeyInfoReq' + $ref: '#/definitions/Application' produces: - application/json responses: '201': description: New entity created. schema: - $ref: '#/definitions/ApiKeyInfoResp' + $ref: '#/definitions/Application' '400': - description: Error in input data, for example, missing display name. + description: Error in input data, for example, missing name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -12937,33 +19257,39 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new API key. + summary: Create a new application. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/me: - get: - description: 'Retrieve API key details. + /v3/applications/{application_id}: + delete: + description: 'Delete the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getMyApiKey - parameters: [] + operationId: deleteApplication + parameters: + - description: The ID of the application to delete. + in: path + name: application_id + required: true + type: string produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -12972,46 +19298,44 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API key details. + '404': + description: An application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete application. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - description: 'Update API key details. + get: + description: 'Retrieve details of an application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id} + \ - -d ''{"name": "TestApiKey25"}'' + -H ''Authorization: Bearer '' ```' - operationId: updateMyApiKey + operationId: getApplication parameters: - - description: New API key attributes to store. - in: body - name: body + - description: The ID of the application to retrieve. + in: path + name: application_id required: true - schema: - $ref: '#/definitions/ApiKeyUpdateReq' + type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data, for example, missing display name. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/Application' '401': description: Authentication failure. schema: @@ -13020,49 +19344,54 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Update API key details. + '404': + description: An application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get application. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/me/groups: - delete: - consumes: - - application/json - description: 'Remove API key from groups. + put: + description: 'Update application details. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example:** - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ + `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 ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{"name": "TestApplication25"}'' ```' - operationId: removeMyApiKeyFromGroups + operationId: updateApplication parameters: - - description: A list of IDs of groups to update. + - 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: - items: - type: string - type: array + $ref: '#/definitions/Application' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/ApiKeyInfoResp' '400': - description: Error in input data. + description: Error in input data, for example, invalid display name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13073,25 +19402,38 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + '404': + description: An application with the specified ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Update applicationdetails. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/applications/{application_id}/access-keys: get: - description: 'Retrieve groups associated with the API key. + 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/v3/api-keys/me/groups \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfMyApiKey + 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 @@ -13099,14 +19441,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 @@ -13117,13 +19459,18 @@ paths: 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/GroupSummaryList' + $ref: '#/definitions/AccessKeyList' '401': description: Authentication failure. schema: @@ -13132,93 +19479,61 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups of the API key. + '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 - API keys + - Account - applications + x-filter: + status: + - eq x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: 'Add API key to groups. + description: 'Create a new access key for the application. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/api-keys/me/groups \ - - -H ''Authorization: Bearer '' \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys + -d ''{"name": "MyKey1"}'' \ - -H ''content-type: application/json'' \ + -H ''Authorization: Bearer '' \ - -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -H ''content-type: application/json'' ```' - operationId: addMyApiKeyToGroups + operationId: createApplicationAccessKey parameters: - - description: A list of IDs of the groups to update. + - description: The ID of the application. + in: path + name: application_id + required: true + type: string + - 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/UpdatedResponse' + $ref: '#/definitions/AccessKey' '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' - '409': - description: The API key is a member of the group already. + description: Error in input data, for example, missing display name. schema: $ref: '#/definitions/ErrorResponse' - summary: Add API key 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}: - delete: - description: 'Delete the API key. - - - **Example:** - - ``` - - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} - \ - - -H ''Authorization: Bearer '' - - ```' - operationId: deleteApiKey - parameters: - - 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. '401': description: Authentication failure. schema: @@ -13228,40 +19543,47 @@ 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: Create a new applicationaccess key. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - get: - description: 'Retrieve API key details. + /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} \ + 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: getApiKey + operationId: deleteApplicationAccessKey parameters: - - description: The ID of the API key to retrieve. + - description: The ID of the application. in: path - name: apikey_id + 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: Successful operation. - schema: - $ref: '#/definitions/ApiKeyInfoResp' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -13271,52 +19593,49 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: API key with the specified ID does not exist. + description: An application or access key with the specified ID does not + exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get API key details. + summary: Delete access key associated with the application. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: - description: 'Update API key details. + get: + description: 'Retrieve details of an access key associated with the application. + Note: This endpoint is restricted to administrators. - **Example:** - `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + **Example:** - -H ''Authorization: Bearer '' \ + ``` - -H ''content-type: application/json'' \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/access-keys/{access_key_id} + \ - -d ''{"name": "TestApiKey25"}'' + -H ''Authorization: Bearer '' ```' - operationId: updateApiKey + operationId: getApplicationAccessKey parameters: - - description: The ID of the API key to update. + - description: The ID of the application. in: path - name: apikey_id + name: application_id required: true type: string - - description: New API key attributes to store. - in: body - name: body + - description: The ID of the access key to retrieve. + in: path + name: access_key_id required: true - schema: - $ref: '#/definitions/ApiKeyUpdateReq' + type: string produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoResp' - '400': - description: Error in input data, for example, missing display name. - schema: - $ref: '#/definitions/ErrorResponse' + $ref: '#/definitions/AccessKey' '401': description: Authentication failure. schema: @@ -13326,58 +19645,59 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: The API key with the specified ID does not exist. + description: An application or access key with the specified ID does not + exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update API key details. + summary: Get access key. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/api-keys/{apikey_id}/groups: - delete: - consumes: - - application/json - description: 'Remove API key from groups. + put: + description: 'Update access key details. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example:** - curl -X DELETE 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: removeApiKeyFromGroups + operationId: updateApplicationAccessKey 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 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/UpdatedResponse' + $ref: '#/definitions/AccessKey' '400': - description: Error in input data. + description: Error in input data, for example, invalid display name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -13389,29 +19709,38 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An API key with that ID does not exist. + description: An application or access key with the specified ID does not + exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API key from groups. + summary: Update access key details. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/applications/{application_id}/groups: get: - description: 'Retrieve groups associated with the API key. + 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/api-keys/{apikey_id}/groups + curl -X GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupsOfApikey + operationId: getGroupsOfApplication 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 @@ -13419,14 +19748,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 @@ -13437,11 +19766,6 @@ 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: @@ -13458,38 +19782,41 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: An API key with the given ID does not exist. + description: An application with the given ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get groups of the API key. + summary: Get policy groups of an application. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/applications/{application_id}/groups/add: post: consumes: - application/json - description: 'Add API key to 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 + 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: addApiKeyToGroups + operationId: addApplicationToGroups parameters: - - description: The ID of the API key to add to 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. @@ -13497,16 +19824,12 @@ paths: name: body required: true schema: - items: - type: string - type: array + $ref: '#/definitions/GroupIdList' produces: - application/json responses: - '200': + '204': description: Successful operation. - schema: - $ref: '#/definitions/UpdatedResponse' '400': description: Error in input data. schema: @@ -13520,36 +19843,90 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: A group or API key with that ID does not exist. + description: A group or application with that ID does not exist. 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 key to a list of groups. + summary: Add application to a list of groups. tags: - - Account - API keys + - Account - applications x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/billing-report: - get: - description: 'Fetch the billing report generated for the currently authenticated - commercial non-subtenant account. + /v3/applications/{application_id}/groups/remove: + post: + consumes: + - application/json + description: 'Remove application from groups. - Billing reports for subtenant accounts are included in their aggregator''s - billing report response. + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report?month=2018-07 + 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: removeApplicationFromGroups + parameters: + - 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: + '204': + description: Successful operation. + '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. Only the owner of the API key or an administrator + can reset an API key. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An application with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove application from groups. + tags: + - Account - applications + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/billing-report: + get: + 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. @@ -13604,14 +19981,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: @@ -13633,12 +20010,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 @@ -13652,19 +20029,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 @@ -13678,7 +20055,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: @@ -13709,7 +20086,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 @@ -13744,16 +20121,18 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Get billing report. + tags: + - Usage - billing reports x-origin: /home/circleci/project/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 @@ -13768,7 +20147,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 @@ -13816,7 +20195,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 @@ -13849,52 +20228,250 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Get raw billing data of the active devices for the month. + tags: + - Usage - billing reports + x-origin: /home/circleci/project/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 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 '' + + ```' + operationId: getBillingReportFirmwareUpdates + parameters: + - description: Queried year and month of billing report. + in: query + 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: /home/circleci/project/billing/public/swagger-public-apis.yaml - /v3/billing-report-firmware-updates: + /v3/billing-statistics: get: - description: 'Fetch raw billing data for firmware updates for the currently - authenticated commercial non-subtenant account. + 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. - This is supplementary data for the billing report. The raw billing data of - the firmware updates for subtenant accounts + The parameter is mandatory if the period is not specified. Do not set the + parameter if you have specified the period. - are included in their aggregator''s raw billing data of the firmware updates. + 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 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. + 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. - **Example:** + 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. - curl -X GET https://api.us-east-1.mbedcloud.com/v3/billing-report-firmware-updates?month=2018-07 - \ + Fetch the data for the period in minutes, hours, days, weeks or months. - -H ''Authorization: Bearer '' + One week is normalized to 7 days. Sample values: 5m, 2h, 3d, 4w, 1mo, 3mo. - ```' - operationId: getBillingReportFirmwareUpdates - parameters: - - description: Queried year and month of billing report. + The allowed periods (inclusive) are 5m-141120m/1h-2352h/1d-98d/1w-14w/1mo-3mo.' in: query - name: month - pattern: ^\d{4}-\d{2}$ + 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: @@ -13902,7 +20479,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 @@ -13921,7 +20498,7 @@ paths: schema: $ref: '#/definitions/UnauthorizedErrorResponse' 403: - description: Access forbidden if account is not commercial or subtenant. + description: Forbidden. examples: application/json: code: 403 @@ -13931,17 +20508,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: @@ -13953,9 +20519,78 @@ paths: type: internal_error schema: $ref: '#/definitions/InternalServerErrorResponse' - summary: Get raw billing data of the firmware updates for the month. + summary: Get statistics view of Device Management usage. + tags: + - Usage - statistics x-origin: /home/circleci/project/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 ''`' + operationId: deleteAllColors + parameters: [] + produces: + - application/json + responses: + '204': + description: Colors have been deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account branding colors not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete all colors. + tags: + - User interface configuration - colors + x-origin: /home/circleci/project/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 ''`' + operationId: deleteAllDarkColors + parameters: [] + produces: + - application/json + responses: + '204': + description: Colors have been deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account branding colors not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete colors in the dark theme. + tags: + - User interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: description: 'Retrieve the dark theme branding colors. @@ -13966,7 +20601,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getDarkColors @@ -13993,10 +20628,11 @@ paths: 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. @@ -14005,7 +20641,7 @@ paths: required: true schema: items: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/BrandingColorUpdate' type: array produces: - application/json @@ -14032,6 +20668,8 @@ paths: delete: description: 'Resets the branding color to its dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14040,13 +20678,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: *id018 + enum: *id001 in: path name: reference required: true @@ -14054,10 +20692,8 @@ paths: produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/BrandingColor' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -14085,13 +20721,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: *id018 + enum: *id001 in: path name: reference required: true @@ -14124,6 +20760,8 @@ paths: - application/json description: 'Update a dark theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14132,7 +20770,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'' \ @@ -14142,7 +20780,7 @@ paths: operationId: setDarkColor parameters: - description: The name of the branding color. - enum: *id018 + enum: *id001 in: path name: reference required: true @@ -14181,6 +20819,39 @@ paths: - User interface configuration - colors x-origin: /home/circleci/project/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 ''`' + operationId: deleteAllLightColors + parameters: [] + produces: + - application/json + responses: + '204': + description: Colors have been deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Account branding colors not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete colors in the light theme. + tags: + - User interface configuration - colors + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: description: 'Retrieve the light theme branding colors. @@ -14191,7 +20862,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getLightColors @@ -14218,9 +20889,10 @@ paths: 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: @@ -14230,7 +20902,7 @@ paths: required: true schema: items: - $ref: '#/definitions/BrandingColor' + $ref: '#/definitions/BrandingColorUpdate' type: array produces: - application/json @@ -14257,6 +20929,8 @@ paths: delete: description: 'Resets the branding color to its light theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14265,13 +20939,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: *id018 + enum: *id001 in: path name: reference required: true @@ -14279,10 +20953,8 @@ paths: produces: - application/json responses: - '200': - description: Successful operation. - schema: - $ref: '#/definitions/BrandingColor' + '204': + description: Deleted successfully. '401': description: Authentication failure. schema: @@ -14310,13 +20982,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: *id018 + enum: *id001 in: path name: reference required: true @@ -14349,6 +21021,8 @@ paths: - application/json description: 'Update light theme branding color. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14357,7 +21031,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'' \ @@ -14367,7 +21041,7 @@ paths: operationId: setLightColor parameters: - description: The name of the branding color. - enum: *id018 + enum: *id001 in: path name: reference required: true @@ -14405,7 +21079,74 @@ paths: tags: - User interface configuration - colors x-origin: /home/circleci/project/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 ''`' + operationId: deleteAllImages + parameters: [] + 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 branding images not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete all images. + tags: + - User interface configuration - images + x-origin: /home/circleci/project/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 ''`' + operationId: deleteAllDarkImages + parameters: [] + 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 branding images not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Delete images in the dark theme. + tags: + - User interface configuration - images + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: description: 'Retrieve metadata for all dark theme branding images. @@ -14414,7 +21155,7 @@ paths: `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllDarkImageData @@ -14450,13 +21191,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: *id019 + enum: *id026 in: path name: reference required: true @@ -14488,6 +21229,8 @@ paths: post: description: 'Revert an account branding image to dark theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14496,13 +21239,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: *id019 + enum: *id026 in: path name: reference required: true @@ -14536,6 +21279,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:** @@ -14544,7 +21289,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'' @@ -14552,7 +21297,7 @@ paths: operationId: uploadDarkImage parameters: - description: Name of the branding images (icon or picture). - enum: *id019 + enum: *id026 in: path name: reference required: true @@ -14601,12 +21346,14 @@ paths: 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: *id019 + enum: *id026 in: path name: reference required: true @@ -14643,14 +21390,47 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Unknown image reference. + description: Unknown image reference. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Upload a dark theme image. + tags: + - User interface configuration - images + x-origin: /home/circleci/project/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 ''`' + operationId: deleteAllLightImages + parameters: [] + 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 branding images not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Upload a dark theme image. + summary: Delete images in the light theme. tags: - User interface configuration - images x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/branding-images/light: get: description: 'Retrieve the metadata of all light theme branding images. @@ -14661,7 +21441,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllLightImageData @@ -14697,13 +21477,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: *id019 + enum: *id026 in: path name: reference required: true @@ -14735,6 +21515,8 @@ paths: post: description: 'Revert an account branding image to light theme default. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14743,13 +21525,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: *id019 + enum: *id026 in: path name: reference required: true @@ -14783,6 +21565,8 @@ paths: description: 'Upload a new account light theme branding image in PNG or JPEG format. + Note: This endpoint is restricted to administrators. + **Example:** @@ -14791,7 +21575,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'' @@ -14799,7 +21583,7 @@ paths: operationId: uploadLightImage parameters: - description: Name of the branding images (icon or picture). - enum: *id019 + enum: *id026 in: path name: reference required: true @@ -14848,12 +21632,14 @@ paths: 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: *id019 + enum: *id026 in: path name: reference required: true @@ -14910,7 +21696,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ``` @@ -14920,7 +21706,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 @@ -15077,7 +21863,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getCertificateEnrollment @@ -15120,59 +21906,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 @@ -15201,21 +21981,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 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 @@ -15239,24 +22018,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 + - Security and identity - certificate issuer configurations x-origin: /home/circleci/project/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': @@ -15277,15 +22052,14 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer configuration. tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations x-origin: /home/circleci/project/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 @@ -15317,21 +22091,17 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Update certificate issuer configuration. tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations x-origin: /home/circleci/project/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: - - &id020 - description: 'The ID of the certificate issuer configuration. - - ' + - &id027 + description: Certificate issuer ID configuration. in: path name: certificate-issuer-configuration-id required: true @@ -15357,15 +22127,13 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Delete certificate issuer configuration. tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml get: - description: 'Provides the configured certificate issuer. - - ' + description: Provides the configured certificate issuer. operationId: getCertificateIssuerConfigByID parameters: - - *id020 + - *id027 responses: '200': description: OK. @@ -15389,21 +22157,19 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer configuration. tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations x-origin: /home/circleci/project/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' - - *id020 + - *id027 responses: '200': description: OK. @@ -15427,36 +22193,31 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Update certificate issuer configuration. tags: - - Certificate Issuers Activation + - Security and identity - certificate issuer configurations x-origin: /home/circleci/project/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 @@ -15475,15 +22236,15 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuers list. tags: - - Certificate Issuers + - Security and identity - certificate issuers x-origin: /home/circleci/project/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\"\ @@ -15504,7 +22265,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. @@ -15520,9 +22281,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': @@ -15534,20 +22293,16 @@ 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 + - Security and identity - certificate issuers x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml /v3/certificate-issuers/{certificate-issuer-id}: delete: @@ -15555,27 +22310,21 @@ paths:
- **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 @@ -15584,9 +22333,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': @@ -15603,16 +22350,12 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Delete certificate issuer. tags: - - Certificate Issuers + - Security and identity - certificate issuers x-origin: /home/circleci/project/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 @@ -15624,9 +22367,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': @@ -15643,19 +22384,17 @@ paths: $ref: '#/definitions/ErrorObjectResponse' summary: Get certificate issuer by ID. tags: - - Certificate Issuers + - Security and identity - certificate issuers x-origin: /home/circleci/project/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 @@ -15673,9 +22412,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': @@ -15691,28 +22428,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 + - Security and identity - certificate issuers x-origin: /home/circleci/project/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.
@@ -15720,31 +22451,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 @@ -15771,14 +22496,12 @@ 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 + - Security and identity - certificate issuers x-origin: /home/circleci/project/cloud-vault/public/swagger.yaml /v3/developer-certificates: post: @@ -15787,7 +22510,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://www.pelion.com/docs/device-management/current/provisioning-process/integrating-with-a-third-party-ca.html). **Example:** @@ -15797,7 +22520,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" \ @@ -16090,7 +22813,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Create a new developer certificate to connect to the bootstrap server. tags: - - Device security - developer class certificates + - Security and identity - developer class certificates x-origin: /home/circleci/project/connector-ca/public/swagger.yaml /v3/developer-certificates/{developerCertificateId}: get: @@ -16105,7 +22828,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 @@ -16366,122 +23089,139 @@ paths: summary: Fetch an existing developer certificate to connect to the bootstrap server. tags: - - Device security - developer class certificates + - Security and identity - developer class certificates x-origin: /home/circleci/project/connector-ca/public/swagger.yaml - /v3/device-enrollment-denials: + /v3/device-block-categories/: get: - description: 'This produces a list of failed attempts to bootstrap using a particular - certificate which is blacklisted (trusted_certificate). + description: 'List all device block categories. A block category is a short + description of why a device was suspended or returned to service. - Returned list can be filtered by endpoint name. Trusted certificate ID filter - is required. + **Example:** - **Example usage:** + Get all defined device suspension categories: ``` - 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} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-block-categories + \ - ``` + -H ''Authorization: Bearer '' - ' - operationId: listEnrollmentDenialAttempts + ```' + operationId: Block_Categories_list parameters: - - description: filtering based on trusted certificate id + - description: This endpoint doesn't support paging. Parameter is accepted for + API compatibility. Value is ignored. in: query - name: trusted_certificate_id__eq - required: true - type: string - - description: filtering based on endpoint name + maximum: 1000 + minimum: 2 + name: limit + type: integer + - description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' in: query - name: endpoint_name__eq + name: order type: string - - description: Optional parameter for pagination. Denied device ID. + - description: This endpoint doesn't support paging. Parameter is accepted for + API compatibility. Value is ignored. in: query name: after type: string - - description: Optional parameter for pagination. - enum: - - ASC - - DESC + - description: 'Comma-separated list of data fields to return. Currently supported: + `total_count`.' in: query - name: order + name: include type: string - - description: Optional parameter for pagination. + - description: eq filter for the "reference" field in: query - name: limit - type: integer - produces: - - application/json + name: reference__eq + type: string + - 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: 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: /home/circleci/project/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: /home/circleci/project/device-directory/public/swagger.yml /v3/device-enrollments: get: description: 'Provides a list of pending and claimed enrollments. @@ -16493,7 +23233,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments @@ -16505,7 +23245,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ ''https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'' @@ -16556,7 +23296,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get a list of enrollments per account. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml post: description: 'When the device connects to the bootstrap server and provides @@ -16570,7 +23310,7 @@ paths: curl -X POST \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ @@ -16607,7 +23347,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Create a single enrollment. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml /v3/device-enrollments-bulk-deletes: post: @@ -16615,7 +23355,7 @@ paths: - 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\ @@ -16638,7 +23378,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\ @@ -16667,7 +23407,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Bulk delete. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml /v3/device-enrollments-bulk-deletes/{id}: get: @@ -16715,7 +23455,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} @@ -16749,7 +23489,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get bulk delete entity. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml /v3/device-enrollments-bulk-uploads: post: @@ -16757,7 +23497,7 @@ paths: - 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,\ @@ -16810,7 +23550,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Bulk upload. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml /v3/device-enrollments-bulk-uploads/{id}: get: @@ -16858,7 +23598,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} @@ -16892,14 +23632,14 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get bulk upload entity. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/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](../docs/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). + First-to-Claim](https://www.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html).
@@ -16909,7 +23649,7 @@ paths: curl -X DELETE \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} @@ -16934,7 +23674,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Delete an enrollment by ID. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml get: description: 'Check detailed enrollment info, for example, date of claim or @@ -16947,7 +23687,7 @@ paths: curl -X GET \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} @@ -16974,73 +23714,77 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Get details of an single enrollment by ID. tags: - - Public API + - Device ownership - enrollments x-origin: /home/circleci/project/enrollment-service/public/swagger.yaml /v3/device-events/: get: - description: List all device events for an account. + 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://www.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. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. + - description: How many objects to retrieve in the page (2-1000). Limit 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 - - 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 follows:\n```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3```\n\ - \n###### Filterable fields:\n\nThe below table lists all the fields that\ - \ can be filtered on with certain filters:\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\ + - 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 is encoded as `?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3`.\n\ + \n###### Filterable fields:\n\nThe below table lists all filterable fields:\n\ + \n
Field= / __eq / __neq__in /\ - \ __nin__lte / __gte
date_time\u2713\u2713\ - \u2713
description\u2713\u2713 
id\u2713\u2713\ -  
device_id\u2713\u2713 
event_type\u2713
\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
date_time\u2713\u2713\u2713
description\u2713\u2713 
id\u2713\u2713 
device_id\u2713\u2713 
state_change\u2713\u2713 
\n \n\nThe examples\ - \ below show the queries in *unencoded* form.\n\n###### By id:\n\n```id={id}```\n\ - \n###### By state change:\n\n```state_change=[True|False]```\n\n###### By\ - \ event type:\n\n```event_type={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\ - \ e.g. 2016-11-30T16:25:12.1234Z\n* UTC RFC3339 without milliseconds e.g.\ - \ 2016-11-30T16:25:12Z\n* UTC RFC3339 shortened - without milliseconds and\ - \ punctuation e.g. 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```\nLower and upper limits to a date-time range\ - \ may be specified by including both the ```__gte``` and ```__lte``` forms\ - \ in\nthe filter.\n```{field name}[|__lte|__gte]={UTC RFC3339 date-time}```\n\ - \n##### Multi-field example\n\n```id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z```\n\ - \nEncoded:\n\n```?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z```\n\ + \ event_type\n \u2713\n \u2713\n\ + \  \n \n \n state_change\n\ + \ \u2713\n \u2713\n  \n \ + \ \n \n\n \n\nThe examples below show the queries\ + \ in *unencoded* form.\n\n###### By id:\n\n`id={id}`\n\n###### By state\ + \ change:\n\n`state_change=[True|False]`\n\n###### By event type:\n\n`event_type={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\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\ + Lower 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##### Multi-field example\n\n`id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z`\n\ + \nEncoded:\n\n`?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z`\n\ \n##### Filtering with filter operators\n\nString field filtering supports\ - \ the following operators:\n\n* equality: `__eq`\n* non-equality: `__neq`\n\ - * in : `__in`\n* not in: `__nin`\n\nFor `__in` and `__nin` filters list\ - \ of parameters must be comma-separated:\n`event_type__in=update.device.device-created,update.device.device-updated`" + \ the following operators:\n\n* Equality: `__eq`.\n* Non-equality: `__neq`.\n\ + * In : `__in`.\n* Not in: `__nin`.\n\nFor `__in` and `__nin` filters list\ + \ of parameters must be comma-separated:\n\n`event_type__in=update.device.device-created,update.device.device-updated`" in: query name: filter type: string @@ -17140,12 +23884,14 @@ paths: schema: $ref: '#/definitions/DeviceEventPage' '400': - description: Bad Request. + description: Bad request. '401': description: Not authenticated. '404': description: Unable to find page. summary: List all device events. + tags: + - Device directory - events x-filter: date_time: - in @@ -17178,7 +23924,23 @@ paths: x-origin: /home/circleci/project/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 from ''/v3/device-events''. + Form of ''016c03d40a4e000000000001001003b4'' + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/ + \ + + -H ''Authorization: Bearer '' + + ```' operationId: Device_Event_retrieve parameters: - in: path @@ -17191,32 +23953,32 @@ paths: schema: $ref: '#/definitions/DeviceEventData' '400': - description: Bad Request. + description: Bad request. '401': description: Not authenticated. '404': description: Unable to find device. summary: Retrieve a device event. + tags: + - Device directory - events x-origin: /home/circleci/project/device-directory/public/swagger.yml /v3/device-groups/: get: description: List all groups. operationId: Group_list 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: How many objects to retrieve in the page (2-1000). Limit 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 @@ -17225,20 +23987,20 @@ paths: in: query name: include type: string - - 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\n```key1=value1&key2=value2&key3=value3``` this would be encoded\ - \ as follows:\n```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3```\n\ - \n###### Filterable fields:\n\nThe table lists all the fields that can be\ - \ filtered on with certain filters:\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\ + - 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\ + \n###### Filterable fields:\n\nThe table lists all filterable fields:\n\n\ +
Field= / __eq / __neq__in / \ - \ __nin__lte / __gte
id\u2713\u2713 
devices_count\u2713\u2713\u2713
name\u2713\u2713\ -  
custom_attributes
\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 \ @@ -17246,24 +24008,26 @@ paths: \ \n \n \n \n \ \ \n \n \n \n\ \ \n
Field= / __eq /\ + \ __neq__in / __nin__lte / __gte
id\u2713\ + \u2713 
devices_count\u2713\u2713\u2713
name\u2713\u2713 
custom_attributes\u2713  
component_attributes\u2713  
created_at\u2713\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```name__eq=mygroup```\n\ + \ *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 e.g. 2016-11-30T16:25:12.1234Z\n\ - * UTC RFC3339 without milliseconds e.g. 2016-11-30T16:25:12Z\n* UTC RFC3339\ - \ shortened - without milliseconds and punctuation e.g. 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```{field name}[|__lte|__gte]={UTC\ - \ RFC3339 date-time}```\n\n###### By device group custom attributes:\n\n\ - ```custom_attributes__{param}={value}```\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\ - \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\ + \ 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\ - * in : `__in`\n* not in: `__nin`\n\nFor `__in` and `__nin` filters list\ + \ the following operators:\n\n* Equality: `__eq`.\n* Non-equality: `__neq`.\n\ + * In : `__in`.\n* Not in: `__nin`.\n\nFor `__in` and `__nin` filters list\ \ of parameters must be comma-separated:\n`name__in=group1,group2`" in: query name: filter @@ -17374,6 +24138,8 @@ paths: schema: $ref: '#/definitions/ErrorResponse' summary: List all groups. + tags: + - Device directory - groups x-filter: created_at: - in @@ -17413,9 +24179,9 @@ paths: required: true schema: properties: - custom_attributes: *id021 - description: *id022 - name: *id023 + custom_attributes: *id028 + description: *id029 + name: *id030 type: object responses: '201': @@ -17423,7 +24189,7 @@ paths: schema: $ref: '#/definitions/DeviceGroup' '400': - description: Bad Request. + description: Bad request. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -17434,14 +24200,17 @@ paths: description: Conflict - Group name already exists. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a group + summary: Create a group. + tags: + - Device directory - groups x-origin: /home/circleci/project/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 + - description: The ID of the group. in: path name: device-group-id required: true @@ -17457,10 +24226,14 @@ paths: description: Not Found. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete a group + summary: Delete a group. + tags: + - Device directory - groups x-origin: /home/circleci/project/device-directory/public/swagger.yml get: - description: Get a group. + description: Returns [DeviceGroup](https://www.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 @@ -17486,9 +24259,11 @@ paths: schema: $ref: '#/definitions/ErrorResponse' summary: Get a group. + tags: + - Device directory - groups x-origin: /home/circleci/project/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 @@ -17501,9 +24276,9 @@ paths: required: true schema: properties: - custom_attributes: *id021 - description: *id022 - name: *id023 + custom_attributes: *id028 + description: *id029 + name: *id030 type: object responses: '200': @@ -17511,7 +24286,7 @@ paths: schema: $ref: '#/definitions/DeviceGroup' '400': - description: Bad Request. + description: Bad request. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -17523,30 +24298,30 @@ paths: schema: $ref: '#/definitions/ErrorResponse' summary: Modify the attributes of a group. + tags: + - Device directory - groups x-origin: /home/circleci/project/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 name: device-group-id required: true type: string - - 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: How many objects to retrieve in the page (2-1000). Limit 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 @@ -17555,90 +24330,105 @@ paths: in: query name: include type: string - - description: "URL encoded query string parameter to filter returned data.\n\ - \ \n##### Filtering\n\n```?filter={URL encoded query string}```\n\n\ - The 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 follows:\n```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3```\n\ - \n###### Filterable fields:\n\nThe below table lists all the fields that\ - \ can be filtered on with certain filters:\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 \ - \ \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 \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 \ - \ \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
lifecycle_status\u2713\u2713 
account_id\u2713\u2713 
auto_update\u2713\u2713 
bootstrap_expiration_date\u2713\u2713\ - \u2713
bootstrapped_timestamp\u2713\u2713\u2713
ca_id\u2713\u2713 
connector_expiration_date\u2713\u2713\u2713
created_at\u2713\u2713\u2713
custom_attributes\u2713  
deployed_state\u2713\u2713 
deployment\u2713\u2713 
description\u2713\u2713 
device_class\u2713\u2713 
device_execution_mode\u2713\ - \u2713 
device_key\u2713\u2713 
endpoint_name\u2713\u2713 
endpoint_type\u2713\u2713 
enrolment_list_timestamp\u2713\u2713\ - \u2713
etag\u2713\u2713\u2713
firmware_checksum\u2713\ - \u2713 
host_gateway\u2713\u2713 
id\u2713\ - \u2713 
manifest\u2713\u2713 
manifest_timestamp\u2713\u2713\u2713
mechanism\u2713\u2713 
mechanism_url\u2713\u2713 
name\u2713\u2713 
serial_number\u2713\u2713\ -  
state\u2713\u2713 
updated_at\u2713\u2713\u2713
vendor_id\u2713\u2713 
issuer_fingerprint\u2713\u2713 
\n \n\nThe examples below\ - \ show the queries in *unencoded* form.\n\n###### By device properties (all\ - \ properties are filterable):\n\n```state=[unenrolled|cloud_enrolling|bootstrapped|registered]```\n\ - ```device_class={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\ - \ e.g. 2016-11-30T16:25:12.1234Z\n* UTC RFC3339 without milliseconds e.g.\ - \ 2016-11-30T16:25:12Z\n* UTC RFC3339 shortened - without milliseconds and\ - \ punctuation e.g. 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 the filter.\n```{field name}[|__lte|__gte]={UTC RFC3339 date-time}```\n\ - \n###### On device custom attributes:\n\n```custom_attributes__{param}={value}```\n\ - ```custom_attributes__tag=TAG1```\n\n##### Multi-field example\n\n```state=bootstrapped&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z```\n\ - \nEncoded:\n\n```?filter=state%3Dbootstrapped%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\ - * in : `__in`\n* not in: `__nin`\n\nFor `__in` and `__nin` filters list\ - \ of parameters must be comma-separated:\n`state__nin=unenrolled,dergistered`" + - description: eq filter for the "lifecycle_status" field in: query - name: filter + name: lifecycle_status__eq + type: string + - description: neq filter for the "lifecycle_status" field + in: query + name: lifecycle_status__neq + type: string + - description: in filter for the "lifecycle_status" field + in: query + name: lifecycle_status__in + type: string + - description: nin filter for the "lifecycle_status" field + in: query + name: lifecycle_status__nin + type: string + - description: eq filter for the "operator_suspended" field + in: query + name: operator_suspended__eq + type: boolean + - description: neq filter for the "operator_suspended" field + in: query + name: operator_suspended__neq + type: boolean + - description: eq filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__eq + type: string + - description: neq filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__neq + type: string + - description: in filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__in + type: string + - description: nin filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__nin + type: string + - description: in filter for the "last_operator_suspended_updated_at" field + in: query + name: last_operator_suspended_updated_at__in + type: string + - description: nin filter for the "last_operator_suspended_updated_at" field + in: query + name: last_operator_suspended_updated_at__nin + type: string + - description: lte filter for the "last_operator_suspended_updated_at" field + format: date-time + in: query + name: last_operator_suspended_updated_at__lte + type: string + - description: gte filter for the "last_operator_suspended_updated_at" field + format: date-time + in: query + name: last_operator_suspended_updated_at__gte + type: string + - description: eq filter for the "system_suspended" field + in: query + name: system_suspended__eq + type: boolean + - description: neq filter for the "system_suspended" field + in: query + name: system_suspended__neq + type: boolean + - description: eq filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__eq + type: string + - description: neq filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__neq + type: string + - description: in filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__in + type: string + - description: nin filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__nin + type: string + - description: in filter for the "last_system_suspended_updated_at" field + in: query + name: last_system_suspended_updated_at__in + type: string + - description: nin filter for the "last_system_suspended_updated_at" field + in: query + name: last_system_suspended_updated_at__nin + type: string + - description: lte filter for the "last_system_suspended_updated_at" field + format: date-time + in: query + name: last_system_suspended_updated_at__lte + type: string + - description: gte filter for the "last_system_suspended_updated_at" field + format: date-time + in: query + name: last_system_suspended_updated_at__gte type: string - description: eq filter for the "account_id" field in: query @@ -18028,6 +24818,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 @@ -18100,7 +24906,7 @@ paths: schema: $ref: '#/definitions/DevicePage' 400: - description: Bad Request. + description: Bad request. schema: $ref: '#/definitions/ErrorResponse' 401: @@ -18111,8 +24917,10 @@ paths: description: Not found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get a page of devices - x-filter: &id024 + summary: Get a page of devices. + tags: + - Device directory - groups + x-filter: &id031 account_id: - eq - neq @@ -18206,6 +25014,31 @@ paths: - neq - in - nin + last_operator_suspended_category: + - eq + - neq + - in + - nin + last_operator_suspended_updated_at: + - in + - nin + - lte + - gte + last_system_suspended_category: + - eq + - neq + - in + - nin + last_system_suspended_updated_at: + - in + - nin + - lte + - gte + lifecycle_status: + - eq + - neq + - in + - nin manifest: - eq - neq @@ -18231,6 +25064,14 @@ paths: - neq - in - nin + net_id: + - eq + - neq + - in + - nin + operator_suspended: + - eq + - neq serial_number: - eq - neq @@ -18241,6 +25082,9 @@ paths: - neq - in - nin + system_suspended: + - eq + - neq updated_at: - in - nin @@ -18254,7 +25098,7 @@ paths: x-origin: /home/circleci/project/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. @@ -18262,82 +25106,248 @@ paths: name: device-group-id required: true type: string - - description: Body of the request. - in: body - name: body - required: true - schema: - $ref: '#/definitions/DeviceGroupManipulation' + - description: Body of the request. + in: body + name: body + required: true + schema: + $ref: '#/definitions/DeviceGroupManipulation' + responses: + '204': + description: Success - device added. + '400': + description: Bad request. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Unauthorized. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add a device to a group. + tags: + - Device directory - groups + x-origin: /home/circleci/project/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. + 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: /home/circleci/project/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: - '204': - description: Success - device added. + '200': + description: Retrieved logs successfully + schema: + $ref: '#/definitions/LogsPage' '400': - description: Bad Request. + description: Bad request schema: $ref: '#/definitions/ErrorResponse' '401': - description: Unauthorized. - schema: - $ref: '#/definitions/ErrorResponse' - '404': - description: Not found. + description: Not authenticated schema: $ref: '#/definitions/ErrorResponse' - summary: Add a device to a group - x-origin: /home/circleci/project/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 + 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: /home/circleci/project/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 group. + - 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 - x-origin: /home/circleci/project/device-directory/public/swagger.yml + summary: Retrieve a device log by ID. + tags: + - Gateway Logs Public API + x-origin: /home/circleci/project/gateway/public/logs.yaml /v3/device-queries/: get: - description: List all device queries. The result will be paged into pages of - 100. + description: List all device queries. operationId: Device_Query_list 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: How many objects to retrieve in the page (2-1000). Limit 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 @@ -18346,17 +25356,16 @@ paths: in: query name: include type: string - - 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 follows:\n```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3```\n\ - \nThe below table lists all the fields that can be filtered on with certain\ - \ filters:\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\ + - 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\ + \n###### Filterable fields\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 \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\ @@ -18366,22 +25375,22 @@ paths: \ \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\ - \ e.g. 2016-11-30T16:25:12.1234Z\n* UTC RFC3339 without milliseconds e.g.\ - \ 2016-11-30T16:25:12Z\n* UTC RFC3339 shortened - without milliseconds and\ - \ punctuation e.g. 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```{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\ + `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\ - * in : `__in`\n* not in: `__nin`\n\nFor `__in` and `__nin` filters list\ + \ the following operators:\n\n* Equality: `__eq`.\n* Non-equality: `__neq`.\n\ + * In : `__in`.\n* Not in: `__nin`.\n\nFor `__in` and `__nin` filters list\ \ of parameters must be comma-separated:\n`name__nin=query1,query2`" in: query name: filter @@ -18476,12 +25485,14 @@ paths: schema: $ref: '#/definitions/DeviceQueryPage' '400': - description: Bad Request. + description: Bad request. '401': description: Not authenticated. '404': description: Unable to find page. summary: List device queries. + tags: + - Device directory - device queries x-filter: created_at: - in @@ -18525,12 +25536,12 @@ paths: $ref: '#/definitions/DeviceQuery' '400': description: 'Validation error: The data used to create the device query - did not validate. - - ' + did not validate.' '401': description: Not authenticated. - summary: Create a device query + summary: Create a device query. + tags: + - Device directory - device queries x-origin: /home/circleci/project/device-directory/public/swagger.yml /v3/device-queries/{query_id}/: delete: @@ -18546,14 +25557,14 @@ paths: description: Update device query deleted. '400': description: 'Validation error: The data used to create the device query - did not validate - - ' + did not validate.' '401': description: Not authenticated. '404': description: Unable to delete update device query because it can't be found. - summary: Delete a device query + summary: Delete a device query. + tags: + - Device directory - device queries x-origin: /home/circleci/project/device-directory/public/swagger.yml get: description: Retrieve a specific device query. @@ -18570,14 +25581,14 @@ paths: $ref: '#/definitions/DeviceQuery' '400': description: 'Validation error: The data used to create the device query - did not validate. - - ' + did not validate.' '401': description: Not authenticated. '404': description: Unable to find device query. summary: Retrieve a device query. + tags: + - Device directory - device queries x-origin: /home/circleci/project/device-directory/public/swagger.yml put: description: Update a specifc device query. @@ -18600,35 +25611,33 @@ paths: $ref: '#/definitions/DeviceQuery' '400': description: 'Validation error: The data used to update the device query - did not validate. - - ' + did not validate.' '401': description: Not authenticated. '404': description: Unable to update device query because it can't be found. - summary: Update a device query + summary: Update a device query. + tags: + - Device directory - device queries x-origin: /home/circleci/project/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. The minimum limit is - 2 and the maximum is 1000. Limit values outside of this range are set to - the closest limit. + - description: How many objects to retrieve in the page (2-1000). Limit 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 @@ -18637,44 +25646,42 @@ paths: in: query name: include type: string - - 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 follows:\n```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3```\n\ - \n###### Filterable fields:\n\nThe below table lists all the fields that\ - \ can be filtered on with certain filters:\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\ + - 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\ + \n###### Filterable fields:\n\nThe below table lists all filterable fields:\n\ + \n
Field= / __eq / __neq__in /\ - \ __nin__lte / __gte
date_time\u2713\u2713\ - \u2713
description\u2713\u2713 
id\u2713\u2713\ -  
device_id\u2713\u2713 
event_type\u2713
\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
date_time\u2713\u2713\u2713
description\u2713\u2713 
id\u2713\u2713 
device_id\u2713\u2713 
state_change\u2713\u2713 
\n \n\nThe examples\ - \ below show the queries in *unencoded* form.\n\n###### By id:\n\n```id={id}```\n\ - \n###### By state change:\n\n```state_change=[True|False]```\n\n###### By\ - \ event type:\n\n```event_type={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\ - \ e.g. 2016-11-30T16:25:12.1234Z\n* UTC RFC3339 without milliseconds e.g.\ - \ 2016-11-30T16:25:12Z\n* UTC RFC3339 shortened - without milliseconds and\ - \ punctuation e.g. 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```{field name}[|__lte|__gte]={UTC RFC3339 date-time}```\n\ - \n##### Multi-field example\n```id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z```\n\ - \nEncoded:\n\n```?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z```\n\ + \
event_type\u2713\u2713 
state_change\u2713\u2713 
\n \n\nThe examples below show the queries\ + \ in *unencoded* form.\n\n###### By id:\n\n`id={id}`\n\n###### By state\ + \ change:\n\n`state_change=[True|False]`\n\n###### By event type:\n\n`event_type={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\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##### Multi-field example\n\n`id=0158d38771f70000000000010010038c&state_change=True&date_time__gte=2016-11-30T16:25:12.1234Z`\n\ + \nEncoded:\n\n`?filter=id%3D0158d38771f70000000000010010038c%26state_change%3DTrue%26date_time__gte%3D2016-11-30T16%3A25%3A12.1234Z`\n\ \n##### Filtering with filter operators\n\nString field filtering supports\ - \ the following operators:\n\n* equality: `__eq`\n* non-equality: `__neq`\n\ - * in : `__in`\n* not in: `__nin`\n\nFor `__in` and `__nin` filters list\ - \ of parameters must be comma-separated:\n`event_type__in=update.device.device-created,update.device.device-updated`" + \ the following operators:\n\n* Equality: `__eq`.\n* Non-equality: `__neq`.\n\ + * In : `__in`.\n* Not in: `__nin`.\n\nFor `__in` and `__nin` filters list\ + \ of parameters must be comma-separated:\n`event_type__in=update.device.device-created,update.device.device-updated`." in: query name: filter type: string @@ -18778,16 +25785,18 @@ paths: type: string responses: '200': - description: Request successful + description: Request successful. schema: $ref: '#/definitions/DeviceEventPage' '400': - description: Bad Request + description: Bad request. '401': - description: Not authenticated + description: Not authenticated. '404': - description: Unable to find page + description: Unable to find page. summary: 'DEPRECATED: List all device events.' + tags: + - Device directory - events x-filter: date_time: - in @@ -18823,8 +25832,7 @@ paths: /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 @@ -18837,124 +25845,264 @@ paths: schema: $ref: '#/definitions/DeviceEventData' '400': - description: Bad Request. + description: Bad request. '401': description: Not authenticated. '404': description: Unable to find device. summary: 'DEPRECATED: Retrieve a device event.' + tags: + - Device directory - events x-origin: /home/circleci/project/device-directory/public/swagger.yml /v3/devices/: get: - description: List all devices. + description: 'List all devices enrolled to Device Management for the account. + + + **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 '' + + ```' operationId: Device_list 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: How many objects to retrieve in the page (2-1000). Limit 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. + 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 + name: include + type: string + - description: eq filter for the "lifecycle_status" field + in: query + name: lifecycle_status__eq + type: string + - description: neq filter for the "lifecycle_status" field + in: query + name: lifecycle_status__neq + type: string + - description: in filter for the "lifecycle_status" field + in: query + name: lifecycle_status__in + type: string + - description: nin filter for the "lifecycle_status" field + in: query + name: lifecycle_status__nin + type: string + - description: eq filter for the "operator_suspended" field + in: query + name: operator_suspended__eq + type: boolean + - description: neq filter for the "operator_suspended" field + in: query + name: operator_suspended__neq + type: boolean + - description: eq filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__eq + type: string + - description: neq filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__neq + type: string + - description: in filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__in + type: string + - description: nin filter for the "last_operator_suspended_category" field + in: query + name: last_operator_suspended_category__nin + type: string + - description: in filter for the "last_operator_suspended_updated_at" field + in: query + name: last_operator_suspended_updated_at__in + type: string + - description: nin filter for the "last_operator_suspended_updated_at" field + in: query + name: last_operator_suspended_updated_at__nin + type: string + - description: lte filter for the "last_operator_suspended_updated_at" field + format: date-time + in: query + name: last_operator_suspended_updated_at__lte + type: string + - description: gte filter for the "last_operator_suspended_updated_at" field + format: date-time + in: query + name: last_operator_suspended_updated_at__gte + type: string + - description: eq filter for the "system_suspended" field + in: query + name: system_suspended__eq + type: boolean + - description: neq filter for the "system_suspended" field + in: query + name: system_suspended__neq + type: boolean + - description: eq filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__eq + type: string + - description: neq filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__neq + type: string + - description: in filter for the "last_system_suspended_category" field + in: query + name: last_system_suspended_category__in + type: string + - description: nin filter for the "last_system_suspended_category" field in: query - name: order + name: last_system_suspended_category__nin type: string - - description: The ID of The item after which to retrieve the next page. + - description: in filter for the "last_system_suspended_updated_at" field in: query - name: after + name: last_system_suspended_updated_at__in type: string - - description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`.' + - description: nin filter for the "last_system_suspended_updated_at" field in: query - name: include + name: last_system_suspended_updated_at__nin type: string - - description: "URL encoded query string parameter to filter returned data.\n\ - \ \n##### Filtering\n\n```?filter={URL encoded query string}```\n\n\ - The 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 follows:\n```?filter=key1%3Dvalue1%26key2%3Dvalue2%26key3%3Dvalue3```\n\ - \n###### Filterable fields:\n\nThe below table lists all the fields that\ - \ can be filtered on with certain filters:\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 \ - \ \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 \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 \ - \ \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
lifecycle_status\u2713\u2713 
account_id\u2713\u2713 
auto_update\u2713\u2713 
bootstrap_expiration_date\u2713\u2713\ - \u2713
bootstrapped_timestamp\u2713\u2713\u2713
ca_id\u2713\u2713 
connector_expiration_date\u2713\u2713\u2713
created_at\u2713\u2713\u2713
custom_attributes\u2713  
deployed_state\u2713\u2713 
deployment\u2713\u2713 
description\u2713\u2713 
device_class\u2713\u2713 
device_execution_mode\u2713\ - \u2713 
device_key\u2713\u2713 
endpoint_name\u2713\u2713 
endpoint_type\u2713\u2713 
enrolment_list_timestamp\u2713\u2713\ - \u2713
etag\u2713\u2713\u2713
firmware_checksum\u2713\ - \u2713 
host_gateway\u2713\u2713 
id\u2713\ - \u2713 
manifest\u2713\u2713 
manifest_timestamp\u2713\u2713\u2713
mechanism\u2713\u2713 
mechanism_url\u2713\u2713 
name\u2713\u2713 
serial_number\u2713\u2713\ -  
state\u2713\u2713 
updated_at\u2713\u2713\u2713
vendor_id\u2713\u2713 
issuer_fingerprint\u2713\u2713 
\n \n\nThe examples below\ - \ show the queries in *unencoded* form.\n\n###### By device properties (all\ - \ properties are filterable):\n\n```state=[unenrolled|cloud_enrolling|bootstrapped|registered]```\n\ - ```device_class={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\ - \ e.g. 2016-11-30T16:25:12.1234Z\n* UTC RFC3339 without milliseconds e.g.\ - \ 2016-11-30T16:25:12Z\n* UTC RFC3339 shortened - without milliseconds and\ - \ punctuation e.g. 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 the filter.\n```{field name}[|__lte|__gte]={UTC RFC3339 date-time}```\n\ - \n###### On device custom attributes:\n\n```custom_attributes__{param}={value}```\n\ - ```custom_attributes__tag=TAG1```\n\n##### Multi-field example\n\n```state=bootstrapped&created_at__gte=2016-11-30T16:25:12.1234Z&created_at__lte=2016-12-30T00:00:00Z```\n\ - \nEncoded:\n\n```?filter=state%3Dbootstrapped%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\ - * in : `__in`\n* not in: `__nin`\n\nFor `__in` and `__nin` filters list\ - \ of parameters must be comma-separated:\n`state__nin=unenrolled,dergistered`" + - description: lte filter for the "last_system_suspended_updated_at" field + format: date-time in: query - name: filter + name: last_system_suspended_updated_at__lte + type: string + - description: gte filter for the "last_system_suspended_updated_at" field + format: date-time + in: query + name: last_system_suspended_updated_at__gte type: string - description: eq filter for the "account_id" field in: query @@ -19344,6 +26492,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 @@ -19416,16 +26580,20 @@ paths: schema: $ref: '#/definitions/DevicePage' '400': - description: Bad Request. + description: Bad request. '401': description: Not authenticated. '404': description: Unable to find page. summary: List all devices. - x-filter: *id024 + tags: + - Device directory - devices + x-filter: *id031 x-origin: /home/circleci/project/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 @@ -19440,16 +26608,16 @@ paths: $ref: '#/definitions/DeviceData' '400': description: 'Validation error: The data used to create the device did not - validate. - - ' + validate.' '401': description: Not authenticated. '403': description: Account limit reached. Could not create device. '409': description: Unique-constrained fields are used by other resources. - summary: Create a device + summary: Create a device. + tags: + - Device directory - devices x-origin: /home/circleci/project/device-directory/public/swagger.yml /v3/devices/{device-id}/certificates/{certificate-name}/renew: post: @@ -19464,7 +26632,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'' @@ -19521,14 +26689,174 @@ paths: tags: - Device security - device certificate renewals x-origin: /home/circleci/project/certificate-enrollment/public/swagger.yaml + /v3/devices/{device-id}/echo: + 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: /home/circleci/project/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: + '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' + '404': + description: Not found + schema: + $ref: '#/definitions/ErrorResponse' + summary: Return the logs for a specific device. + tags: + - Gateway Logs Public API + x-filter: + app_name: + - eq + level: + - gte + message: + - eq + timestamp: + - lte + - gte + type: + - eq + x-origin: /home/circleci/project/gateway/public/logs.yaml /v3/devices/{id}/: delete: description: Delete device. Only available for devices with a developer certificate. - Attempts to delete a device with a production certicate will return a 400 + Attempting to delete a device with a production certificate returns a 400 response. operationId: Device_destroy parameters: - - in: path + - description: The [Device ID](https://www.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. + in: path name: id required: true type: string @@ -19536,18 +26864,39 @@ paths: '204': description: Device deleted. '400': - description: Bad Request. + description: Bad request. '401': description: Not authenticated. '404': description: Unable to delete device because it can't be found. summary: Delete a device. + tags: + - Device directory - devices x-origin: /home/circleci/project/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://www.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://www.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/ \ + + -H ''Authorization: Bearer '' + + ```' operationId: Device_retrieve parameters: - - in: path + - description: The [Device ID](https://www.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. + in: path name: id required: true type: string @@ -19557,46 +26906,195 @@ paths: schema: $ref: '#/definitions/DeviceData' '400': - description: Bad Request. + description: Bad request. + '401': + description: Not authenticated. + '404': + description: Unable to find device. + summary: Get a device. + tags: + - Device directory - devices + x-origin: /home/circleci/project/device-directory/public/swagger.yml + put: + description: 'Update a specific device. + + + **Example:** + + Following example will update the specific devices description field to contain + "Testing description field". + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/devices/ \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"description": "Testing description field"}'' + + ```' + operationId: Device_update + parameters: + - description: The [Device ID](https://www.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. + in: path + name: id + required: true + type: string + - in: body + name: Device + required: true + schema: + $ref: '#/definitions/DeviceDataPutRequest' + responses: + '200': + description: Device updated. + schema: + $ref: '#/definitions/DeviceData' + '400': + description: 'Validation error: The data used to update the device did not + validate.' + '401': + description: Not authenticated. + '404': + description: Unable to update device because it can't be found. + summary: Update a device. + tags: + - Device directory - devices + x-origin: /home/circleci/project/device-directory/public/swagger.yml + /v3/devices/{id}/resume: + post: + description: '[Returning a device to service](https://www.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://www.pelion.com/docs/device-management-api/connect/) + through a [notification channel](https://www.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//resume + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "category": "lost_or_stolen", "description": "Was found, was not stolen + but miss placed"}'' + + ```' + operationId: Device_resume + parameters: + - description: The ID of the device. + in: path + name: id + required: true + type: string + - description: The device block. + in: body + name: Block + required: true + schema: &id034 + properties: + category: + description: The reference of the block category. + example: maintenance + pattern: '[a-z0-9_]{0,32}' + type: string + description: + description: The most recent description of why the device was suspended + or returned to service. + example: Suspended for maintenance. + maxLength: 2000 + type: string + type: object + responses: + '204': + description: Ok - Device returned to service. + '400': + description: Bad request. '401': - description: Not authenticated. + description: Unauthorized. '404': - description: Unable to find device. - summary: Get a device + description: Not Found - Could not find device. + summary: Return a device to service. + tags: + - Device directory - lifecycle x-origin: /home/circleci/project/device-directory/public/swagger.yml - put: - description: Update a specific device. - operationId: Device_update + /v3/devices/{id}/suspend: + post: + description: "[Suspending a device](https://www.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://www.pelion.com/docs/device-management-api/connect/)\ + \ in [notification channels](https://www.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://www.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. in: path name: id required: true type: string - - in: body - name: Device + - description: The device block. + in: body + name: Block required: true - schema: - $ref: '#/definitions/DeviceDataPutRequest' + schema: *id034 responses: - '200': - description: Device updated. - schema: - $ref: '#/definitions/DeviceData' + '204': + description: Ok - Device suspended. '400': - description: 'Validation error: The data used to update the device did not - validate. - - ' + description: Bad request. '401': - description: Not authenticated. + description: Unauthorized. '404': - description: Unable to update device because it can't be found. - summary: Update a device + description: Not found - Could not find device. + summary: Suspend a device. + tags: + - Device directory - lifecycle x-origin: /home/circleci/project/device-directory/public/swagger.yml - /v3/firmware-images/: + /v3/firmware-images: get: - description: List all firmware images. + description: 'List all firmware images. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Firmware_Image_list parameters: - description: How many objects to retrieve in the page. The minimum limit is @@ -19607,20 +27105,20 @@ paths: minimum: 2 name: limit type: integer - - description: ASC or DESC + - description: ASC or DESC. in: query name: order type: string - - description: The ID of the 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: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' 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
Field= / __eq\ @@ -19799,16 +27297,24 @@ paths: type: string responses: '200': - description: Request successful + description: Request successful. schema: $ref: '#/definitions/FirmwareImagePage' '400': - description: Bad Request + description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': - description: Unable to find content + description: Unable to find content. + schema: + $ref: '#/definitions/ErrorResponse' summary: List all images + tags: + - Device update - firmware images x-filter: created_at: - in @@ -19854,20 +27360,50 @@ paths: post: consumes: - multipart/form-data - description: Create a firmware image. + description: 'Create a firmware image. + +
**Note:** Only use this API for images smaller than 100 MB. For larger + images, [upload in chunks](https://www.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \ + + -H ''Authorization: Bearer '' \ + + -H ''Content-Type: multipart/form-data'' \ + + -F ''datafile=@myimage.bin;type=application/octet-stream'' + + -F ''description=bla bla'' \ + + -F ''name=My Linux Image'' + + ``` + + ' 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 + - 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 + - description: The name of the firmware image. + format: free text in: formData maxLength: 128 name: name @@ -19880,17 +27416,42 @@ paths: $ref: '#/definitions/FirmwareImage' '400': description: Cannot validate the data used to create the firmware image. + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden + 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 /v3/firmware-images/upload-jobs: get: - description: Get all upload jobs + description: 'Get all upload jobs. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Upload_Job_List parameters: - description: How many objects to retrieve in the page. The minimum limit is @@ -19901,20 +27462,20 @@ paths: minimum: 2 name: limit type: integer - - description: ASC or DESC + - description: ASC or DESC. in: query name: order type: string - - description: The ID of the 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: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' 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
Field= / __eq\ @@ -20066,18 +27627,20 @@ paths: type: string responses: 200: - description: Ok + description: Ok. schema: $ref: '#/definitions/UploadJobPage' 400: - description: Bad Request + description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' summary: Get all upload jobs + tags: + - Device update - firmware images x-filter: complete: - eq @@ -20114,137 +27677,202 @@ paths: - gte x-origin: /home/circleci/project/update-service/public/swagger.yml post: - description: Create a new upload job + 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: 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 parameters: - - description: Upload job + - description: Upload job. in: body name: Upload job required: true schema: properties: - description: *id025 - name: *id026 + description: *id035 + name: *id036 type: object responses: 201: - description: Success - New job created + description: Success - New job created. headers: Location: - description: URL of the metadata for the created Upload Job + description: URL of the metadata for the created upload job. type: string schema: $ref: '#/definitions/UploadJob' 400: - description: Bad Request + description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 409: - description: Conflict + description: Conflict. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new upload job + summary: Create a new upload job. + tags: + - Device update - firmware images x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/firmware-images/upload-jobs/{upload_job_id}: delete: - description: Delete an upload job + description: 'Delete an upload job. + +
+ + **Usage example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Upload_Job_Delete parameters: - - description: Upload job + - description: The upload job ID. in: path name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: 204: - description: Job deleted - no content to show + description: Job deleted - no content to show. 400: - description: Bad Request + description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' summary: Delete an upload job + tags: + - Device update - firmware images x-origin: /home/circleci/project/update-service/public/swagger.yml get: - description: Get an upload job + description: 'Get an upload job. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Upload_Job_Retrieve parameters: - - description: Upload job + - description: The upload job ID. in: path name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: 200: - description: Ok + description: Ok. schema: $ref: '#/definitions/UploadJob' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get an upload job + summary: Retrieve information for an upload job + tags: + - Device update - firmware images x-origin: /home/circleci/project/update-service/public/swagger.yml put: - description: Update an upload job + 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: 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: Upload job id + - description: The upload job ID. in: path name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: Upload job + - description: Upload job. in: body name: Upload job required: true schema: properties: - description: *id025 - name: *id026 + description: *id035 + name: *id036 type: object responses: 200: - description: Ok + description: Ok. schema: $ref: '#/definitions/UploadJob' 400: - description: Bad Request + description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' summary: Update an upload job + tags: + - Device update - firmware images x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/firmware-images/upload-jobs/{upload_job_id}/chunks: get: - description: List all metadata for uploaded chunks + description: 'List all metadata for uploaded chunks. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Upload_Job_Chunk_List parameters: - - description: Upload job + - description: The upload job ID. in: path 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 @@ -20255,16 +27883,16 @@ paths: minimum: 2 name: limit type: integer - - description: ASC or DESC + - description: ASC or DESC. in: query name: order type: string - - description: The ID of the 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: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' in: query name: include type: string @@ -20400,22 +28028,24 @@ paths: type: integer responses: 200: - description: Ok + description: Ok. schema: $ref: '#/definitions/UploadChunkInfoPage' 400: - description: Bad Request + description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' summary: List all metadata for uploaded chunks + tags: + - Device update - firmware images x-filter: created_at: - in @@ -20447,12 +28077,37 @@ paths: x-origin: /home/circleci/project/update-service/public/swagger.yml post: consumes: - - binary/octet-stream - description: Append a chunks to an upload job. To finish a job upload a zero-length + - application/octet-stream + 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). + format: byte in: header name: Content-MD5 required: true @@ -20461,12 +28116,13 @@ paths: name: Content-Length required: true type: integer - - description: Upload job ID + - description: The upload job ID. in: path name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: Chunk + - description: Chunk. in: body name: chunk required: false @@ -20475,106 +28131,189 @@ paths: type: string responses: 201: - description: Success - Chunk appended to the upload + description: Success - Chunk appended to the upload. headers: Content-Location: - description: URL of the metadata for the uploaded chunk + description: URL of the metadata for the uploaded chunk. type: string Location: - description: URL of the metadata for the uploaded chunk + description: URL of the metadata for the uploaded chunk. type: string schema: $ref: '#/definitions/UploadChunkInfo' 400: - description: Bad Request + description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' - summary: Append a chunks to an upload job + summary: Append a chunk to an upload job + tags: + - Device update - firmware images x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/firmware-images/upload-jobs/{upload_job_id}/chunks/{chunk_id}: get: - description: Get metadata about a chunk + description: 'Get metadata about a chunk. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/upload-jobs/12345678901234567890123456789012/chunks/12345678901234567890123456789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Upload_Job_Chunk_retreive parameters: - - description: Upload job + - description: The upload job ID. in: path name: upload_job_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: Chunk + - description: Chunk. in: path name: chunk_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: 200: - description: Ok + description: Ok. schema: $ref: '#/definitions/UploadChunkInfo' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' summary: Get metadata about a chunk + tags: + - Device update - firmware images x-origin: /home/circleci/project/update-service/public/swagger.yml - /v3/firmware-images/{image_id}/: + /v3/firmware-images/{image_id}: delete: - description: Delete a firmware image. + description: 'Delete a firmware image. + +
+ + **Usage example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Firmware_Image_destroy parameters: - - description: The firmware image ID + - description: The firmware image ID. in: path name: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: '204': - description: Firmware image deleted + description: Firmware image deleted. '400': - description: Bad Request + description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': - description: Firmware image not found + 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 get: - description: Retrieve a firmware image. + description: 'Retrieve a firmware image. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Firmware_Image_retrieve parameters: - description: The firmware image ID in: path name: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: '200': - description: Retrieved result successfully + description: Retrieved result successfully. schema: $ref: '#/definitions/FirmwareImage' '400': - description: Bad Request + description: Bad Request. + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': - description: Firmware image can't be found - summary: Get an image + 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 /v3/firmware-manifests/: get: - description: List firmware manifests. + description: 'List all firmware manifests. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Firmware_Manifest_list parameters: - description: How many objects to retrieve in the page. The minimum limit is @@ -20585,16 +28324,16 @@ paths: minimum: 2 name: limit type: integer - - description: ASC or DESC + - description: ASC or DESC. in: query name: order type: string - - description: The ID of the 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: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' in: query name: include type: string @@ -20738,214 +28477,929 @@ paths: in: query name: id__in type: string - - description: nin filter for the "id" field + - description: nin filter for the "id" field + in: query + name: id__nin + type: string + - description: eq filter for the "name" field + in: query + name: name__eq + type: string + - description: neq filter for the "name" field + in: query + name: name__neq + type: string + - description: in filter for the "name" field + in: query + name: name__in + type: string + - description: nin filter for the "name" field + in: query + name: name__nin + type: string + - description: in filter for the "timestamp" field + in: query + name: timestamp__in + type: string + - description: nin filter for the "timestamp" field + in: query + name: timestamp__nin + type: string + - description: lte filter for the "timestamp" field + format: date-time + in: query + name: timestamp__lte + type: string + - description: gte filter for the "timestamp" field + format: date-time + in: query + name: timestamp__gte + 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: Request successful. + schema: + $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 + x-filter: + created_at: + - in + - nin + - lte + - gte + datafile: + - eq + - neq + - in + - nin + datafile_size: + - eq + - neq + - in + - nin + description: + - eq + - neq + - in + - nin + device_class: + - eq + - neq + - in + - nin + id: + - eq + - neq + - in + - nin + name: + - eq + - neq + - in + - nin + timestamp: + - in + - nin + - lte + - gte + updated_at: + - in + - nin + - lte + - gte + x-origin: /home/circleci/project/update-service/public/swagger.yml + post: + consumes: + - multipart/form-data + description: 'Upload a firmware manifest. The API enforces a maximum manifest + size of 2KB. + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ + + -H ''Authorization: Bearer '' \ + + -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'' + + ``` + + ' + operationId: Firmware_Manifest_create + parameters: + - description: The manifest file to create. The API gateway enforces the account-specific + 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. 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': + description: Created. + schema: + $ref: '#/definitions/FirmwareManifest' + '400': + description: 'Validation error. The data used to create the firmware manifest + 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 + /v3/firmware-manifests/{manifest_id}: + delete: + description: 'Delete a firmware manifest. + +
+ + **Usage example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' + operationId: Firmware_Manifest_destroy + parameters: + - description: The firmware manifest ID. + in: path + name: manifest_id + pattern: '[A-Fa-f0-9]{32}' + required: true + type: string + responses: + '204': + 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 + get: + description: 'Retrieve a firmware manifest. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' + operationId: Firmware_Manifest_retrieve + parameters: + - description: The firmware manifest ID. + in: path + name: manifest_id + pattern: '[A-Fa-f0-9]{32}' + required: true + type: string + responses: + '200': + description: Retrieved result successfully. + schema: + $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 + /v3/identity-providers: + get: + consumes: + - application/json + description: 'Retrieve an array of identity providers. + + Note: This endpoint is restricted to administrators.' + operationId: getAllIdentityProviders + parameters: + - default: 50 + description: The number of results to return (2-1000). Default 50. + format: int32 in: query - name: id__nin - type: string - - description: eq filter for the "name" field + name: limit + required: false + type: integer + - description: The entity ID to retrieve after the given one. in: query - name: name__eq + name: after + required: false type: string - - description: neq filter for the "name" field + - default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' in: query - name: name__neq + name: order + required: false type: string - - description: in filter for the "name" field + - description: 'Comma-separated additional data to return. Currently supported: + total_count.' in: query - name: name__in + name: include + required: false type: string - - description: nin filter for the "name" field + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/IdentityProviderList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get all identity providers. + tags: + - Account - identity providers + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + post: + consumes: + - application/json + description: 'Create a new identity provider. + + Note: This endpoint is restricted to administrators.' + operationId: createIdentityProvider + parameters: + - 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: name__nin + name: discovery + type: boolean + - description: Details of the identity provider to create. + in: body + name: body + required: true + schema: + $ref: '#/definitions/IdentityProviderCreationReq' + produces: + - application/json + responses: + '201': + description: New entity created. + headers: + Content-Location: + description: /v3/identity-providers/{identity_provider_id} + type: string + Location: + description: /v3/identity-providers/{identity_provider_id} + type: string + schema: + $ref: '#/definitions/IdentityProviderInfo' + '400': + description: Error in input data, for example, name is too long. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new identity provider. + tags: + - Account - identity providers + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/identity-providers/{identity_provider_id}: + delete: + 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. + in: path + name: identity_provider_id + required: true type: string - - description: in filter for the "timestamp" field - in: query - name: timestamp__in + produces: + - application/json + responses: + '204': + description: Deleted successfully. + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden, or identity provider is in use. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + 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 + get: + description: 'Retrieve an identity provider. + + Note: This endpoint is restricted to administrators.' + operationId: getIdentityProvider + parameters: + - description: The ID of the identity provider to retrieve. + in: path + name: identity_provider_id + required: true type: string - - description: nin filter for the "timestamp" field - in: query - name: timestamp__nin + produces: + - application/json + responses: + '200': + description: Successful operation. + schema: + $ref: '#/definitions/IdentityProviderInfo' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: An identity provider not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get identity provider. + tags: + - Account - identity providers + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + put: + consumes: + - application/json + 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. + in: path + name: identity_provider_id + required: true type: string - - description: lte filter for the "timestamp" field - format: date-time + - 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: timestamp__lte + 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/IdentityProviderInfo' + '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 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 + /v3/identity-providers/{identity_provider_id}/delete-sp-certificate: + post: + consumes: + - application/json + description: 'Delete a service provider certificate. + + Note: This endpoint is restricted to administrators.' + operationId: deleteSpCertificate + parameters: + - description: The ID of the identity provider. + in: path + name: identity_provider_id + required: true + type: string + produces: + - application/json + responses: + '200': + description: Successful operation. + headers: + Content-Location: + description: /v3/identity-providers/{identity_provider_id} + type: string + schema: + $ref: '#/definitions/IdentityProviderInfo' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + 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 + /v3/identity-providers/{identity_provider_id}/generate-sp-certificate: + post: + consumes: + - application/json + 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. + in: path + name: identity_provider_id + required: true type: string - - description: gte filter for the "timestamp" field - format: date-time - in: query - name: timestamp__gte + - description: Details of the service provider certificate to generate. + in: body + name: body + required: false + schema: + $ref: '#/definitions/CertificateGenerationReq' + produces: + - application/json + responses: + '200': + description: Successful operation. + headers: + Content-Location: + description: /v3/identity-providers/{identity_provider_id} + type: string + schema: + $ref: '#/definitions/IdentityProviderInfo' + '400': + description: Error in input data, for example, invalid certificate validity + value. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + 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 + /v3/identity-providers/{identity_provider_id}/refresh-jwks: + post: + consumes: + - application/json + 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 + keys. + in: path + name: identity_provider_id + required: true type: string - - description: in filter for the "updated_at" field + produces: + - application/json + responses: + '200': + description: Successful operation. + headers: + Content-Location: + description: /v3/identity-providers/{identity_provider_id} + type: string + schema: + $ref: '#/definitions/IdentityProviderInfo' + '400': + description: Not an OIDC IdP or JWKS URI is unspecified. + schema: + $ref: '#/definitions/ErrorResponse' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + 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 + /v3/limitations: + get: + description: Retrieve an array of entitlement limitations. + operationId: getAccountLimitations + parameters: + - description: Filter for finding account limitations by inheritance. True returns + also inherited limitations. False returns only non-inherited ones. in: query - name: updated_at__in + name: inherited__eq + required: false type: string - - description: nin filter for the "updated_at" field - in: query - name: updated_at__nin + produces: + - application/json + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/AccountLimitationList' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get entitlement limitations. + tags: + - Account - entitlement limitations + x-filter: + inherited: + - eq + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/limitations/{limitation_id}: + get: + description: Retrieve an entitlement limitation. + operationId: getAccountLimitation + parameters: + - description: The ID of the limitation to be fetched. + in: path + name: limitation_id + required: true type: string - - description: lte filter for the "updated_at" field + produces: + - application/json + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/AccountLimitation' + '401': + description: Authentication failure. + schema: + $ref: '#/definitions/ErrorResponse' + '403': + description: Forbidden. + schema: + $ref: '#/definitions/ErrorResponse' + '404': + description: Limitation with the given ID not found. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Get an entitlement limitation. + tags: + - Account - entitlement limitations + x-origin: /home/circleci/project/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: updated_at__lte + name: start + required: true type: string - - description: gte filter for the "updated_at" field + - description: The end date and time for the report. The default value is the + current date-time. format: date-time in: query - name: updated_at__gte + name: end + required: false type: string + produces: + - application/json responses: - '200': - description: Request successful + 200: + description: OK. schema: - $ref: '#/definitions/FirmwareManifestPage' - '400': - description: Bad Request - '401': - description: Not authenticated - '404': - description: Unable to find content - summary: List manifests - x-filter: - created_at: - - in - - nin - - lte - - gte - datafile: - - eq - - neq - - in - - nin - datafile_size: - - eq - - neq - - in - - nin - description: - - eq - - neq - - in - - nin - device_class: - - eq - - neq - - in - - nin - id: - - eq - - neq - - in - - nin - name: - - eq - - neq - - in - - nin - timestamp: - - in - - nin - - lte - - gte - updated_at: - - in - - nin - - lte - - gte - x-origin: /home/circleci/project/update-service/public/swagger.yml - post: - consumes: - - multipart/form-data - description: Upload a firmware manifest. The API enforces a maximum size of - manifests of 2 KB. - operationId: Firmware_Manifest_create + $ref: '#/definitions/StatisticsReportListResponse' + summary: Retrieve provisioning statistics for devices in your factories. + tags: + - Factory manufacturing statistics + x-origin: /home/circleci/project/manufacturing-statistics/public/swagger.yml + /v3/metrics: + get: + description: This REST API is used to get account-specific statistics. + operationId: getMetrics parameters: - - description: The manifest file to create. The API gateway enforces the account-specific - file size. - in: formData - name: datafile + - description: "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:\n\n- `transactions`\n\ + - `full_registrations`\n- `registration_updates`\n- `deleted_registrations`\n\ + - `expired_registrations`\n- `bootstraps_successful`\n- `bootstraps_failed`\n\ + - `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. 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://www.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\"\ + : 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" + in: query + name: include required: true - type: file - - description: The description of the firmware manifest - in: formData - name: description + 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. + + ' + format: date + in: query + name: start required: false type: string - - description: The key table of pre-shared keys for devices - in: formData - name: key_table + - 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. + + ' + format: date + in: query + name: end required: false - type: file - - description: The name of the firmware manifest - in: formData - maxLength: 128 - name: name type: string - responses: - '201': - description: Created - schema: - $ref: '#/definitions/FirmwareManifest' - '400': - description: 'Validation error. The data used to create the firmware manifest - did not validate and/or the manifest uploaded exceeded 2 KB in size. + - 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. - ' - '401': - description: Not authenticated - '403': - description: Forbidden - summary: Upload a manifest - x-origin: /home/circleci/project/update-service/public/swagger.yml - /v3/firmware-manifests/{manifest_id}/: - delete: - description: Delete a firmware manifest. - operationId: Firmware_Manifest_destroy - parameters: - - description: The firmware manifest ID - in: path - name: manifest_id - required: true + ' + in: query + name: period + required: false type: string - responses: - '204': - description: Firmware manifest deleted - '400': - description: Bad Request - '401': - description: Not authenticated - '404': - description: Firmware manifest not found - summary: Delete a manifest - x-origin: /home/circleci/project/update-service/public/swagger.yml - get: - description: Retrieve a firmware manifest. - operationId: Firmware_Manifest_retrieve - parameters: - - description: The firmware manifest ID - in: path - name: manifest_id + - 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. + + ' + 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. + + ' + 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\"\ + ,\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\"\ + ,\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" + 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. + + ' + in: query + name: order + required: false + type: string + produces: + - application/json responses: - '200': - description: Retrieved result successfully + 200: + description: Successful response. schema: - $ref: '#/definitions/FirmwareManifest' - '400': - description: Bad request - '401': - description: Not authenticated - '404': - description: Firmware manifest can't be found - summary: Get a manifest - x-origin: /home/circleci/project/update-service/public/swagger.yml - /v3/identity-providers: + $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: /home/circleci/project/statistics/public/rest-api-v3-external.yaml + /v3/policy-groups: get: - consumes: - - application/json - description: Retrieve identity providers in an array. - operationId: getAllIdentityProviders + 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. @@ -20954,14 +29408,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 @@ -20972,13 +29426,18 @@ paths: 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/IdentityProviderList' + $ref: '#/definitions/GroupSummaryList' '401': description: Authentication failure. schema: @@ -20987,38 +29446,49 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get all identity providers. + summary: Get policy groups. tags: - - Account - identity providers + - Account - policy groups + x-filter: + name: + - eq x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: consumes: - application/json - description: Create a new identity provider. - operationId: createIdentityProvider + 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 identity provider to create. + - description: Details of the group to create. in: body name: body required: true schema: - $ref: '#/definitions/IdentityProviderCreationReq' + $ref: '#/definitions/GroupCreationInfo' produces: - application/json responses: '201': description: New entity created. - headers: - Content-Location: - description: /v3/identity-providers/{identity_provider_id} - type: string - Location: - description: /v3/identity-providers/{identity_provider_id} - type: string schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, name is too long. + description: Error in input data, for example, invalid group name. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21029,18 +29499,36 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new identity provider. + '409': + description: A group with that name already exists. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Create a new group. tags: - - Account - identity providers + - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/identity-providers/{identity_provider_id}: + /v3/policy-groups/{group_id}: delete: - description: Delete an identity provider by ID. - operationId: deleteIdentityProvider + 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 identity provider to delete. + - description: The ID of the group to delete. in: path - name: identity_provider_id + name: group_id required: true type: string produces: @@ -21053,24 +29541,36 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '403': - description: Forbidden, or identity provider is in use. + description: Forbidden, or Administrators group cannot be removed. schema: $ref: '#/definitions/ErrorResponse' '404': - description: 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: Delete a group. tags: - - Account - identity providers + - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: Retrieve by ID. - operationId: getIdentityProvider + 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 identity provider to retrieve. + - description: The ID of the policy group to retrieve. in: path - name: identity_provider_id + name: group_id required: true type: string produces: @@ -21079,7 +29579,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/IdentityProviderInfo' + $ref: '#/definitions/GroupSummary' '401': description: Authentication failure. schema: @@ -21089,39 +29589,58 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get identity provider by ID. + summary: Get a policy group. tags: - - Account - identity providers + - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + post: consumes: - application/json - description: Update an existing identity provider. - operationId: updateIdentityProvider + description: 'Add users and API keys to a group. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + + ```' + operationId: addSubjectsToGroup parameters: - - description: The ID of the identity provider to update. + - 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 identity provider to update. + - description: A list of users and API keys to add to the group. in: body name: body required: true schema: - $ref: '#/definitions/IdentityProviderUpdateReq' + $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, missing name. + description: Error in input data, for example, the user or API key does + not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21133,84 +29652,61 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: 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 - /v3/identity-providers/{identity_provider_id}/delete-sp-certificate: - post: - consumes: - - application/json - description: Delete a service provider certificate. - operationId: deleteSpCertificate - parameters: - - description: The ID of the identity provider. - in: path - name: identity_provider_id - required: true - type: string - produces: - - application/json - responses: - '200': - description: Successful operation. - headers: - Content-Location: - description: /v3/identity-providers/{identity_provider_id} - type: string - schema: - $ref: '#/definitions/IdentityProviderInfo' - '401': - description: Authentication failure. - schema: - $ref: '#/definitions/ErrorResponse' - '403': - description: Forbidden. + description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - '404': - description: Identity provider not found. + '409': + description: The user of this API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Delete the service provider certificate. + summary: Add members to a group. tags: - - Account - identity providers + - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/identity-providers/{identity_provider_id}/generate-sp-certificate: - post: + put: consumes: - application/json - description: Generate a new service provider certificate. - operationId: generateSpCertificate + description: 'Update a group name. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestGroup2"}'' + + ```' + operationId: updateGroupName parameters: - - description: The ID of the identity provider to generate a certificate for. + - 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 service provider certificate to generate. + - description: Details of the group to create. in: body name: body - required: false + required: true schema: - $ref: '#/definitions/CertificateGenerationReq' + $ref: '#/definitions/GroupUpdateInfo' produces: - application/json responses: '200': description: Successful operation. - headers: - Content-Location: - description: /v3/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: Error in input data, for example, the group name is too long. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21222,173 +29718,104 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Identity provider not found. + description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Generate a new service provider certificate. + summary: Update the group name. tags: - - Account - identity providers + - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/metrics: - get: - description: This REST API is used to get account-specific statistics. - operationId: getMetrics - parameters: - - description: "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:\n\n- `transactions`\n\ - - `full_registrations`\n- `registration_updates`\n- `deleted_registrations`\n\ - - `expired_registrations`\n- `bootstraps_successful`\n- `bootstraps_failed`\n\ - - `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)\ - \ 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\"\ - : 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" - 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. + /v3/policy-groups/{group_id}/api-keys: + delete: + consumes: + - application/json + deprecated: true + description: 'Remove API keys from groups. - ' - 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. - ' - 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. + **Example:** - ' - 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. + ``` - ' - 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. + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + \ - ' - 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\"\ - ,\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\"\ - ,\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" - 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. + -H ''Authorization: Bearer '' \ - ' - in: query - name: order - required: false + -H ''content-type: application/json'' \ + + -d ''{ "apikeys": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' + + ```' + operationId: removeApiKeysFromGroup + 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. + in: body + name: body + required: true + schema: + $ref: '#/definitions/SubjectList' produces: - application/json responses: - 200: - description: Successful response. + '200': + description: Successful operation. schema: - $ref: '#/definitions/successful-response' - 400: - description: Bad request. + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the array of API keys is + missing. schema: - $ref: '#/definitions/error-response' - 401: + $ref: '#/definitions/ErrorResponse' + '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: Remove API keys from a group. tags: - - Statistics - x-origin: /home/circleci/project/statistics/public/rest-api-v3-external.yaml - /v3/policy-groups: + - 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' + links: [] + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: 'Retrieve all group information. + 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 \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getAllGroups + operationId: getApiKeysOfGroup parameters: + - 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 @@ -21396,14 +29823,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 @@ -21414,18 +29841,13 @@ paths: 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' + $ref: '#/definitions/ApiKeyInfoRespList' '401': description: Authentication failure. schema: @@ -21434,47 +29856,132 @@ 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' + summary: Get the API keys of a policy group. tags: - Account - policy groups - x-filter: - name: - - eq + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml post: - consumes: + 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}/api-keys + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "apikeys" : ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' + + ```' + 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 - description: 'Create a new group. + 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. 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' + '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: + deprecated: true + description: 'Add API keys to the group. **Example:** ``` - curl -X POST 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}/api-keys/add + \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ - -H ''content-type: application/json'' -d ''{"name": "MyGroup1"}'' + -H ''content-type: application/json'' \ + + -d ''{ "apikeys" : ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: createGroup + operationId: addListedApiKeysToGroup parameters: - - description: Details of the group to create. + - 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/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: Error in input data, for example, the group Id does not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21482,88 +29989,150 @@ 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' '409': - description: A group with that name already exists. + description: The API key is a member of the group already. schema: $ref: '#/definitions/ErrorResponse' - summary: Create a new group. + summary: Add API Keys to the group. tags: - Account - policy groups + 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: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}: - delete: - description: 'Delete a group. + /v3/policy-groups/{group_id}/api-keys/remove: + post: + 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 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 ''{ "apikeys" : ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: deleteGroup + operationId: removeListedApiKeysFromGroup 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-deprecation: + 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 + /v3/policy-groups/{group_id}/applications: get: - description: 'Retrieve general information about a group. + 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} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/applications \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getGroupSummary + operationId: getApplicationsOfGroup 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/ApplicationList' '401': description: Authentication failure. schema: @@ -21576,38 +30145,38 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get group information. + summary: Get the applications of a policy group. tags: - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/applications/add: post: - consumes: - - application/json - description: 'Add users and API keys to a group. + description: 'Add applications 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}/applications/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]}'' + -d ''{ "applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: addSubjectsToGroup + operationId: addListedApplicationsToGroup 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 applications to add to the group. in: body name: body required: true @@ -21619,10 +30188,9 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $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': @@ -21638,55 +30206,58 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '409': - description: The user of this 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 members to a group. + summary: Add applications to the group. tags: - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - put: + /v3/policy-groups/{group_id}/applications/remove: + post: consumes: - application/json - description: 'Update a group name. + description: 'Remove applications from groups. **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}/applications/remove \ - -H ''Authorization: Bearer '' \ + -H ''Authorization: Bearer '' \ -H ''content-type: application/json'' \ - -d ''{"name": "TestGroup2"}'' + -d ''{ "applications": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: updateGroupName + operationId: removeListedApplicationsFromGroup 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 applications to remove from the group. in: body name: body required: true schema: - $ref: '#/definitions/GroupUpdateInfo' + $ref: '#/definitions/SubjectList' produces: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $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 array of applications + is missing. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21701,39 +30272,43 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Update the group name. + summary: Remove applications from a group. tags: - Account - policy groups x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}/api-keys: + /v3/policy-groups/{group_id}/users: delete: consumes: - application/json - description: 'Remove API keys from groups. + deprecated: true + description: 'Manage policy groups. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + 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: removeApiKeysFromGroup + operationId: removeUsersFromGroup 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 users to remove from the group. in: body name: body required: true @@ -21745,10 +30320,10 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $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 user removing themselves + from the Administrators group. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21763,25 +30338,32 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove API keys from a group. + summary: Remove users from a group. tags: - Account - policy groups + x-deprecation: + comment: This endpoint is deprecated, POST https://api.us-east-1.mbedcloud.com/v3/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 get: - description: 'Manage policy groups. + 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/policy-groups/{group_id}/api-keys + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' - operationId: getApiKeysOfGroup + operationId: getUsersOfGroup parameters: - description: The ID of the group. in: path @@ -21795,14 +30377,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 @@ -21813,13 +30395,29 @@ 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. + 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: - application/json responses: '200': description: Successful operation. schema: - $ref: '#/definitions/ApiKeyInfoRespList' + $ref: '#/definitions/UserInfoRespList' '401': description: Authentication failure. schema: @@ -21832,39 +30430,45 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the API keys of a group. + summary: Get users of a policy group. tags: - Account - policy groups + x-filter: + status: + - eq + - in + - nin x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/policy-groups/{group_id}/users: - delete: - consumes: - - application/json - description: 'Manage policy groups. + post: + deprecated: true + description: 'Add users to the group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users + 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 ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + -d ''{ "users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' ```' - operationId: removeUsersFromGroup + operationId: addUsersToGroup. parameters: - description: The ID of the group. in: path name: group_id required: true type: string - - description: A list of users to remove from the group. + - description: A list of API keys to add to the group. in: body name: body required: true @@ -21876,10 +30480,9 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/GroupSummary' '400': - description: Error in input data, for example, the user removing themselves - from the Administrators group. + description: Error in input data, for example, the group Id does not exist. schema: $ref: '#/definitions/ErrorResponse' '401': @@ -21894,79 +30497,134 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Remove users from a group. + '409': + description: The user is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add users to the group. tags: - Account - policy groups + x-deprecation: + comment: This endpoint is deprecated, POST https://api.us-east-1.mbedcloud.com/v3/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 - get: - description: 'Retrieve users of a group with details. + /v3/policy-groups/{group_id}/users/add: + post: + description: 'Add users to the group. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/users + 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: getUsersOfGroup + operationId: addListedUsersToGroup. parameters: - 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 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: 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. - 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 + - 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 user is a member of the group already. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Add users to the group. + tags: + - Account - policy groups + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml + /v3/policy-groups/{group_id}/users/remove: + post: + consumes: + - application/json + description: 'Remove users from a policy group. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "users": ["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"] + }'' + + ```' + operationId: removeListedUsersFromGroup + parameters: + - description: The ID of the group. + 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/UserInfoRespList' + $ref: '#/definitions/GroupSummary' + '400': + description: Error in input data, for example, the user removing themselves + from the Administrators group. + schema: + $ref: '#/definitions/ErrorResponse' '401': description: Authentication failure. schema: @@ -21979,14 +30637,9 @@ paths: description: A group with that ID does not exist. schema: $ref: '#/definitions/ErrorResponse' - summary: Get users of a group. + summary: Remove users from a group. tags: - Account - policy groups - x-filter: - status: - - eq - - in - - nin x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml /v3/server-credentials: get: @@ -22000,7 +30653,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getAllServerCredentials @@ -22038,7 +30691,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Fetch all (Bootstrap and LwM2M) server credentials. tags: - - Service security - server credentials + - Security and identity - server credentials x-origin: /home/circleci/project/connector-ca/public/swagger.yaml /v3/server-credentials/bootstrap: get: @@ -22054,7 +30707,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/bootstrap \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getBootstrapServerCredentials @@ -22091,7 +30744,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Fetch bootstrap server credentials. tags: - - Service security - server credentials + - Security and identity - server credentials x-origin: /home/circleci/project/connector-ca/public/swagger.yaml /v3/server-credentials/lwm2m: get: @@ -22107,7 +30760,7 @@ paths: curl -X GET http://api.us-east-1.mbedcloud.com/v3/server-credentials/lwm2m \ - -H "Authorization: Bearer " + -H "Authorization: Bearer " ```' operationId: getL2M2MServerCredentials @@ -22144,7 +30797,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Fetch LwM2M server credentials. tags: - - Service security - server credentials + - Security and identity - server credentials x-origin: /home/circleci/project/connector-ca/public/swagger.yaml /v3/service-packages: get: @@ -22163,7 +30816,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getServicePackages @@ -22248,6 +30901,8 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Get all service packages. + tags: + - Usage - billing reports x-origin: /home/circleci/project/billing/public/swagger-public-apis.yaml /v3/service-packages-quota: get: @@ -22262,7 +30917,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/service-packages-quota \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getServicePackageQuota @@ -22310,14 +30965,15 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Service package quota. + tags: + - Usage - billing reports x-origin: /home/circleci/project/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:** @@ -22327,13 +30983,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 @@ -22348,6 +31003,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. @@ -22371,7 +31034,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 @@ -22415,10 +31078,12 @@ paths: schema: $ref: '#/definitions/InternalServerErrorResponse' summary: Service package quota history. + tags: + - Usage - service packages x-origin: /home/circleci/project/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:** @@ -22427,7 +31092,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllCertificates @@ -22439,14 +31104,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 @@ -22515,6 +31180,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 @@ -22538,8 +31208,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 @@ -22567,6 +31239,8 @@ paths: - application/json description: 'Upload new trusted certificates. + Note: This endpoint is restricted to administrators. + **Example:** @@ -22574,7 +31248,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'' \ @@ -22606,7 +31280,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': @@ -22615,7 +31290,7 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Upload a new trusted certificate. tags: - - Device security - certificates + - Security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml /v3/trusted-certificates/{cert_id}: delete: @@ -22629,7 +31304,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 @@ -22653,15 +31328,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 + - Security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml get: - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve a trusted certificate. **Example:** @@ -22671,7 +31346,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 @@ -22697,12 +31372,12 @@ 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 + - Security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml put: consumes: @@ -22717,7 +31392,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'' \ @@ -22757,7 +31432,7 @@ paths: schema: $ref: '#/definitions/ErrorResponse' '404': - description: Certificate not found. + description: A certificate not found. schema: $ref: '#/definitions/ErrorResponse' '409': @@ -22766,11 +31441,25 @@ paths: $ref: '#/definitions/ErrorResponse' summary: Update trusted certificate. tags: - - Device security - certificates + - Security and identity - certificates x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml - /v3/update-campaigns/: + /v3/update-campaigns: get: - description: Get update campaigns for devices specified by a filter. + description: 'Get update campaigns for devices specified by a filter. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_list parameters: - description: How many objects to retrieve in the page. The minimum limit is @@ -22782,16 +31471,16 @@ paths: name: limit type: integer - description: 'The order of the records. Acceptable values: ASC, DESC. Default: - ASC' + ASC.' in: query name: order type: string - - description: The ID of the 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: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' in: query name: include type: string @@ -23032,19 +31721,27 @@ paths: type: string responses: '200': - description: Request successful + description: Request successful. schema: $ref: '#/definitions/UpdateCampaignPage' '400': description: 'Validation error: The data used to update the campaign did - not validate + not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': - description: Unable to find content + description: Unable to find content. + schema: + $ref: '#/definitions/ErrorResponse' summary: List all campaigns + tags: + - Device update - campaigns x-filter: created_at: - in @@ -23103,10 +31800,17 @@ paths: - gte x-origin: /home/circleci/project/update-service/public/swagger.yml post: - description: Create an update campaign. + 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" operationId: Update_Campaign_create parameters: - - description: Update campaign + - description: Update campaign. in: body name: campaign required: true @@ -23114,81 +31818,146 @@ paths: $ref: '#/definitions/UpdateCampaignPostRequest' responses: '201': - description: Update campaign created + description: Update campaign created. schema: $ref: '#/definitions/UpdateCampaign' '400': description: 'Validation error: The data used to create the campaign did - not validate + not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + 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 - /v3/update-campaigns/{campaign_id}/: + /v3/update-campaigns/{campaign_id}: delete: - description: Delete an update campaign. + description: 'Delete an update campaign. + +
+ + **Usage example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_destroy parameters: - - description: The ID of the update campaign + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: '204': - description: Update campaign deleted + description: Update campaign deleted. '400': description: 'Validation error: The data used to update the campaign did - not validate + not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': - description: Update campaign can't be found + description: Update campaign can't be found. + schema: + $ref: '#/definitions/ErrorResponse' 409: description: Conflict - Cannot delete the campaign while in the current phase. schema: $ref: '#/definitions/ErrorResponse' summary: Delete a campaign + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml get: - description: Get an update campaign. + description: 'Get an update campaign. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_retrieve parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: '200': - description: Retrieved result successfully + description: Retrieved result successfully. schema: $ref: '#/definitions/UpdateCampaign' '400': description: 'Validation error: The data used to update the campaign did - not validate + not validate. ' + schema: + $ref: '#/definitions/ErrorResponse' '401': - description: Not authenticated + description: Not authenticated. + schema: + $ref: '#/definitions/ErrorResponse' '404': - description: Unable to find campaign + 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 put: - description: Modify an update campaign. + 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" operationId: Update_Campaign_update parameters: - - in: path + - description: The campaign ID. + in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: Update campaign + - description: Update campaign. in: body name: campaign required: true @@ -23196,31 +31965,49 @@ paths: $ref: '#/definitions/UpdateCampaignPutRequest' responses: '200': - description: Update campaign updated + description: Update campaign updated. schema: $ref: '#/definitions/UpdateCampaign' '400': description: 'Validation error: The data used to update the campaign did - not validate + not validate. ' '401': - description: Not authenticated + description: Not authenticated. '403': description: Fields apart from 'name', 'description' and 'state' cannot be modified when the state is not 'draft'. '404': - description: Update campaign can't be found + description: Update campaign can't be found. summary: Modify a campaign + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/update-campaigns/{campaign_id}/archive: post: - description: This command will archive a campaign. + description: 'Archive a campaign. + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_archive parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23228,22 +32015,48 @@ 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 - /v3/update-campaigns/{campaign_id}/campaign-device-metadata/: + /v3/update-campaigns/{campaign_id}/campaign-device-metadata: get: - description: Get campaign device metadata. + description: 'Get metadata for all devices in a campaign. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_Metadata_list parameters: - - description: The update campaign ID + - description: The campaign ID. in: path 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 @@ -23254,88 +32067,150 @@ paths: minimum: 2 name: limit type: integer - - description: ASC or DESC + - description: ASC or DESC. in: query name: order type: string - - description: The ID of the 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: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' in: query name: include type: string responses: 200: - description: Request successful + description: Request successful. schema: $ref: '#/definitions/CampaignDeviceMetadataPage' 401: description: Unauthorized summary: List all campaign device metadata + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml - /v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}/: + /v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}: get: - description: Get update campaign metadata. + description: 'Get update campaign metadata for a specific device. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_Metadata_retrieve parameters: - - description: The update campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: The campaign device metadata ID + - description: The campaign device metadata ID. in: path name: campaign_device_metadata_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: 200: - description: Request successful + description: Request successful. schema: $ref: '#/definitions/CampaignDeviceMetadata' 401: - description: Unauthorized + description: Unauthorized. 404: - description: Not Found + description: Not Found. summary: Get a campaign device metadata + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/update-campaigns/{campaign_id}/metrics: get: - description: Get detailed statistics of a campaign. + deprecated: true + description: '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. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123467f9012ab567890120000789012/metrics + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_metrics parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: 200: - description: Request successful + description: Request successful. schema: $ref: '#/definitions/CampaignMetrics' 401: - description: Unauthorized + 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 /v3/update-campaigns/{campaign_id}/start: post: - description: This command will begin the process of starting a campaign. + description: 'Start a campaign. + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_start parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23343,143 +32218,284 @@ 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 - /v3/update-campaigns/{campaign_id}/statistics/: + /v3/update-campaigns/{campaign_id}/statistics: get: - description: Get a list of statistics for a campaign + 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 '' + + ``` + + ' operationId: Update_Campaign_statistics_list parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: 200: - description: OK + description: OK. schema: $ref: '#/definitions/EventTypeSummaryList' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get a list of statistics for a campaign + summary: Get statistics for a campaign + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}: get: - description: Get a summary status + 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 + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: The summary status. For example, fail + - description: The summary status. For example, fail. + enum: &id037 + - fail + - success + - info + - skipped in: path name: summary_status_id required: true type: string responses: 200: - description: OK + description: OK. schema: $ref: '#/definitions/EventTypeSummary' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' - summary: Get a summary status + summary: Get a status summary + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml - /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/: + /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types: get: - description: Get a list of events grouped by summary + description: 'Get a list of events grouped by summary. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_event_types_list parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: The summary status. For example, fail + - description: The summary status. For example, fail. + enum: *id037 in: path name: summary_status_id required: true type: string responses: 200: - description: OK + description: OK. schema: $ref: '#/definitions/EventTypeList' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' summary: Get a list of events grouped by summary + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id}: get: - description: Get an event type for a campaign + description: 'Get the count for a specific event type, for example, succeeded, + failed or skipped. + +
+ + **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 '' + + ``` + + ' operationId: Update_Campaign_event_types_retrieve parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - - description: The summary status. For example, fail + - 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: 200: - description: OK + description: OK. schema: $ref: '#/definitions/EventType' 401: - description: Not Authenticated + description: Not Authenticated. schema: $ref: '#/definitions/ErrorResponse' 404: - description: Not Found + description: Not Found. schema: $ref: '#/definitions/ErrorResponse' summary: Get an event type for a campaign + tags: + - Device update - campaigns x-origin: /home/circleci/project/update-service/public/swagger.yml /v3/update-campaigns/{campaign_id}/stop: post: - description: This command will begin the process of stopping a campaign. + description: 'Stop a campaign. Stopping is a process that requires the campaign + go through several [phases](https://www.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html). + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop + \ + + -H ''Authorization: Bearer '' + + ``` + + ' operationId: Update_Campaign_stop parameters: - - description: The campaign ID + - description: The campaign ID. in: path name: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string responses: @@ -23487,17 +32503,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 /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:** @@ -23506,7 +32534,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllInvitations @@ -23518,14 +32546,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 @@ -23550,7 +32578,7 @@ 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: @@ -23562,6 +32590,8 @@ paths: - application/json description: 'Invite a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -23569,7 +32599,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'' \ @@ -23611,6 +32641,8 @@ paths: delete: description: 'Delete an active user invitation sent to a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -23619,7 +32651,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 @@ -23653,6 +32685,8 @@ paths: get: description: 'Retrieve the details of an active user invitation. + Note: This endpoint is restricted to administrators. + **Example:** @@ -23661,7 +32695,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 @@ -23696,7 +32730,9 @@ paths: x-origin: /home/circleci/project/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:** @@ -23705,7 +32741,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getAllUsers @@ -23717,14 +32753,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 @@ -23776,7 +32812,7 @@ paths: description: Forbidden. schema: $ref: '#/definitions/ErrorResponse' - summary: Get the details of all users. + summary: Get users. tags: - Account - users x-filter: @@ -23792,8 +32828,10 @@ paths: 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:** @@ -23802,7 +32840,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'' \ @@ -23850,109 +32888,12 @@ paths: 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 /v3/users/{user_id}: delete: description: 'Delete a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -23960,7 +32901,7 @@ paths: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: deleteUser @@ -23998,6 +32939,8 @@ paths: get: description: 'Retrieve the details of a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -24005,7 +32948,7 @@ paths: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' operationId: getUser @@ -24041,7 +32984,9 @@ paths: put: consumes: - application/json - description: 'Update user details + description: 'Update user details. + + Note: This endpoint is restricted to administrators. **Example:** @@ -24050,7 +32995,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'' \ @@ -24105,8 +33050,11 @@ paths: delete: consumes: - application/json + deprecated: true description: 'Remove user from groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -24115,7 +33063,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'' \ @@ -24143,7 +33091,7 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $ref: '#/definitions/UserInfoResp' '400': description: Error in input data. schema: @@ -24163,9 +33111,16 @@ paths: summary: Remove user from groups. tags: - Account - users + x-deprecation: + comment: This endpoint is deprecated, use POST https://api.us-east-1.mbedcloud.com/v3/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: /home/circleci/project/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:** @@ -24175,7 +33130,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 @@ -24187,14 +33142,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 @@ -24229,15 +33184,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 post: consumes: - application/json + deprecated: true description: 'Add user to groups. + Note: This endpoint is restricted to administrators. + **Example:** @@ -24246,7 +33204,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'' \ @@ -24274,7 +33232,79 @@ paths: '200': description: Successful operation. schema: - $ref: '#/definitions/UpdatedResponse' + $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: A 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: + - Account - users + x-deprecation: + comment: This endpoint is deprecated, use POST https://api.us-east-1.mbedcloud.com/v3/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/users/{user_id}/groups/add: + post: + consumes: + - application/json + description: 'Add user to groups. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: addUserToListedGroups + parameters: + - 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' '400': description: Error in input data. schema: @@ -24299,6 +33329,69 @@ paths: tags: - Account - users x-origin: /home/circleci/project/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:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups/remove + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''["0162056a9a1586f30242590700000000","0117056a9a1586f30242590700000000"]'' + + ```' + operationId: removeUserFromListedGroups + parameters: + - 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/GroupIdList' + produces: + - application/json + responses: + '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: A user with that ID does not exist. + schema: + $ref: '#/definitions/ErrorResponse' + summary: Remove user from groups. + tags: + - Account - users + x-origin: /home/circleci/project/auth/public/iam-identity-swagger.yaml produces: - application/json schemes: diff --git a/api_specifications/public/sdk_foundation_definition.json b/api_specifications/public/sdk_foundation_definition.json index d552cd9c..c2c51d2a 100644 --- a/api_specifications/public/sdk_foundation_definition.json +++ b/api_specifications/public/sdk_foundation_definition.json @@ -14,19 +14,42 @@ "subtenant_user_invitation", "api_key", "subtenant_api_key", - "account" + "account", + "policy_group", + "subtenant_policy_group", + "identity_provider", + "subtenant_identity_provider", + "saml2_request", + "oidc_request", + "oidc_request_claim_mapping", + "identity_provider_public_key" ], "enums": [ + "policy_inherited_type_enum", + "login_profile_type_enum", "user_status_enum", "user_order_enum", "subtenant_user_status_enum", + "subtenant_user_order_enum", "user_invitation_order_enum", "api_key_status_enum", "api_key_order_enum", "subtenant_api_key_status_enum", + "subtenant_api_key_order_enum", "account_status_enum", "account_mfa_status_enum", - "account_order_enum" + "account_business_model_enum", + "account_order_enum", + "policy_group_order_enum", + "subtenant_policy_group_order_enum", + "identity_provider_status_enum", + "identity_provider_type_enum", + "identity_provider_order_enum", + "identity_provider_algorithm_enum", + "subtenant_identity_provider_status_enum", + "subtenant_identity_provider_order_enum", + "subtenant_identity_provider_algorithm_enum", + "oidc_request_token_mode_enum" ], "_key": "Accounts" }, @@ -64,10 +87,14 @@ ], "enums": [ "campaign_device_metadata_deployment_state_enum", + "update_campaign_strategy_enum", + "update_campaign_phase_enum", "update_campaign_order_enum", "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" @@ -79,17 +106,16 @@ "device_events", "device_enrollment_bulk_create", "device_enrollment_bulk_delete", - "device_enrollment", - "device_enrollment_denial" + "device_enrollment" ], "enums": [ + "device_lifecycle_status_enum", "device_deployed_state_enum", "device_mechanism_enum", "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" }, @@ -121,6 +147,17 @@ } ], "enums": [ + { + "entity_name": "account", + "field_name": "business_model", + "enum_name": "account_business_model_enum", + "values": [ + "active_device_business_model", + "api_calls_1_business_model" + ], + "group_id": "Accounts", + "_key": "account_business_model_enum" + }, { "entity_name": "account", "field_name": "mfa_status", @@ -380,26 +417,26 @@ "_key": "device_enrollment_bulk_delete_status_enum" }, { - "entity_name": "device_enrollment_denial", + "entity_name": "device_enrollment", "field_name": "order", - "enum_name": "device_enrollment_denial_order_enum", + "enum_name": "device_enrollment_order_enum", "values": [ "ASC", "DESC" ], "group_id": "Devices", - "_key": "device_enrollment_denial_order_enum" + "_key": "device_enrollment_order_enum" }, { - "entity_name": "device_enrollment", - "field_name": "order", - "enum_name": "device_enrollment_order_enum", + "entity_name": "device", + "field_name": "lifecycle_status", + "enum_name": "device_lifecycle_status_enum", "values": [ - "ASC", - "DESC" + "blocked", + "enabled" ], "group_id": "Devices", - "_key": "device_enrollment_order_enum" + "_key": "device_lifecycle_status_enum" }, { "entity_name": "device", @@ -437,6 +474,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", @@ -448,6 +496,71 @@ "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", + "enum_name": "identity_provider_algorithm_enum", + "values": [ + "EC224", + "EC256", + "EC384", + "EC521", + "ECDSA224", + "ECDSA256", + "ECDSA384", + "ECDSA521", + "RSA2048", + "RSA3072" + ], + "group_id": "Accounts", + "_key": "identity_provider_algorithm_enum" + }, + { + "entity_name": "identity_provider", + "field_name": "order", + "enum_name": "identity_provider_order_enum", + "values": [ + "ASC", + "DESC" + ], + "group_id": "Accounts", + "_key": "identity_provider_order_enum" + }, + { + "entity_name": "identity_provider", + "field_name": "status", + "enum_name": "identity_provider_status_enum", + "values": [ + "ACTIVE", + "SUSPENDED" + ], + "group_id": "Accounts", + "_key": "identity_provider_status_enum" + }, + { + "entity_name": "identity_provider", + "field_name": "identity_provider_type", + "enum_name": "identity_provider_type_enum", + "values": [ + "MBED", + "NATIVE", + "OIDC", + "SAML2" + ], + "group_id": "Accounts", + "_key": "identity_provider_type_enum" + }, { "entity_name": "light_theme_color", "field_name": "reference", @@ -519,6 +632,64 @@ "group_id": "Branding", "_key": "light_theme_image_reference_enum" }, + { + "entity_name": "login_profile", + "field_name": "login_profile_type", + "enum_name": "login_profile_type_enum", + "values": [ + "MBED", + "NATIVE", + "OIDC", + "SAML2" + ], + "group_id": "Accounts", + "_key": "login_profile_type_enum" + }, + { + "entity_name": "oidc_request", + "field_name": "token_request_mode", + "enum_name": "oidc_request_token_mode_enum", + "values": [ + "GET", + "POST" + ], + "group_id": "Accounts", + "_key": "oidc_request_token_mode_enum" + }, + { + "entity_name": "policy_group", + "field_name": "order", + "enum_name": "policy_group_order_enum", + "values": [ + "ASC", + "DESC" + ], + "group_id": "Accounts", + "_key": "policy_group_order_enum" + }, + { + "entity_name": "policy", + "field_name": "inherited_type", + "enum_name": "policy_inherited_type_enum", + "values": [ + "account", + "template", + "tier_template" + ], + "group_id": "Accounts", + "_key": "policy_inherited_type_enum" + }, + { + "entity_name": "subtenant_api_key", + "field_name": "order", + "enum_name": "subtenant_api_key_order_enum", + "values": [ + "ASC", + "DESC" + ], + "group_id": "Accounts", + "_key": "subtenant_api_key_order_enum" + }, { "entity_name": "subtenant_api_key", "field_name": "status", @@ -601,6 +772,47 @@ "group_id": "Branding", "_key": "subtenant_dark_theme_image_reference_enum" }, + { + "entity_name": "subtenant_identity_provider", + "field_name": "algorithm", + "enum_name": "subtenant_identity_provider_algorithm_enum", + "values": [ + "EC224", + "EC256", + "EC384", + "EC521", + "ECDSA224", + "ECDSA256", + "ECDSA384", + "ECDSA521", + "RSA2048", + "RSA3072" + ], + "group_id": "Accounts", + "_key": "subtenant_identity_provider_algorithm_enum" + }, + { + "entity_name": "subtenant_identity_provider", + "field_name": "order", + "enum_name": "subtenant_identity_provider_order_enum", + "values": [ + "ASC", + "DESC" + ], + "group_id": "Accounts", + "_key": "subtenant_identity_provider_order_enum" + }, + { + "entity_name": "subtenant_identity_provider", + "field_name": "status", + "enum_name": "subtenant_identity_provider_status_enum", + "values": [ + "ACTIVE", + "SUSPENDED" + ], + "group_id": "Accounts", + "_key": "subtenant_identity_provider_status_enum" + }, { "entity_name": "subtenant_light_theme_color", "field_name": "reference", @@ -672,6 +884,17 @@ "group_id": "Branding", "_key": "subtenant_light_theme_image_reference_enum" }, + { + "entity_name": "subtenant_policy_group", + "field_name": "order", + "enum_name": "subtenant_policy_group_order_enum", + "values": [ + "ASC", + "DESC" + ], + "group_id": "Accounts", + "_key": "subtenant_policy_group_order_enum" + }, { "entity_name": "subtenant_trusted_certificate", "field_name": "service", @@ -694,6 +917,17 @@ "group_id": "Security", "_key": "subtenant_trusted_certificate_status_enum" }, + { + "entity_name": "subtenant_user", + "field_name": "order", + "enum_name": "subtenant_user_order_enum", + "values": [ + "ASC", + "DESC" + ], + "group_id": "Accounts", + "_key": "subtenant_user_order_enum" + }, { "entity_name": "subtenant_user", "field_name": "status", @@ -752,6 +986,35 @@ "group_id": "Device_Update", "_key": "update_campaign_order_enum" }, + { + "entity_name": "update_campaign", + "field_name": "phase", + "enum_name": "update_campaign_phase_enum", + "values": [ + "active", + "archived", + "awaiting_approval", + "deleted", + "draft", + "starting", + "stopped", + "stopping", + "timed" + ], + "group_id": "Device_Update", + "_key": "update_campaign_phase_enum" + }, + { + "entity_name": "update_campaign", + "field_name": "campaign_strategy", + "enum_name": "update_campaign_strategy_enum", + "values": [ + "continuous", + "one-shot" + ], + "group_id": "Device_Update", + "_key": "update_campaign_strategy_enum" + }, { "entity_name": "user_invitation", "field_name": "order", @@ -793,6 +1056,7 @@ { "swagger_models": [ "AccountCreationReq", + "AccountCreationResp", "AccountInfo", "AccountInfoList", "AccountUpdateRootReq", @@ -806,13 +1070,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", @@ -864,7 +1128,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" @@ -899,7 +1163,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", @@ -1063,7 +1327,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" @@ -1333,12 +1597,16 @@ "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", "type", - "groups", "filter", "sub_accounts", "total_count", @@ -1362,7 +1630,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": [ { @@ -1458,7 +1726,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}" @@ -1470,6 +1738,23 @@ "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, @@ -1488,7 +1773,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", @@ -1551,7 +1836,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", @@ -1580,7 +1865,7 @@ "entity_fieldname": "end_market", "parameter_fieldname": "end_market", "in": "body", - "required": false, + "required": true, "_key": "end_market" }, { @@ -1630,14 +1915,6 @@ "description": "Successful operation.", "schema": { "type": "object", - "required": [ - "end_market", - "etag", - "id", - "object", - "status", - "tier" - ], "properties": [ { "type": "string", @@ -1683,7 +1960,7 @@ "type": "string", "x-nullable": true, "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account.", + "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", @@ -1695,6 +1972,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" @@ -1721,7 +2004,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}" @@ -1730,6 +2013,49 @@ "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, @@ -1745,7 +2071,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" @@ -1813,7 +2139,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" @@ -1884,10 +2210,126 @@ "entity_fieldname": "idle_timeout", "_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." + }, + "api_fieldname": "limitations", + "entity_fieldname": "limitations", + "_key": "limitations" + }, { "type": "object", "x-nullable": true, - "description": "List of limits as key-value pairs if requested.", + "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" }, @@ -2062,10 +2504,35 @@ "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", @@ -2179,61 +2646,53 @@ "_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.", - "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": "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", - "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" + "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", - "maxItems": 10, - "description": "An array of aliases.", + "description": "Business model history for this account.", "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" + "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": "aliases" + "_key": "business_model_history" }, { "type": "string", @@ -2248,7 +2707,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" }, { @@ -2302,7 +2761,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" }, { @@ -2357,10 +2816,124 @@ "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, - "description": "List of limits as key-value pairs if requested.", + "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" }, @@ -2517,10 +3090,35 @@ "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", @@ -2592,525 +3190,19399 @@ "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", - "groups", - "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", - "password_recovery_expiration" - ], - "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": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "account_id", + "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", + "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, + "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", + "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." + }, + "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" + ], + "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.\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", + "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.\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", + "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.\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": "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 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", + "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": "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": "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": [ + "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", + "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, + "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": { + "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", + "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, + "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", + "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." + }, + "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), 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": "Accounts", + "entity": "account" + } + }, + "_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" + } + ], + "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, + "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", + "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", + "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 used in billing.", + "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 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": "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." + }, + "api_fieldname": "limitations", + "entity_fieldname": "limitations", + "_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", + "entity_fieldname": "limits", + "_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", + "entity_fieldname": "mfa_status", + "_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", + "_key": "notification_emails" + }, + { + "type": "string", + "description": "Entity name: always `account`.", + "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" + } + ], + "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" + }, + { + "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", + "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", + "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", + "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, + "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." + }, + "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." + }, + "_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" + } + ], + "path": "/v3/accounts/me", + "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", + "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": "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.\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", + "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" + }, + { + "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", + "_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 used in billing.", + "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 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": "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." + }, + "api_fieldname": "limitations", + "entity_fieldname": "limitations", + "_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", + "entity_fieldname": "limits", + "_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", + "entity_fieldname": "mfa_status", + "_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", + "_key": "notification_emails" + }, + { + "type": "string", + "description": "Entity name: always `account`.", + "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" + } + ], + "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" + }, + { + "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", + "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", + "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", + "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, + "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." + }, + "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." + }, + "_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 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" + } + ] + }, + "_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", + "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", + "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", + "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": "trusted_certificate" + } + }, + "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": "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" + }, + { + "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, only available for administrators of commercial accounts.", + "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": "An account 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" + } + ], + "path": "/v3/accounts/{account_id}/trusted-certificates", + "summary": "Get trusted certificates.", + "return_type": "paginated_response(subtenant_trusted_certificate)", + "return_info": { + "self": false, + "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" + ], + "certificate_fingerprint": [ + "eq" + ], + "valid": [ + "eq" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "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", + "certificate_fingerprint__eq", + "valid__eq" + ], + "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, + "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" + }, + { + "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", + "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" + }, + { + "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, + "_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" + } + ], + "method": "put", + "mode": "update", + "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" + }, + { + "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", + "_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 used in billing.", + "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 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": "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." + }, + "api_fieldname": "limitations", + "entity_fieldname": "limitations", + "_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", + "entity_fieldname": "limits", + "_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", + "entity_fieldname": "mfa_status", + "_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", + "_key": "notification_emails" + }, + { + "type": "string", + "description": "Entity name: always `account`.", + "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" + } + ], + "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" + }, + { + "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", + "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", + "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", + "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, + "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." + }, + "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." + }, + "_key": "200" + }, + { + "description": "Error in input data format.", + "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 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" + } + ] + }, + "_key": "404" + }, + { + "description": "Account with the specified new 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/{account_id}", + "summary": "Update attributes of an existing 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", + "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" + ], + "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" + }, + { + "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": "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" + } + }, + "_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": "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": "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}/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" + }, + { + "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": [ + "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", + "status" + ], + "properties": [ + { + "type": "string", + "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", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "_key": "address" + }, + { + "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": "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", + "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" + } + }, + "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_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" + } + ] + }, + "_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": "An account 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" + } + ], + "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", + "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." + }, + "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" + }, + { + "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", + "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" + }, + { + "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" + }, + { + "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": [ + { + "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": "New entity created.", + "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": "201" + }, + { + "description": "Error in input data, for example, missing API key name.", + "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/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": { + "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", + "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" + }, + { + "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. Only the owner of the API key or an administrator can delete an API key.", + "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": "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/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": { + "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" + ], + "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 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": "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": "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": "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 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": [ + "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" + }, + { + "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": "Accounts", + "entity": "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" + }, + { + "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/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": "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": "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/api-keys/me", + "summary": "Get current API key.", + "return_type": "api_key", + "return_info": { + "self": true, + "custom": false, + "type": "api_key" + }, + "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.", + "links": [] + }, + "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 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": [ + { + "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": "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. 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 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": "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.", + "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": "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. 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" + }, + { + "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": "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" + } + ], + "path": "/v3/api-keys/{apikey_id}/groups", + "summary": "Get policy groups of an API key.", + "return_type": "paginated_response(policy_group)", + "return_info": { + "self": false, + "custom": false, + "type": "policy_group" + }, + "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 GET https://api.us-east-1.mbedcloud.com/v3/applications/{application_id}/groups", + "links": [] + }, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "total_count", + "has_more", + "data" + ], + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "getGroupsOfApikey", + "foreign_key": { + "entity": "policy_group" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "policy_groups" + }, + { + "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": "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" + } + ], + "method": "get", + "mode": "read", + "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": "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": "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/api-keys/{apikey_id}", + "summary": "Get API key.", + "return_type": "api_key", + "return_info": { + "self": true, + "custom": false, + "type": "api_key" + }, + "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 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", + "updated_at", + "key", + "name", + "groups", + "owner", + "status", + "creation_time", + "last_login_time", + "account_id" + ], + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "getApiKey", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "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": "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.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "apikey_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "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": "put", + "mode": "update", + "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": "Error in input data, for example, invalid API key name.", + "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. Only the owner of the API key or an administrator can update an API key.", + "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": "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/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": { + "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" + }, + "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/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 \\\n-H 'Authorization: Bearer '\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.", + "pattern": "[A-Fa-f0-9]{32}", + "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": "Request successful.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The device's campaign ID.", + "example": "015bf72fccda00000000000100100280", + "api_fieldname": "campaign", + "entity_fieldname": "campaign_id", + "_key": "campaign" + }, + { + "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" + }, + { + "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" + }, + { + "type": "string", + "maxLength": 2000, + "description": "Description.", + "example": "a description", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "string", + "description": "The device ID.", + "example": "015c2fec9bba0000000000010010036f", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" + }, + { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "The metadata record ID.", + "pattern": "[A-Fa-f0-9]{32}", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, + { + "type": "string", + "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" + }, + { + "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" + } + ], + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_device_metadata" + } + }, + "_key": "200" + }, + { + "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": "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", + "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": "016e652be671000000000001001001e5", + "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", + "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" + } + }, + "enum": [ + "fail", + "skipped", + "info", + "success" + ], + "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'.", + "example": "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_events" + } + }, + "_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" + }, + { + "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/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/11234567f9012ab56780120000789012/statistics \\\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": "account_id", + "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": "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": "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'.", + "example": "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.", + "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/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" + }, + { + "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", + "properties": [ + { + "type": "string", + "example": "016e652be6710000000000010010013d", + "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", + "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'.", + "example": "summary_status", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "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" + }, + { + "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/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": "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" + }, + { + "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": [ + { + "type": "string", + "example": "016e652be671000000000001001001e5", + "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": "016e652be671000000000001001001e5", + "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'.", + "example": "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" + }, + { + "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": "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/{event_type_id}", + "summary": "Get an event type for a campaign", + "return_type": "campaign_statistics_events", + "return_info": { + "self": true, + "custom": false, + "type": "campaign_statistics_events" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "event_type", + "description", + "summary_status", + "count" + ], + "group_id": "Device_Update", + "parameter_map": { + "event_type_id": "id" + }, + "operation_id": "Update_Campaign_event_types_retrieve", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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" + }, + { + "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": "01625daa23230a580a0100bd00000000", + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "pattern": "[0-9a-fA-F]{32}", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" + }, + { + "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" + }, + { + "type": "integer", + "format": "int32", + "description": "The number of results to return (2-1000).", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "name": "limit", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "description": "The order of results.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "certificate_enrollment_order_enum", + "_key": "order" + } + ], + "method": "get", + "mode": "list", + "responses": [ + { + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "The entity ID to fetch after the given one.", + "example": "01625daa23230a580a0100bd00000000", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "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" + } + }, + "description": "List of certificate enrollments.", + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" + }, + { + "type": "boolean", + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "format": "int32", + "description": "The number of results to return.", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" + }, + { + "type": "string", + "enum": [ + "list" + ], + "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.", + "enum": [ + "ASC", + "DESC" + ], + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "type": "integer", + "format": "int32", + "description": "The total number of records.", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Security", + "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": { + "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": "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" + } + ], + "path": "/v3/certificate-enrollments", + "summary": "Get certificate enrollments list.", + "return_type": "paginated_response(certificate_enrollment)", + "return_info": { + "self": true, + "custom": false, + "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_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" + ], + "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" + }, + { + "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 certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "certificate-enrollment-id", + "in": "path", + "required": true, "_key": "id" } ], - "method": "get", - "mode": "dark_theme_branding_colors", + "method": "get", + "mode": "read", + "responses": [ + { + "description": "OK.", + "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", + "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": "Devices", + "entity": "device" + } + }, + "_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": { + "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": "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" + } + ], + "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_enrollment" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "device_id", + "certificate_name", + "enroll_status", + "enroll_result", + "enroll_result_detail", + "updated_at" + ], + "group_id": "Security", + "parameter_map": { + "certificate-enrollment-id": "id" + }, + "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" + }, + { + "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": [ + { + "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 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": 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, + "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": "post", + "mode": "create", "responses": [ { - "description": "Successful operation.", + "description": "Created.", + "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": "201" + }, + { + "description": "Validation error: The data used to create the certificate issuer failed validation.", + "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": "You are not authorized to view the resource.", + "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": "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": "Conflict. A certificate issuer with this name already exists.", "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" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "_key": "object" - }, + "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": "The request failed due to customer configured external service.", + "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": [ - "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" + "_key": "fields" }, { - "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", + "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", + "summary": "Create 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", + "created_at", + "id" + ], + "group_id": "Security", + "parameter_map": { + "certificate-issuer-id": "id" + }, + "operation_id": "createCertificateIssuer", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "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.\nAn active certificate issuer cannot be deleted.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "certificate-issuer-id", + "external_param": false, + "parameter_fieldname": "certificate-issuer-id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Certificate issuer deleted.", + "_key": "204" + }, + { + "description": "Validation error: An active certificate issuer cannot be deleted.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "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" + "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": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Error message.", + "_key": "message" + }, + { + "type": "string", + "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", @@ -3120,29 +22592,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" } ] }, @@ -3150,28 +22617,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" } ] @@ -3184,6 +22645,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -3193,29 +22655,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" } ] }, @@ -3223,28 +22680,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" } ] @@ -3252,11 +22703,12 @@ "_key": "403" }, { - "description": "Account not found.", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -3266,29 +22718,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" } ] }, @@ -3296,28 +22743,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" } ] @@ -3325,13 +22766,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-colors/dark", - "summary": "Get dark theme branding colors.", - "return_type": "paginated_response(subtenant_dark_theme_color)", + "path": "/v3/certificate-issuers/{certificate-issuer-id}", + "summary": "Delete certificate issuer.", + "return_type": "certificate_issuer", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "subtenant_dark_theme_color" + "type": "certificate_issuer" }, "x_filter": {}, "x_deprecation": null, @@ -3339,201 +22780,224 @@ "object", "etag", "type", - "groups", - "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" + "filter" ], - "group_id": "Accounts", + "group_id": "Security", "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" + "certificate-issuer-id": "id" }, - "pagination": true, + "operation_id": "deleteCertificateIssuer", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "dark_theme_branding_colors" + "_key": "delete" }, { - "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```", + "description": "**Note:** This endpoint does not use pagination, and therefore ignores list control parameters such as `limit` or `after`.", "field_renames": [], "fields": [ { - "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" + "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": "dark_theme_branding_images", + "mode": "list", "responses": [ { - "description": "Successful operation.", + "description": "OK.", "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}", + "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", - "description": "A list of entities.", "items": { "type": "object", "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, - "enum": [ - "branding_image" - ], - "_key": "object" + "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": [ - "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" + "GLOBAL_SIGN", + "CFSSL_AUTH" ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "_key": "reference" + "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", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "_key": "static_uri" + "maxLength": 50, + "description": "Certificate issuer name, unique per account.", + "example": "GS Issuer", + "_key": "name" }, { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" + "enum": [ + "certificate-issuer" + ], + "_key": "object" } ], + "required": [ + "issuer_type" + ], "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" + "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, - "description": "Flag indicating whether there are more results.", "api_fieldname": "has_more", "entity_fieldname": "has_more", "_key": "has_more" }, { "type": "integer", - "format": "int32", + "description": "The number of results to return (2-1000). Values outside of this range are set to the closest limit.", "example": 50, - "description": "The number of results to return, or equal to `total_count`.", + "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": "Entity name: always `list`.", - "enum": [ - "list" - ], + "description": "The type of this API object is `list`.", + "example": "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" - ], + "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", - "format": "int32", - "example": 20, - "description": "The total number of records, if requested.", + "example": 1, "api_fieldname": "total_count", "entity_fieldname": "total_count", "_key": "total_count" @@ -3541,18 +23005,19 @@ ], "pagination": true, "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" + "group": "Security", + "entity": "certificate_issuer" } }, "_key": "200" }, { - "description": "Authentication failure.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -3562,29 +23027,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" } ] }, @@ -3592,28 +23052,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" } ] @@ -3626,6 +23080,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -3635,102 +23090,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" - } - ] - }, - "_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.", + "description": "Error message related to the field.", "_key": "message" - }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" } ] }, @@ -3738,42 +23115,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": "403" } ], - "path": "/v3/accounts/{account_id}/branding-images/dark", - "summary": "Get metadata of all dark theme images.", - "return_type": "paginated_response(subtenant_dark_theme_image)", + "path": "/v3/certificate-issuers", + "summary": "Get certificate issuers list.", + "return_type": "paginated_response(certificate_issuer)", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "subtenant_dark_theme_image" + "type": "certificate_issuer" }, "x_filter": {}, "x_deprecation": null, @@ -3781,198 +23152,207 @@ "object", "etag", "type", - "groups", "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", "has_more", + "total_count", "data" ], - "group_id": "Accounts", + "foreign_key_priority": "self", + "group_id": "Security", "parameter_map": { - "account_id": "id" + "certificate-issuer-id": "id" }, - "operation_id": "getAllAccountDarkImageData", - "notes": "This lists the dark theme banding images of the subtenant account.", + "operation_id": "getCertificateIssuers", + "pagination": true, "foreign_key": { - "entity": "subtenant_dark_theme_image" + "group": "Security", + "entity": "certificate_issuer" }, - "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "dark_theme_branding_images" + "_key": "list" }, { - "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```", + "description": "(No description provided)", "field_renames": [], "fields": [ { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "type": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "api_fieldname": "id", "entity_fieldname": "id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", + "parameter_fieldname": "certificate-issuer-id", + "in": "path", + "required": true, "_key": "id" } ], "method": "get", - "mode": "light_theme_branding_colors", + "mode": "read", "responses": [ { - "description": "Successful operation.", + "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: The data used to get the certificate issuer failed validation.", "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", @@ -3982,29 +23362,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" } ] }, @@ -4012,28 +23387,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" } ] @@ -4046,6 +23415,7 @@ "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -4055,29 +23425,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" } ] }, @@ -4085,28 +23450,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" } ] @@ -4114,11 +23473,12 @@ "_key": "403" }, { - "description": "Account not found.", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -4128,29 +23488,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" } ] }, @@ -4158,28 +23513,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" } ] @@ -4187,13 +23536,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-colors/light", - "summary": "Get light theme branding colors.", - "return_type": "paginated_response(subtenant_light_theme_color)", + "path": "/v3/certificate-issuers/{certificate-issuer-id}", + "summary": "Get certificate issuer by ID.", + "return_type": "certificate_issuer", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "subtenant_light_theme_color" + "type": "certificate_issuer" }, "x_filter": {}, "x_deprecation": null, @@ -4201,293 +23550,197 @@ "object", "etag", "type", - "groups", "filter", - "sub_accounts", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" + "created_at", + "issuer_type", + "name", + "description", + "issuer_attributes" ], - "group_id": "Accounts", + "group_id": "Security", "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" + "certificate-issuer-id": "id" }, - "pagination": true, + "operation_id": "getCertificateIssuer", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "light_theme_branding_colors" + "_key": "read" }, { - "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```", + "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": [ { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "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", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_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": "get", - "mode": "light_theme_branding_images", + "method": "put", + "mode": "update", "responses": [ { - "description": "Successful operation.", + "description": "OK.", "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" + "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": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "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": "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": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { - "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": "string", + "description": "Certificate issuer ID.", + "example": "01234567890ABCDEF01234567890ABCDEF", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "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" - } - ] + "type": "object", + "additionalProperties": { + "type": "string" }, - "_key": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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, always `error`.", "enum": [ - "error" + "GLOBAL_SIGN", + "CFSSL_AUTH" ], - "_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": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_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 used to categorise the error.", - "example": "validation_error", - "_key": "type" + "enum": [ + "certificate-issuer" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" } - ] + ], + "required": [ + "issuer_type" + ], + "foreign_key": { + "group": "Security", + "entity": "certificate_issuer" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Validation error: The data used to update the certificate issuer failed validation.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -4497,29 +23750,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" } ] }, @@ -4527,40 +23775,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": "400" }, { - "description": "Account not found.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -4570,29 +23813,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" } ] }, @@ -4600,1203 +23838,1036 @@ }, { "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/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", - "groups", - "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.", - "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.", - "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", - "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": "object", - "x-nullable": true, - "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" - }, + } + ] + }, + "_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", - "x-nullable": true, - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account, if any.", - "pattern": "[a-f0-9]{32}", - "_key": "parent_id" + "description": "Field name.", + "_key": "field" }, { - "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", + "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": "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", + "description": "Field name.", + "_key": "field" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "+44 (1223) 400 400", - "description": "The phone number of a company representative.", - "_key": "phone_number" - }, + "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 certificate issuer with this name already exists.", + "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": "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "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": "Field name.", + "_key": "field" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" - }, + "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": "The request failed due to customer-configured external service.", + "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", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" - }, + "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}", + "summary": "Update 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", + "created_at", + "issuer_type" + ], + "group_id": "Security", + "parameter_map": { + "certificate-issuer-id": "id" + }, + "operation_id": "updateCertificateIssuer", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "update" + }, + { + "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": [ + { + "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": "post", + "mode": "verify", + "responses": [ + { + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "description": "Provides details in case of failure.", + "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.", + "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": "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": [ { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" - }, + "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", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "_key": "status" + "description": "Field name.", + "_key": "field" }, { - "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" - }, - { - "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.", - "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", - "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": "object", - "x-nullable": true, - "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "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." - }, - "_key": "sub_accounts" - }, + "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": [ { "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" + "description": "Field name.", + "_key": "field" }, { "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": "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", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" + "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.", + "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", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "_key": "upgraded_at" + "description": "Error message related to the field.", + "_key": "message" } - ], - "description": "Represents an account in requests and responses." + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "_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": "Certificate issuer ID.", + "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 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" + ], + "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" + }, + { + "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": "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": "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": "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": false, - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "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": "201" + }, + { + "description": "Validation error.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "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" + "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": { + "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": "Entity name: always `list`.", - "enum": [ - "list" - ], - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Error message.", + "_key": "message" + }, + { + "type": "string", + "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": "Accounts", - "entity": "account" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -5806,29 +24877,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" } ] }, @@ -5836,40 +24902,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": "403" }, { - "description": "Forbidden.", + "description": "A certificate issuer configuration with this reference already exists.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -5879,29 +24940,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" } ] }, @@ -5909,1179 +24965,1326 @@ }, { "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": "409" } ], - "path": "/v3/accounts", - "summary": "Get all accounts.", - "return_type": "paginated_response(account)", + "path": "/v3/certificate-issuer-configurations", + "summary": "Create certificate issuer configuration.", + "return_type": "certificate_issuer_config", "return_info": { "self": true, "custom": false, - "type": "account" - }, - "x_filter": { - "status": [ - "eq", - "in", - "nin" - ], - "tier": [ - "eq" - ], - "parent": [ - "eq" - ], - "end_market": [ - "eq" - ], - "country": [ - "like" - ] + "type": "certificate_issuer_config" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "sub_accounts", - "total_count", - "has_more", - "data", - "status__eq", - "status__in", - "status__nin", - "tier__eq", - "parent__eq", - "end_market__eq", - "country__like" + "is_custom", + "id", + "created_at", + "updated_at" ], - "foreign_key_priority": "self", - "group_id": "Accounts", + "group_id": "Security", "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAllAccounts", - "pagination": true, - "foreign_key": { - "group": "Accounts", - "entity": "account" + "certificate-issuer-configuration-id": "id" }, + "operation_id": "createCertificateIssuerConfig", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "create" }, { - "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": "Delete certificate issuer configuration.\nYou can only delete custom certificate configurations.", "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": "certificate-issuer-configuration-id", + "in": "path", + "description": "Certificate issuer ID configuration.", + "required": true, "type": "string", - "entity_fieldname": "properties", - "api_fieldname": "properties", - "external_param": true, - "parameter_fieldname": "properties", - "_key": "properties" + "entity_fieldname": "id", + "api_fieldname": "certificate-issuer-configuration-id", + "external_param": false, + "parameter_fieldname": "certificate-issuer-configuration-id", + "_key": "id" } ], - "method": "get", - "mode": "me", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Successful operation.", + "description": "No content.", + "_key": "204" + }, + { + "description": "Validation error.", "schema": { "type": "object", "required": [ - "end_market", - "etag", - "id", + "code", + "fields", + "message", "object", - "status", - "tier" + "request_id", + "type" ], "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.", - "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": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { "type": "array", - "maxItems": 10, - "description": "An array of aliases.", + "description": "A list of request fields that failed validation.", "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] }, - "api_fieldname": "aliases", - "entity_fieldname": "aliases", - "_key": "aliases" - }, - { - "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" + "_key": "fields" }, { "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" + "description": "Error message.", + "_key": "message" }, { "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: `error`.", + "_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": "Request ID from JWT.", + "_key": "request_id" }, { "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" - }, + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Unauthorized.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "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": "Error code. Correlates with response status code.", + "_key": "code" }, { - "type": "object", - "x-nullable": true, - "description": "Account's custom properties as key-value pairs.", - "additionalProperties": { - "type": "string" + "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" + } + ] }, - "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" + "_key": "fields" }, { "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": "Error message.", + "_key": "message" }, { "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": "object", - "x-nullable": true, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "limits", - "entity_fieldname": "limits", - "_key": "limits" + "description": "Entity name: `error`.", + "_key": "object" }, { "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" + "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", - "x-nullable": true, - "description": "A list of notification email addresses.", + "description": "A list of request fields that failed validation.", "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] }, - "api_fieldname": "notification_emails", - "entity_fieldname": "notification_emails", - "_key": "notification_emails" + "_key": "fields" }, { "type": "string", - "description": "Entity name: always `account`.", - "enum": [ - "account" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "Error message.", + "_key": "message" }, { - "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", + "description": "Entity name: `error`.", + "_key": "object" }, { "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": "Request ID from JWT.", + "_key": "request_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, - "api_fieldname": "password_policy", - "entity_fieldname": "password_policy", - "_key": "password_policy" - }, + "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", - "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" + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { "type": "array", - "x-nullable": true, - "description": "List of policies if requested.", + "description": "A list of request fields that failed validation.", "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" + "description": "Field name.", + "_key": "field" }, { "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "entity_fieldname": "resource", - "_key": "resource" + "description": "Error message related to the field.", + "_key": "message" } - ], - "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" + "_key": "fields" }, { "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" + "description": "Error message.", + "_key": "message" }, { "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": "Entity name: `error`.", + "_key": "object" }, { "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": "Request ID from JWT.", + "_key": "request_id" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", + "summary": "Delete 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" + ], + "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": "Provides the configured certificate issuer used when creating device\ncertificates for LwM2M.", + "field_renames": [], + "fields": [], + "method": "get", + "mode": "get_default", + "responses": [ + { + "description": "OK.", + "schema": { + "type": "object", + "properties": [ + { "x-nullable": true, - "description": "Email address of the sales contact.", - "api_fieldname": "sales_contact", - "entity_fieldname": "sales_contact", - "_key": "sales_contact" + "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", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "api_fieldname": "state", - "entity_fieldname": "state", - "_key": "state" + "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", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { - "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" - }, - { - "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.", - "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", - "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", + "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", + "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", - "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" + "description": "Field name.", + "_key": "field" }, { "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": "object", - "x-nullable": true, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "_key": "limits" - }, + "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", - "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": "Field name.", + "_key": "field" }, { "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" - }, + "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": [ { "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" + "description": "Field name.", + "_key": "field" }, { "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "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" - }, + "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" + } + ], + "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:**\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": [ + { + "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": "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": "An offset token for current page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": [ { - "type": "string", - "maxLength": 100, "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" + "type": "string", + "description": "Certificate issuer ID.\nNull if Device Management internal HSM is used.", + "example": "01648415a2a30242ac18000500000000", + "_key": "certificate_issuer_id" }, { "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" + "format": "date-time", + "description": "Created UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", + "_key": "created_at" }, { "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" + "description": "Entity instance signature.", + "example": "1", + "_key": "etag" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "_key": "id" }, { - "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" + "type": "boolean", + "example": true, + "_key": "is_custom" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" + "certificate-issuer-configuration" ], - "_key": "status" + "_key": "object" }, { - "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": [], - "_key": "sub_accounts" + "type": "string", + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "_key": "reference" }, { "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" + "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": "The type of this API object is `list`.", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "description": "Record order based on creation time.", + "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.", + "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", - "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": "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": "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": [ + { + "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" + } + ], + "path": "/v3/certificate-issuer-configurations", + "summary": "Get certificate issuer configurations.", + "return_type": "paginated_response(certificate_issuer_config)", + "return_info": { + "self": true, + "custom": false, + "type": "certificate_issuer_config" + }, + "x_filter": { + "reference": [ + "eq" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "is_custom", + "has_more", + "total_count", + "data", + "reference__eq" + ], + "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": "list" + }, + { + "description": "Provides the configured certificate issuer.", + "field_renames": [], + "fields": [ + { + "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": "get", + "mode": "read", + "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", + "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", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" + "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", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Time when upgraded to commercial account in UTC format RFC3339.", - "_key": "upgraded_at" + "description": "Error message related to the field.", + "_key": "message" } - ], - "description": "Represents an account in requests and responses." + ] }, - "api_fieldname": "sub_accounts", - "entity_fieldname": "sub_accounts", - "_key": "sub_accounts" + "_key": "fields" }, { "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" + "description": "Error message.", + "_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.", - "api_fieldname": "tier", - "entity_fieldname": "tier", - "_key": "tier" + "description": "Entity name: `error`.", + "_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": "Request ID from JWT.", + "_key": "request_id" }, { "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": "Error type.", + "_key": "type" } - ], - "description": "Represents an account in requests and responses." + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -7091,29 +26294,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" } ] }, @@ -7121,40 +26319,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": "403" }, { - "description": "Forbidden.", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -7164,29 +26357,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" } ] }, @@ -7194,42 +26382,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": "403" + "_key": "404" } ], - "path": "/v3/accounts/me", - "summary": "Get account info.", - "return_type": "account", + "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": "account" + "type": "certificate_issuer_config" }, "x_filter": {}, "x_deprecation": null, @@ -7237,1150 +26419,1222 @@ "object", "etag", "type", - "groups", "filter", - "sub_accounts", - "id", + "is_custom", + "certificate_issuer_id", + "reference", "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", - "password_recovery_expiration" + "updated_at" ], - "group_id": "Accounts", + "group_id": "Security", "parameter_map": { - "account_id": "id" + "certificate-issuer-configuration-id": "id" }, - "operation_id": "getMyAccountInfo", - "notes": "This is provided by the SDK to avoid listing to retrieve the user's own Account.", + "operation_id": "getCertificateIssuerConfigByID", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "me" + "_key": "read" }, { - "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```", + "description": "Update certificate issuer configuration.", "field_renames": [], "fields": [ { + "x-nullable": true, "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", + "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": "account_id", + "parameter_fieldname": "certificate-issuer-configuration-id", "in": "path", "required": true, "_key": "id" - }, - { - "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": "read", + "method": "put", + "mode": "update", "responses": [ { - "description": "Successful operation.", + "description": "OK.", "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", + "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", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "api_fieldname": "address_line2", - "entity_fieldname": "address_line2", - "_key": "address_line2" + "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" }, { - "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" + "description": "Entity instance signature.", + "example": "1", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "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" + "description": "Certificate issuer ID. configuration.", + "example": "01648415a2a30242ac18000500000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { - "type": "string", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "admin_id", - "entity_fieldname": "admin_id", - "_key": "admin_id" + "type": "boolean", + "example": true, + "api_fieldname": "is_custom", + "entity_fieldname": "is_custom", + "_key": "is_custom" }, { "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" + "enum": [ + "certificate-issuer-configuration" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "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" + "description": "The certificate name to which the certificate issuer configuration applies.", + "example": "customer.dlms", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" }, { "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" + "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", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { "type": "array", - "maxItems": 10, - "description": "An array of aliases.", + "description": "A list of request fields that failed validation.", "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] }, - "api_fieldname": "aliases", - "entity_fieldname": "aliases", - "_key": "aliases" - }, - { - "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" + "_key": "fields" }, { "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": "Error message.", + "_key": "message" }, { "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": "Entity name: `error`.", + "_key": "object" }, { "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" + "description": "Request ID from JWT.", + "_key": "request_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" - }, + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "400" + }, + { + "description": "Unauthorized.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "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": "integer", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { - "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": "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", - "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" + "description": "Error message.", + "_key": "message" }, { - "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" + "description": "Entity name: `error`.", + "_key": "object" }, { "type": "string", - "example": "IT", - "description": "Account end market.", - "api_fieldname": "end_market", - "entity_fieldname": "end_market", - "_key": "end_market" + "description": "Request ID from JWT.", + "_key": "request_id" }, { "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "fields", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "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", + "format": "int32", + "description": "Error code. Correlates with response status code.", + "_key": "code" }, { - "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": "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": "01619571e2e90242ac12000600000000", - "description": "Account ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "Error message.", + "_key": "message" }, { - "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": "string", + "description": "Entity name: `error`.", + "_key": "object" }, { - "type": "object", - "x-nullable": true, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "limits", - "entity_fieldname": "limits", - "_key": "limits" + "type": "string", + "description": "Request ID from JWT.", + "_key": "request_id" }, { "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" + "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", - "x-nullable": true, - "description": "A list of notification email addresses.", + "description": "A list of request fields that failed validation.", "items": { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string" + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] }, - "api_fieldname": "notification_emails", - "entity_fieldname": "notification_emails", - "_key": "notification_emails" + "_key": "fields" }, { "type": "string", - "description": "Entity name: always `account`.", - "enum": [ - "account" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "Error message.", + "_key": "message" }, { - "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", + "description": "Entity name: `error`.", + "_key": "object" }, { "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": "Request ID from JWT.", + "_key": "request_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, - "api_fieldname": "password_policy", - "entity_fieldname": "password_policy", - "_key": "password_policy" - }, + "type": "string", + "description": "Error type.", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "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": "certificate_issuer_config" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "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." + } + ], + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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" + }, + { + "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": [ + { + "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", + "in": "path", + "description": "The name of the branding color.", + "required": true, + "enum_reference": "dark_theme_color_reference_enum", + "_key": "reference" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "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" + "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" + "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": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", + "description": "Request fields which failed validation.", "items": { "type": "object", "required": [ - "end_market", - "etag", - "id", - "object", - "status", - "tier" + "name", + "message" ], "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.", - "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", - "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": "object", - "x-nullable": true, - "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "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" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" - }, + "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": "Color 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", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" - }, + "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/branding-colors/dark/{reference}", + "summary": "Reset branding color to default.", + "return_type": "void", + "return_info": { + "self": false, + "custom": true, + "type": "void" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Branding", + "operation_id": "resetDarkColor", + "spec": { + "return_type": "void" + }, + "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```", + "field_renames": [], + "fields": [ + { + "is_primary_key": true, + "_override": true, + "type": "string", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + } + ], + "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 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": [ { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" + "_key": "color" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "_key": "object" }, { - "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" + "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" ], - "_key": "status" + "type": "string", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "_key": "reference" }, { - "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": [], - "_key": "sub_accounts" - }, + "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", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_id" + "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" - }, + "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", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" + "description": "Message describing the error condition.", + "_key": "message" }, { "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": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents an account in requests and responses." + ] }, - "api_fieldname": "sub_accounts", - "entity_fieldname": "sub_accounts", - "_key": "sub_accounts" + "_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/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_color" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "limit", + "after", + "order", + "total_count", + "has_more", + "data" + ], + "foreign_key_priority": "self", + "group_id": "Branding", + "operation_id": "getDarkColors", + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "dark_theme_color" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "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": [ + { + "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" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", "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" + "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" + ], "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" + "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 UTC time RFC3339.", + "description": "Last update time in UTC.", + "readOnly": true, "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": "Branding", + "entity": "subtenant_light_theme_color" + } }, "_key": "200" }, @@ -8531,7 +27785,7 @@ "_key": "403" }, { - "description": "Account with the given ID not found.", + "description": "Color not found.", "schema": { "type": "object", "required": [ @@ -8604,13 +27858,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}", - "summary": "Get account info.", - "return_type": "account", + "path": "/v3/branding-colors/dark/{reference}", + "summary": "Get dark theme branding color.", + "return_type": "dark_theme_color", "return_info": { "self": true, "custom": false, - "type": "account" + "type": "dark_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -8618,476 +27872,153 @@ "object", "etag", "type", - "groups", "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", - "password_recovery_expiration" + "color", + "updated_at" ], - "group_id": "Accounts", - "parameter_map": { - "account_id": "id" - }, - "operation_id": "getAccountInfo", + "group_id": "Branding", + "operation_id": "getDarkColor", "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```", + "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": "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", + "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, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "_key": "color" }, { - "name": "account_id", + "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", - "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" + "enum_reference": "dark_theme_color_reference_enum", + "_key": "reference" }, { "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": "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", - "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": "If true, signature is not required. Default value false.", - "_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", - "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": "trusted_certificate" - } - }, - "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": "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" - }, - { - "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" - }, + "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", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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 `error`.", + "description": "Entity name: always 'branding_color'", + "readOnly": true, "enum": [ - "error" + "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" + ], "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" }, { "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": "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": "401" + "_key": "200" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Error in input data format.", "schema": { "type": "object", "required": [ @@ -9157,10 +28088,10 @@ } ] }, - "_key": "403" + "_key": "400" }, { - "description": "An account with the given ID does not exist.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -9188,1515 +28119,1681 @@ "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}/trusted-certificates", - "summary": "Get all trusted certificates.", - "return_type": "paginated_response(subtenant_trusted_certificate)", - "return_info": { - "self": false, - "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" - ] - }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "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" - ], - "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, - "request_content_type": "application/json", - "request_body": "json", - "_key": "trusted_certificates" - }, - { - "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```", - "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", - "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", - "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" - }, - { - "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", - "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" + { + "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" }, { - "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, - "_key": "sales_contact" + "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, - "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" - } - ], - "method": "put", - "mode": "update", - "responses": [ - { - "description": "Successful operation.", + "description": "Color not found.", "schema": { "type": "object", "required": [ - "end_market", - "etag", - "id", + "code", + "message", "object", - "status", - "tier" + "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", - "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "Postal address line 2.", - "api_fieldname": "address_line2", - "entity_fieldname": "address_line2", - "_key": "address_line2" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_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.\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", + "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" + }, + { + "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", - "x-nullable": true, - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the admin user created for this account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "admin_id", - "entity_fieldname": "admin_id", - "_key": "admin_id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "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" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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" + "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", - "maxItems": 10, - "description": "An array of aliases.", + "description": "Request fields which failed validation.", "items": { - "type": "string", - "pattern": "[\\w\\-._]{8,100}" + "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": "aliases", - "entity_fieldname": "aliases", - "_key": "aliases" - }, - { - "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" + "_key": "fields" }, { "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "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 `error`.", + "enum": [ + "error" + ], + "_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": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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" - }, + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Unknown image reference.", + "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" + "_key": "fields" }, { - "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "IT", - "description": "Account end market.", - "api_fieldname": "end_market", - "entity_fieldname": "end_market", - "_key": "end_market" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "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": "dark_theme_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Branding", + "operation_id": "clearDarkImage", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "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": [ + { + "is_primary_key": true, + "_override": true, + "type": "string", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + } + ], + "method": "get", + "mode": "list", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "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": "object", - "x-nullable": true, - "description": "List of limits as key-value pairs if requested.", - "additionalProperties": { - "type": "string" + "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": "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" - } - ], - "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" - } + "description": "The order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "enum": [ + "ASC", + "DESC" ], - "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" + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { "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" - }, + "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": "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" + "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" + "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": "401" + }, + { + "description": "Forbidden.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { - "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", + "description": "Request fields which failed validation.", "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.", - "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", - "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": "object", - "x-nullable": true, - "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "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" - }, + "required": [ + "name", + "message" + ], + "properties": [ { "type": "string", - "maxLength": 100, - "x-nullable": true, - "example": "CB1 9NJ", - "description": "The postal code part of the postal address.", - "_key": "postal_code" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "x-nullable": true, - "example": "Subscription paid.", - "description": "A note with the reason for account status update.", - "_key": "reason" - }, + "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/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": "dark_theme_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "limit", + "after", + "order", + "total_count", + "has_more", + "data" + ], + "foreign_key_priority": "self", + "group_id": "Branding", + "operation_id": "getAllDarkImageData", + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "dark_theme_image" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "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", + "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", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "dark_theme_image_reference_enum", + "_key": "reference" + } + ], + "method": "get", + "mode": "read", + "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", + "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", - "x-nullable": true, - "example": "ARM-INT-0001", - "description": "A reference note for updating the status of the account.", - "_key": "reference_note" + "description": "Message describing the error condition.", + "_key": "message" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "sales@arm.com", - "x-nullable": true, - "description": "Email address of the sales contact.", - "_key": "sales_contact" - }, + "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", - "maxLength": 100, - "x-nullable": true, - "example": " ", - "description": "The state part of the postal address.", - "_key": "state" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the account.", - "enum": [ - "ENROLLING", - "ACTIVE", - "RESTRICTED", - "SUSPENDED" - ], - "_key": "status" - }, + "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": "Unknown image reference.", + "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": "array", - "x-nullable": true, - "description": "List of sub accounts. Not available for developer users.", - "items": [], - "_key": "sub_accounts" + "type": "string", + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "x-nullable": true, - "example": "01619571e7160242ac12000600000000", - "description": "Account template ID.", - "pattern": "[a-f0-9]{32}", - "_key": "template_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" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/branding-images/dark/{reference}", + "summary": "Get metadata of 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": "getDarkImageData", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "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", + "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", + "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" + } + ], + "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": "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": "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": "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": "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", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" + "description": "Message describing the error condition.", + "_key": "message" }, { "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": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents an account in requests and responses." + ] }, - "api_fieldname": "sub_accounts", - "entity_fieldname": "sub_accounts", - "_key": "sub_accounts" + "_key": "fields" }, { "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_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.", - "api_fieldname": "tier", - "entity_fieldname": "tier", - "_key": "tier" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_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", - "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": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "description": "Represents an account in requests and responses." + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Error in input data format.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -10766,10 +29863,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Authentication failure.", + "description": "Unknown image reference.", "schema": { "type": "object", "required": [ @@ -10813,109 +29910,293 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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/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 [Setting up a Certificate Authority](https://www.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": [ + { + "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" + }, + { + "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.", + "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", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Description for the developer certificate.", + "x-nullable": true, + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" }, { "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": [ + "description": "PEM-format X.509 developer certificate.", + "api_fieldname": "developer_certificate", + "entity_fieldname": "certificate", + "_key": "developer_certificate" + }, { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "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": "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": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "description": "Name of the developer certificate.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Entity name: always `trusted-cert`.", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "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" + } }, - "_key": "403" + "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": "Account with the given ID not found.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -10972,386 +30253,37 @@ "_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": "Update attributes of an existing account.", - "return_type": "account", - "return_info": { - "self": true, - "custom": false, - "type": "account" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "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" - ], - "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" - }, - { - "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": "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" - }, - { - "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": "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 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", - "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": "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 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" + "type": "string", + "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": "Accounts", - "entity": "user_invitation" - } + ] }, - "_key": "200" + "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": "Authentication failure.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -11421,10 +30353,20 @@ } ] }, + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], "_key": "401" }, { - "description": "Forbidden.", + "description": "The maximum number of developer certificates for the given account has already been reached.", "schema": { "type": "object", "required": [ @@ -11494,10 +30436,24 @@ } ] }, + "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": "An account with the specified ID does not exist.", + "description": "Certificate with the given name already exists.", "schema": { "type": "object", "required": [ @@ -11567,596 +30523,558 @@ } ] }, - "_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", - "groups", - "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": [ - { - "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", - "email", - "etag", - "id", - "object", - "status" - ], - "properties": [ - { - "type": "string", - "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", - "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", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "_key": "address" - }, - { - "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": "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", - "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", - "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": "type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "_key": "login_profiles" - }, + "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/developer-certificates", + "summary": "Create a new 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", + "id", + "created_at", + "account_id", + "developer_private_key", + "security_file_content", + "certificate" + ], + "group_id": "Security", + "parameter_map": { + "developerCertificateId": "id" + }, + "operation_id": "createDeveloperCertificate", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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```", + "field_renames": [ + { + "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", + "entity_fieldname": "id", + "api_fieldname": "cert_id", + "external_param": false, + "parameter_fieldname": "cert_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "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": "Entity name: always `user`.", - "enum": [ - "user" - ], - "_key": "object" + "description": "Message describing the error condition.", + "_key": "message" }, { "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" - }, + "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", - "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", - "x-nullable": true, - "_key": "phone_number" + "description": "Message describing the error condition.", + "_key": "message" }, { "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" - }, + "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": "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" + }, + { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", - "_key": "updated_at" + "description": "Message describing the error condition.", + "_key": "message" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "_key": "username" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents a user in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "user" - } + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "_key": "fields" }, { - "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", + "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/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", + "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": 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" + "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", + "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 `list`.", + "description": "Entity name: always 'trusted-cert'", "enum": [ - "list" + "trusted-cert" ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { + "x-nullable": true, "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "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": [ - "ASC", - "DESC" + "lwm2m", + "bootstrap" ], - "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" + "api_fieldname": "service", + "entity_fieldname": "service", + "_key": "service" }, { - "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", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" + }, + { + "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": "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" } ], - "pagination": true, + "description": "Represents a trusted certificate in responses.", "foreign_key": { - "group": "Accounts", - "entity": "user" + "group": "Security", + "entity": "developer_certificate" } }, "_key": "200" @@ -12308,7 +31226,7 @@ "_key": "403" }, { - "description": "An account with the given ID does not exist.", + "description": "A certificate not found.", "schema": { "type": "object", "required": [ @@ -12375,782 +31293,91 @@ "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", - "groups", - "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.", - "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", - "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": "object", - "x-nullable": true, - "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" - }, - { - "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", - "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" + } + ] + }, + "_key": "404" } ], + "path": "/v3/trusted-certificates/{cert_id}", + "summary": "Get a trusted certificate.", + "return_type": "trusted_certificate", + "return_info": { + "self": false, + "custom": false, + "type": "trusted_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "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" + ], + "group_id": "Security", + "parameter_map": { + "developerCertificateId": "id", + "cert_id": "id" + }, + "operation_id": "getCertificate", + "unaggregated": true, "foreign_key": { - "group": "Accounts", - "entity": "password_policy" + "entity": "trusted_certificate", + "group": "Security" }, - "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" + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "get_trusted_certificate_info" }, { - "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.", - "api_fieldname": "inherited", - "entity_fieldname": "inherited", - "_key": "inherited" - }, - { - "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" + "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" } - }, - "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": "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", - "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" - }, - { - "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" - ], - "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": [ { "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", + "description": "ID that uniquely identifies the developer certificate.", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "developerCertificateId", + "in": "path", "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" - }, - { - "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" + "_key": "id" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "read", "responses": [ { - "description": "New entity created.", + "description": "Developer certificate returned successfully.", "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}", + "description": "Account to which the developer certificate belongs.", "api_fieldname": "account_id", "entity_fieldname": "account_id", "_key": "account_id" @@ -13158,125 +31385,93 @@ { "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", + "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", - "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}", + "description": "ID that uniquely identifies the developer certificate.", "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.", + "description": "Name of the developer certificate.", "api_fieldname": "name", "entity_fieldname": "name", "_key": "name" }, { "type": "string", - "description": "Entity name: always 'api-key'", - "enum": [ - "api-key" - ], + "description": "Entity name: always `trusted-cert`.", "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": "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": "Represents an API key in Device Management.", "foreign_key": { - "group": "Accounts", - "entity": "subtenant_api_key" + "group": "Security", + "entity": "developer_certificate" } }, - "_key": "201" + "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" }, { - "description": "Error in input data, for example, missing display name.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -13349,7 +31544,7 @@ "_key": "400" }, { - "description": "Authentication failure.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -13419,10 +31614,20 @@ } ] }, + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], "_key": "401" }, { - "description": "Forbidden.", + "description": "Developer certificate not found with given ID.", "schema": { "type": "object", "required": [ @@ -13492,16 +31697,26 @@ } ] }, - "_key": "403" + "examples": [ + { + "object": "error", + "code": 404, + "type": "not_found", + "message": "Not Found. Not found: 016006724ff53ade90ed948d03c00001", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], + "_key": "404" } ], - "path": "/v3/api-keys", - "summary": "Create a new API key.", - "return_type": "api_key", + "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": "api_key" + "type": "developer_certificate" }, "x_filter": {}, "x_deprecation": null, @@ -13509,52 +31724,159 @@ "object", "etag", "type", - "groups", "filter", - "id", "created_at", - "updated_at", - "key", - "creation_time", - "last_login_time", - "account_id" + "account_id", + "name", + "description", + "developer_private_key", + "security_file_content", + "certificate" ], - "group_id": "Accounts", + "group_id": "Security", "parameter_map": { - "apikey_id": "id" + "developerCertificateId": "id" }, - "operation_id": "createApiKey", + "operation_id": "getDeveloperCertificate", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_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" }, { - "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```", + "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": [ { - "name": "apikey_id", "in": "path", - "description": "The ID of the API key to delete.", + "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": "apikey_id", + "api_fieldname": "device_id", "external_param": false, - "parameter_fieldname": "apikey_id", + "parameter_fieldname": "device_id", + "required": true, "_key": "id" } ], - "method": "delete", - "mode": "delete", + "method": "post", + "mode": "add_to_group", "responses": [ { - "description": "Deleted successfully.", + "description": "Success - device added.", "_key": "204" }, { - "description": "Authentication failure.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -13624,10 +31946,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ @@ -13697,10 +32019,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "The API key with the specified ID does not exist.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -13773,13 +32095,13 @@ "_key": "404" } ], - "path": "/v3/api-keys/{apikey_id}", - "summary": "Delete API key.", - "return_type": "api_key", + "path": "/v3/device-groups/{device-group-id}/devices/add/", + "summary": "Add a device to a group.", + "return_type": "void", "return_info": { - "self": true, - "custom": false, - "type": "api_key" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -13787,817 +32109,1626 @@ "object", "etag", "type", - "groups", "filter" ], - "group_id": "Accounts", + "group_id": "Devices", + "operation_id": "Group_members_add", "parameter_map": { - "apikey_id": "id" + "device_id": "id" + }, + "spec": { + "return_type": "void" }, - "operation_id": "deleteApiKey", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "add_to_group" }, { - "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```", + "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", - "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", + "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, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "_key": "bootstrap_expiration_date" }, { - "name": "include", - "in": "query", - "description": "Comma-separated additional data to return. Currently supported: total_count.", + "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", - "entity_fieldname": "include", - "api_fieldname": "include", - "external_param": true, - "parameter_fieldname": "include", - "_key": "include" + "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", - "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", + "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, - "default": 50, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "_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": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "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": [ - "ASC", - "DESC" + "connector", + "direct" ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", + "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, - "default": "ASC", - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "api_key_order_enum", - "_key": "order" + "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 [serial number](https://www.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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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": "list", + "method": "post", + "mode": "create", "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" + "description": "Device created.", + "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", - "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" - } + "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": false, - "description": "Flag indicating whether there are more results.", - "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", - "format": "int32", - "example": 50, - "description": "The number of results to return, or equal to `total_count`.", - "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", - "description": "Entity name: always `list`.", "enum": [ - "list" + "enabled", + "blocked" ], - "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 order of the records to return based on creation time. Available values: ASC, DESC; by default ASC.", + "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" ], - "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", - "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": "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" + "deployment": { + "type": "string", + "description": "DEPRECATED: The last deployment used on the device.", + "example": "", + "api_fieldname": "deployment", + "entity_fieldname": "deployment" }, - { - "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": { + "type": "string", + "maxLength": 2000, + "description": "The description of the device.", + "example": "Temperature measuring device", + "api_fieldname": "description", + "entity_fieldname": "description" }, - { + "device_class": { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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": "Entity name, always `error`.", + "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" + }, + "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": "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": "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": "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" + "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": "The API resource entity.", + "example": "device", + "api_fieldname": "object", + "entity_fieldname": "object" + }, + "serial_number": { + "type": "string", + "description": "The [serial number](https://www.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": [ + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" + ], "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "description": "The time this data object was updated.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at" }, - { + "vendor_id": { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "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": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, + "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" } ], - "path": "/v3/api-keys", - "summary": "Get all API keys.", - "return_type": "paginated_response(api_key)", + "path": "/v3/devices/", + "summary": "Create a device.", + "return_type": "device", "return_info": { "self": true, "custom": false, - "type": "api_key" - }, - "x_filter": { - "key": [ - "eq" - ], - "owner": [ - "eq" - ] + "type": "device" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "total_count", - "has_more", - "data", - "key__eq", - "owner__eq" + "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", + "component_attributes", + "created_at", + "deployed_state", + "id", + "firmware_checksum", + "manifest_timestamp", + "net_id", + "updated_at", + "enrolment_list_timestamp" ], - "foreign_key_priority": "self", - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "getAllApiKeys", - "pagination": true, - "foreign_key": { - "group": "Accounts", - "entity": "api_key" + "group_id": "Devices", + "operation_id": "Device_create", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "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://www.pelion.com/docs/device-management/current/connecting/device-identity.html) created by Device Management.", + "in": "path", + "name": "id", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "id", + "external_param": false, + "parameter_fieldname": "id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "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": "list" + "_key": "delete" }, { - "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```", + "description": "List all devices enrolled to Device Management for the account.\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": [], + "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" + }, + { + "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": "me", + "mode": "list", "responses": [ { - "description": "Successful operation.", + "description": "Request successful.", "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" + "description": "An offset token for current page.", + "example": "01631667477600000000000100100374", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { + "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": "Device has been suspended by 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.\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": "The timestamp of the current manifest version." + }, + "mechanism": { + "enum": [ + "connector", + "direct" + ], + "type": "string", + "description": "NOT USED: The ID of the channel used to communicate with the device." + }, + "mechanism_url": { + "type": "string", + "description": "NOT USED: The address of the connector to use.", + "example": "" + }, + "name": { + "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" + }, + "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://www.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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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", - "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" + "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", + "description": "Are there more results available.", + "example": false, + "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" + "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: always 'api-key'", - "enum": [ - "api-key" - ], + "description": "The type of this API object is a \"list\".", + "example": "list", "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" + "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", - "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" + "format": "integer", + "type": "integer", + "example": 1, + "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" + "group": "Devices", + "entity": "device" } }, "_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" - } - ] - }, + "description": "Bad request.", + "_key": "400" + }, + { + "description": "Not authenticated.", "_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": "Unable to find page.", + "_key": "404" } ], - "path": "/v3/api-keys/me", - "summary": "Get API key details.", - "return_type": "api_key", + "path": "/v3/devices/", + "summary": "List all devices.", + "return_type": "paginated_response(device)", "return_info": { "self": true, "custom": false, - "type": "api_key" + "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", - "groups", "filter", - "id", - "created_at", - "updated_at", - "key", - "name", - "owner", - "status", - "creation_time", - "last_login_time", - "account_id" + "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" ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" + "foreign_key_priority": "self", + "group_id": "Devices", + "operation_id": "Device_list", + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device" }, - "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" + "_key": "list" }, { - "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": "Retrieve information about a specific device. This API returns [DeviceData](https://www.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://www.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": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", + "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": "apikey_id", + "parameter_fieldname": "id", "in": "path", "required": true, "_key": "id" @@ -14607,148 +33738,505 @@ "mode": "read", "responses": [ { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "etag", - "id", - "key", - "name", - "object" - ], - "properties": [ - { + "description": "Retrieved result successfully.", + "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": "string", + "example": "00000000000000000000000000000000" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups" + }, + "issuer_fingerprint": { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", + "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": "Device has been suspended by operator.", + "api_fieldname": "operator_suspended", + "entity_fieldname": "operator_suspended" + }, + "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": [ + "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", + "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", - "_key": "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": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "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" }, - { - "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" + "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", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "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" }, - { - "type": "array", - "description": "A list of group IDs this API key belongs to.", - "items": { - "type": "string" + "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].*" }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "_key": "groups" + "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": [ + "development", + "production" + ], "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", + "description": "DEPRECATED: The state of the device's deployment.", + "api_fieldname": "deployed_state", + "entity_fieldname": "deployed_state" + }, + "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", - "_key": "id" + "entity_fieldname": "id" }, - { + "device_key": { "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", - "entity_fieldname": "key", - "_key": "key" + "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" }, - { - "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" + "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", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "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": "Entity name: always 'api-key'", + "description": "The entity instance signature.", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "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": "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": "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": [ - "api-key" + "connector", + "direct" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_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", - "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": "NOT USED: The address of the connector to use.", + "example": "", + "api_fieldname": "mechanism_url", + "entity_fieldname": "mechanism_url" }, - { + "name": { "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", + "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" + }, + "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.", + "example": "device", + "api_fieldname": "object", + "entity_fieldname": "object" + }, + "serial_number": { + "type": "string", + "description": "The [serial number](https://www.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": [ - "ACTIVE", - "INACTIVE" + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" - }, - { "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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "description": "The time this data object was updated.", "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" + "entity_fieldname": "updated_at" + }, + "vendor_id": { + "type": "string", + "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": "Authentication failure.", + "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": [ @@ -14818,10 +34306,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ @@ -14891,10 +34379,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "API key with the specified ID does not exist.", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -14967,13 +34455,13 @@ "_key": "404" } ], - "path": "/v3/api-keys/{apikey_id}", - "summary": "Get API key details.", - "return_type": "api_key", + "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": "api_key" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -14981,235 +34469,362 @@ "object", "etag", "type", - "groups", - "filter", - "created_at", - "updated_at", - "key", - "name", - "owner", - "status", - "creation_time", - "last_login_time", - "account_id" + "filter" ], - "group_id": "Accounts", + "group_id": "Devices", + "operation_id": "Group_members_remove", "parameter_map": { - "apikey_id": "id" + "device_id": "id" + }, + "spec": { + "return_type": "void" }, - "operation_id": "getApiKey", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "remove_from_group" }, { - "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": "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", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "apikey_id", + "maxLength": 50, + "description": "The certificate name.", + "example": "customer.dlms", + "api_fieldname": "certificate-name", + "entity_fieldname": "certificate_name", "in": "path", + "name": "certificate-name", "required": true, - "_key": "id" + "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "external_param": true, + "parameter_fieldname": "certificate-name", + "_key": "certificate_name" }, { "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", + "description": "The certificate enrollment ID.", + "example": "01612df56f3b0a580a010fc700000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "device-id", + "in": "path", "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" - }, - { - "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" + "_key": "id" } ], - "method": "put", - "mode": "update", + "method": "post", + "mode": "renew_certificate", "responses": [ { - "description": "Successful operation.", + "description": "Created.", "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" + "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", - "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", + "example": "2017-01-01T00:00:00Z", "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", + "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", - "description": "API resource entity version.", "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" + }, + { + "description": "Validation error: There is no certificate issuer configured for this certificate.", + "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 group IDs this API key belongs to.", + "description": "A list of request fields that failed validation.", "items": { - "type": "string" + "type": "object", + "properties": [ + { + "type": "string", + "description": "Field name.", + "_key": "field" + }, + { + "type": "string", + "description": "Error message related to the field.", + "_key": "message" + } + ] }, - "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": "Error message.", + "_key": "message" }, { "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", - "entity_fieldname": "key", - "_key": "key" + "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": "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" + "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", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Error message.", + "_key": "message" }, { "type": "string", - "description": "Entity name: always 'api-key'", - "enum": [ - "api-key" - ], - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name: `error`.", "_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" + "description": "Request ID from JWT.", + "_key": "request_id" }, { "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "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", - "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": "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" } - ], - "description": "Represents an API key in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "subtenant_api_key" - } + ] }, - "_key": "200" + "_key": "403" }, { - "description": "Error in input data, for example, missing display name.", + "description": "The device ID or certificate name is not found.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -15219,29 +34834,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" } ] }, @@ -15249,40 +34859,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": "Authentication failure.", + "description": "Conflict. A renewal request for this certificate is in progress.", "schema": { "type": "object", "required": [ "code", + "fields", "message", "object", "request_id", @@ -15292,29 +34897,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" } ] }, @@ -15322,40 +34922,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": "409" }, { - "description": "Forbidden.", + "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", @@ -15365,145 +34960,627 @@ { "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" } ] }, "_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": "423" + } + ], + "path": "/v3/devices/{device-id}/certificates/{certificate-name}/renew", + "summary": "Request certificate renewal.", + "return_type": "certificate_enrollment", + "return_info": { + "self": false, + "custom": false, + "type": "certificate_enrollment" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "device_id", + "enroll_status", + "enroll_result", + "enroll_result_detail", + "updated_at" + ], + "group_id": "Devices", + "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": "renew_certificate" + }, + { + "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", + "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": 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", + "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": "put", + "mode": "update", + "responses": [ + { + "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": "string", + "example": "00000000000000000000000000000000" + }, + "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", + "description": "Device has been suspended by operator.", + "api_fieldname": "operator_suspended", + "entity_fieldname": "operator_suspended" + }, + "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": [ + "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", + "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": [ + "development", + "production" + ], + "type": "string", + "description": "DEPRECATED: The state of the device's deployment.", + "api_fieldname": "deployed_state", + "entity_fieldname": "deployed_state" + }, + "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" + }, + "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": "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": "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": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "description": "The timestamp of the current manifest version.", + "api_fieldname": "manifest_timestamp", + "entity_fieldname": "manifest_timestamp" }, - { - "type": "string", - "description": "Entity name, always `error`.", + "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": "403" - }, - { - "description": "The 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" + "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://www.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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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/api-keys/{apikey_id}", - "summary": "Update API key details.", - "return_type": "api_key", + "path": "/v3/devices/{id}/", + "summary": "Update a device.", + "return_type": "device", "return_info": { "self": true, "custom": false, - "type": "api_key" + "type": "device" }, "x_filter": {}, "x_deprecation": null, @@ -15511,26 +35588,42 @@ "object", "etag", "type", - "groups", "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", - "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." - } + "vendor_id", + "enrolment_list_timestamp" ], + "group_id": "Devices", + "operation_id": "Device_update", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -15540,39 +35633,234 @@ "fields": [ { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", + "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": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", + "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", - "format": "int64", - "example": 1518630727683, - "description": "The timestamp of the API key creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", + "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": "creation_time" + "_key": "endpoint_name" }, { "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", + "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, @@ -15580,565 +35868,425 @@ }, { "type": "string", - "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", - "description": "The API key.", - "api_fieldname": "key", + "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" + ], + "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": "key" + "_key": "net_id" }, { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "The timestamp of the latest API key usage, in milliseconds.", - "api_fieldname": "last_login_time", + "type": "boolean", + "description": "Device has been suspended by operator.", + "api_fieldname": "operator_suspended", "readOnly": true, "required": false, - "_key": "last_login_time" + "_key": "operator_suspended" }, { "type": "string", - "maxLength": 100, - "example": "API key gorgon", - "description": "The display name for the API key.", - "api_fieldname": "name", + "description": "The [serial number](https://www.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": true, - "_key": "name" + "required": false, + "_key": "serial_number" }, { + "enum": [ + "unenrolled", + "cloud_enrolling", + "bootstrapped", + "registered", + "deregistered" + ], "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", + "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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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, - "_key": "owner" + "enum_reference": "device_state_enum", + "_key": "state" }, { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "readOnly": false, + "type": "boolean", + "description": "Is the device suspended by the system?", + "api_fieldname": "system_suspended", + "readOnly": true, "required": false, - "enum_reference": "api_key_status_enum", - "_key": "status" + "_key": "system_suspended" }, { - "type": "string", "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update UTC time RFC3339.", + "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" + }, + { + "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": [ - "Account - API keys" + "Device directory - devices", + "Device security - device certificate renewals", + "Device directory - groups" ], - "group_id": "Accounts", - "_key": "api_key" + "group_id": "Devices", + "_key": "device" }, { "swagger_models": [ - "CampaignDeviceMetadata" + "EnrollmentId", + "EnrollmentIdentities", + "EnrollmentIdentity" ], "primary_key_field": "id", "methods": [ { - "description": "Get update campaign metadata.", - "field_renames": [ - { - "api_fieldname": "campaign", - "_key": "campaign_id" - } - ], + "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": "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", + "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", "required": true, - "_key": "id" + "_key": "enrollment_identity" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "Request successful", + "description": "Created. The enrollment claim has been created and is waiting for the device to connect.", "schema": { "type": "object", + "required": [ + "object", + "id", + "etag", + "account_id", + "created_at", + "expires_at", + "claimed_at", + "enrollment_identity", + "enrolled_device_id" + ], "properties": [ { "type": "string", - "description": "The device's campaign ID", - "example": "015bf72fccda00000000000100100280", - "api_fieldname": "campaign", - "entity_fieldname": "campaign_id", - "_key": "campaign" + "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", - "description": "The time the campaign was created", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "api_fieldname": "claimed_at", + "entity_fieldname": "claimed_at", + "_key": "claimed_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", - "entity_fieldname": "deployment_state", - "_key": "deployment_state" + "description": "The time of the enrollment identity creation.", + "format": "date-time", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { "type": "string", - "maxLength": 2000, - "description": "Description", - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "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": "The device ID", - "example": "015c2fec9bba0000000000010010036f", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" + "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", - "description": "API resource entity version", - "example": "2017-05-22T12:37:58.753425Z", + "pattern": "[A-Za-z0-9]{1,256}", + "example": "7642xfaxz", "api_fieldname": "etag", "entity_fieldname": "etag", "_key": "etag" }, { "type": "string", - "description": "The metadata record ID", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "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", - "example": "", - "api_fieldname": "mechanism_url", - "entity_fieldname": "mechanism_url", - "_key": "mechanism_url" + "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", - "maxLength": 128, - "description": "The record name", - "example": "default_object_name", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "The entity name: always 'update-campaign-device-metadata'", - "example": "update-campaign-device-metadata", + "enum": [ + "enrollment" + ], + "example": "enrollment", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" - }, - { - "type": "string", - "format": "date-time", - "description": "The record was modified in the database format: date-time", - "example": "2017-05-22T12:37:58.776736Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" } ], "foreign_key": { - "group": "Device_Update", - "entity": "campaign_device_metadata" + "group": "Devices", + "entity": "device_enrollment" } }, - "_key": "200" - }, - { - "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", - "groups", - "filter", - "created_at", - "deployment_state", - "description", - "device_id", - "mechanism", - "mechanism_url", - "name", - "updated_at" - ], - "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 campaign 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": "", - "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", - "example": "", - "api_fieldname": "mechanism_url", - "readOnly": true, - "required": false, - "_key": "mechanism_url" - }, - { - "type": "string", - "maxLength": 128, - "description": "The record name", - "example": "default_object_name", - "api_fieldname": "name", - "readOnly": true, - "required": false, - "_key": "name" - }, - { - "type": "string", - "format": "date-time", - "description": "The record was modified in the database format: date-time", - "example": "2017-05-22T12:37:58.776736Z", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [ - { - "api_fieldname": "campaign", - "_key": "campaign_id" - } - ], - "tags": [], - "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", - "field_renames": [], - "fields": [ - { - "description": "The campaign ID", - "in": "path", - "name": "campaign_id", - "required": true, - "type": "string", - "entity_fieldname": "campaign_id", - "api_fieldname": "campaign_id", - "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "campaign_id" + "_key": "201" }, { - "description": "The summary status. For example, fail", - "in": "path", - "name": "summary_status_id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "summary_status_id", - "external_param": false, - "parameter_fieldname": "summary_status_id", - "_key": "id" - } - ], - "method": "get", - "mode": "events", - "responses": [ - { - "description": "OK", + "description": "Bad request. The enrollment identity is not valid.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "description": "The entity ID to fetch after the given one", - "example": "null", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "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", - "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", - "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", - "example": "event-type", - "_key": "object" - }, - { - "type": "string", - "example": "FAIL", - "_key": "summary_status" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "example": "fail", - "_key": "summary_status_id" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" - } + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "_key": "fields" }, { - "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": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { - "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, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "The entity name: always 'list'", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" - } + ] }, - "_key": "200" + "_key": "400" }, { - "description": "Not Authenticated", + "description": "The provided access token is not valid.", "schema": { "type": "object", "required": [ @@ -16211,7 +36359,7 @@ "_key": "401" }, { - "description": "Not Found", + "description": "Conflict. The requested identity to add already exists on this or another account.", "schema": { "type": "object", "required": [ @@ -16281,16 +36429,16 @@ } ] }, - "_key": "404" + "_key": "409" } ], - "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)", + "path": "/v3/device-enrollments", + "summary": "Create a single enrollment.", + "return_type": "device_enrollment", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "campaign_statistics_events" + "type": "device_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -16298,178 +36446,47 @@ "object", "etag", "type", - "groups", "filter", - "order", - "limit", - "after", - "has_more", - "total_count", - "data" + "id", + "created_at", + "claimed_at", + "account_id", + "expires_at", + "enrolled_device_id" ], - "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" - }, + "group_id": "Devices", + "operation_id": "createDeviceEnrollment", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "events" + "_key": "create" }, { - "description": "Get a list of statistics for a campaign", + "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://www.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": [ { - "description": "The campaign ID", "in": "path", - "name": "campaign_id", - "required": true, + "name": "id", "type": "string", - "entity_fieldname": "campaign_id", - "api_fieldname": "campaign_id", + "required": true, + "description": "Enrollment identity.", + "entity_fieldname": "id", + "api_fieldname": "id", "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "campaign_id" + "parameter_fieldname": "id", + "_key": "id" } ], - "method": "get", - "mode": "list", + "method": "delete", + "mode": "delete", "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", - "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": "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'", - "example": "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": "No content. The enrollment claim has been deleted.", + "_key": "204" }, { - "description": "Not Authenticated", + "description": "Bad request. Invalid enrollment identity.", "schema": { "type": "object", "required": [ @@ -16539,10 +36556,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Not Found", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -16615,13 +36632,13 @@ "_key": "404" } ], - "path": "/v3/update-campaigns/{campaign_id}/statistics/", - "summary": "Get a list of statistics for a campaign", - "return_type": "paginated_response(campaign_statistics)", + "path": "/v3/device-enrollments/{id}", + "summary": "Delete an enrollment by ID.", + "return_type": "device_enrollment", "return_info": { "self": true, "custom": false, - "type": "campaign_statistics" + "type": "device_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -16629,112 +36646,214 @@ "object", "etag", "type", - "groups", - "filter", - "order", - "limit", - "after", - "has_more", - "total_count", - "data" + "filter" ], - "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" - }, + "group_id": "Devices", + "operation_id": "deleteDeviceEnrollment", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "delete" }, { - "description": "Get a summary status", + "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", - "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" + "description": "Entity ID to fetch after.", + "example": "00005a4e027f0a580a01081c00000000", + "pattern": "^[A-Za-z0-9]{32}", + "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": [ - "fail", - "success", - "info", - "skipped" + "ASC", + "DESC" ], - "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" + "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": "OK", + "description": "OK.", "schema": { "type": "object", + "required": [ + "object", + "limit", + "after", + "order", + "has_more", + "total_count", + "data" + ], "properties": [ { "type": "string", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "entity_fieldname": "campaign_id", - "_key": "campaign_id" + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "pattern": "^[A-Za-z0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { - "type": "integer", - "example": 10, - "api_fieldname": "count", - "entity_fieldname": "count", - "_key": "count" + "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", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "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": "string", - "enum": [ - "fail", - "success", - "info", - "skipped" - ], - "example": "fail", - "description": "ID of the event type description", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "type": "integer", + "description": "Range 2-1000, or default.", + "example": 50, + "minimum": 2, + "maximum": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "example": "summary_status", + "enum": [ + "list" + ], + "example": "list", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" @@ -16742,27 +36861,35 @@ { "type": "string", "enum": [ - "FAIL", - "SUCCESS", - "INFO", - "SKIPPED" + "ASC", + "DESC" ], - "example": "FAIL", - "description": "The event type description.", - "api_fieldname": "summary_status", - "entity_fieldname": "summary_status", - "_key": "summary_status" + "default": "ASC", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "type": "integer", + "example": 100, + "format": "int32", + "minimum": 1, + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } ], + "pagination": true, "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics" + "group": "Devices", + "entity": "device_enrollment" } }, "_key": "200" }, { - "description": "Not Authenticated", + "description": "Bad request. The access token could not be read.", "schema": { "type": "object", "required": [ @@ -16832,10 +36959,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Not Found", + "description": "The provided access token is not valid.", "schema": { "type": "object", "required": [ @@ -16905,16 +37032,16 @@ } ] }, - "_key": "404" + "_key": "401" } ], - "path": "/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}", - "summary": "Get a summary status", - "return_type": "campaign_statistics", + "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": "campaign_statistics" + "type": "device_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -16922,213 +37049,146 @@ "object", "etag", "type", - "groups", "filter", - "summary_status", - "count", - "created_at" + "has_more", + "total_count", + "data" ], - "group_id": "Device_Update", - "parameter_map": { - "summary_status_id": "id" + "foreign_key_priority": "self", + "group_id": "Devices", + "operation_id": "getDeviceEnrollments", + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device_enrollment" }, - "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" + "_key": "list" }, { - "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": [], - "group_id": "Device_Update", - "_key": "campaign_statistics" - }, - { - "swagger_models": [ - "EventType" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Get an event type for a campaign", + "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", - "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", + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "event_type_id", + "parameter_fieldname": "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", + "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", - "example": "00000000000000000000000000000000", - "description": "ID of the associated campaign.", - "api_fieldname": "campaign_id", - "entity_fieldname": "campaign_id", - "_key": "campaign_id" + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { - "type": "integer", - "example": 10, - "api_fieldname": "count", - "entity_fieldname": "count", - "_key": "count" + "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", - "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" + "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", - "example": "UPD4_FAIL_101", - "api_fieldname": "event_type", - "entity_fieldname": "event_type", - "_key": "event_type" + "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", - "example": "upd_fail_101", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "pattern": "[A-Za-z0-9]{1,256}", + "example": "7642xfaxz", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "string", - "example": "event-type", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "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", - "example": "FAIL", - "api_fieldname": "summary_status", - "entity_fieldname": "summary_status", - "_key": "summary_status" + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "example": "fail", - "api_fieldname": "summary_status_id", - "entity_fieldname": "summary_status_id", - "_key": "summary_status_id" + "enum": [ + "enrollment" + ], + "example": "enrollment", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" } ], "foreign_key": { - "group": "Device_Update", - "entity": "campaign_statistics_events" + "group": "Devices", + "entity": "device_enrollment" } }, "_key": "200" }, { - "description": "Not Authenticated", + "description": "Bad request. Invalid enrollment identity.", "schema": { "type": "object", "required": [ @@ -17198,10 +37258,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Not Found", + "description": "Not found.", "schema": { "type": "object", "required": [ @@ -17274,13 +37334,13 @@ "_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/device-enrollments/{id}", + "summary": "Get details of an single enrollment by ID.", + "return_type": "device_enrollment", "return_info": { "self": true, "custom": false, - "type": "campaign_statistics_events" + "type": "device_enrollment" }, "x_filter": {}, "x_deprecation": null, @@ -17288,19 +37348,16 @@ "object", "etag", "type", - "groups", "filter", "created_at", - "event_type", - "description", - "summary_status", - "count" + "claimed_at", + "enrollment_identity", + "account_id", + "expires_at", + "enrolled_device_id" ], - "group_id": "Device_Update", - "parameter_map": { - "event_type_id": "id" - }, - "operation_id": "Update_Campaign_event_types_retrieve", + "group_id": "Devices", + "operation_id": "getDeviceEnrollment", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -17310,347 +37367,244 @@ "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", + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "account_id", "readOnly": true, "required": false, - "_key": "count" + "_key": "account_id" }, { "type": "string", + "description": "The time the device was claimed.", "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", + "api_fieldname": "claimed_at", "readOnly": true, "required": false, - "_key": "created_at" + "_key": "claimed_at" }, { "type": "string", - "example": "Update error, nonspecific network error", - "api_fieldname": "description", + "description": "The time of the enrollment identity creation.", + "format": "date-time", + "api_fieldname": "created_at", "readOnly": true, "required": false, - "_key": "description" + "_key": "created_at" }, { "type": "string", - "example": "UPD4_FAIL_101", - "api_fieldname": "event_type", + "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": "event_type" + "_key": "enrolled_device_id" }, { "type": "string", - "example": "upd_fail_101", - "api_fieldname": "id", + "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": "id" + "_key": "enrollment_identity" }, { "type": "string", - "example": "FAIL", - "api_fieldname": "summary_status", + "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": "summary_status" + "_key": "expires_at" }, { "type": "string", - "example": "fail", - "api_fieldname": "summary_status_id", + "description": "Enrollment identity.", + "pattern": "^[A-Za-z0-9]{32}", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "id", "readOnly": false, - "required": true, - "_key": "summary_status_id" - } - ], - "field_renames": [], - "tags": [], - "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": "01625daa23230a580a0100bd00000000", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", - "pattern": "[0-9a-fA-F]{32}", - "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" - }, - { - "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" - }, - { - "type": "integer", - "format": "int32", - "description": "The number of results to return (2-1000).", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" - }, - { - "type": "string", - "description": "The order of results.", - "enum": [ - "ASC", - "DESC" - ], - "api_fieldname": "order", - "entity_fieldname": "order", - "name": "order", - "in": "query", - "required": false, - "external_param": true, - "parameter_fieldname": "order", - "enum_reference": "certificate_enrollment_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "OK.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "description": "The entity ID to fetch after the given one.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "type": "array", - "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" - } - }, - "description": "List of certificate enrollments.", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "required": true, + "_key": "id" + } + ], + "field_renames": [], + "tags": [ + "Device ownership - enrollments" + ], + "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": [ + { + "description": "Bulk upload data received and asynchronous processing started.", + "schema": { + "type": "object", + "required": [ + "object", + "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": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { - "type": "boolean", - "description": "Flag indicating whether there are more results.", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "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", - "format": "int32", - "description": "The number of results to return.", - "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", + "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", + "_key": "id" }, { "type": "string", "enum": [ - "list" + "enrollment-identity-bulk-uploads" ], - "description": "Describes the type of objects in the list.", + "example": "enrollment-identity-bulk-uploads", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "type": "string", - "description": "Record order based on creation time. Acceptable values: ASC, DESC. Default: ASC.", + "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" ], - "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" }, { "type": "integer", - "format": "int32", - "description": "The total number of records.", + "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": "Security", - "entity": "certificate_enrollment" + "group": "Devices", + "entity": "device_enrollment_bulk_delete" } }, - "_key": "200" + "_key": "201" }, { - "description": "Validation error.", + "description": "Bad request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -17660,24 +37614,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" } ] }, @@ -17685,22 +37644,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" } ] @@ -17708,12 +37673,11 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -17723,87 +37687,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" - }, - { - "type": "string", - "description": "Error message related to the field.", + "description": "Message describing the error condition.", "_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": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -17811,108 +37717,147 @@ }, { "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" } ], - "path": "/v3/certificate-enrollments", - "summary": "Get certificate enrollments list.", - "return_type": "paginated_response(certificate_enrollment)", + "path": "/v3/device-enrollments-bulk-uploads", + "summary": "Bulk upload.", + "return_type": "device_enrollment_bulk_create", "return_info": { "self": true, "custom": false, - "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" - ] + "type": "device_enrollment_bulk_create" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", + "id", + "account_id", + "created_at", + "status", "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" + "processed_count", + "errors_count", + "completed_at", + "full_report_file", + "errors_report_file" ], - "foreign_key_priority": "self", - "group_id": "Security", - "parameter_map": { - "certificate-enrollment-id": "id" + "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" }, - "operation_id": "getCertificateEnrollments", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "certificate_enrollment" + "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": "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 created of 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_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" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "download_full_report_file" }, { - "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```", + "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": [ { "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", + "description": "Bulk ID", + "pattern": "^[A-Za-z0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "certificate-enrollment-id", + "parameter_fieldname": "id", "in": "path", "required": true, "_key": "id" @@ -17922,132 +37867,145 @@ "mode": "read", "responses": [ { - "description": "OK.", + "description": "Bulk upload entity found.", "schema": { "type": "object", + "required": [ + "object", + "id", + "etag", + "created_at", + "account_id", + "status", + "total_count", + "processed_count", + "errors_count", + "completet_at", + "full_report_file", + "errors_report_file" + ], "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": "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", - "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" + "api_fieldname": "completed_at", + "entity_fieldname": "completed_at", + "_key": "completed_at" }, { "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" + "description": "The time of receiving the bulk creation task.", + "format": "date-time", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "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": "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": "The status of certificate enrollment request.", - "enum": [ - "new", - "completed" - ], - "api_fieldname": "enroll_status", - "entity_fieldname": "enroll_status", - "_key": "enroll_status" + "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": "Entity instance signature.", + "description": "etag", "example": "1", + "pattern": "[A-Za-z0-9]{0,256}", "api_fieldname": "etag", "entity_fieldname": "etag", "_key": "etag" }, { "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", + "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": "device-id", - "in": "path", - "required": true, "_key": "id" }, { "type": "string", "enum": [ - "certificate-enrollment" + "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", - "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" + "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" } ], - "required": [ - "created_at", - "etag", - "id", - "device_id", - "certificate_name" - ], "foreign_key": { "group": "Devices", - "entity": "device" + "entity": "device_enrollment_bulk_delete" } }, "_key": "200" }, { - "description": "Validation error.", + "description": "Bad request. Invalid bulk identity.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18057,24 +38015,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" } ] }, @@ -18082,22 +38045,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" } ] @@ -18105,12 +38074,11 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18120,87 +38088,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" - }, - { - "type": "string", - "description": "Error message related to the field.", + "description": "Message describing the error condition.", "_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": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -18208,27 +38118,33 @@ }, { "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.", @@ -18236,7 +38152,6 @@ "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18246,24 +38161,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" } ] }, @@ -18271,22 +38191,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" } ] @@ -18294,13 +38220,13 @@ "_key": "404" } ], - "path": "/v3/certificate-enrollments/{certificate-enrollment-id}", - "summary": "Get a certificate enrollment by ID.", - "return_type": "certificate_enrollment", + "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": "certificate_enrollment" + "type": "device_enrollment_bulk_create" }, "x_filter": {}, "x_deprecation": null, @@ -18308,21 +38234,19 @@ "object", "etag", "type", - "groups", "filter", + "account_id", "created_at", - "device_id", - "certificate_name", - "enroll_status", - "enroll_result", - "enroll_result_detail", - "updated_at" + "status", + "total_count", + "processed_count", + "errors_count", + "completed_at", + "full_report_file", + "errors_report_file" ], - "group_id": "Security", - "parameter_map": { - "certificate-enrollment-id": "id" - }, - "operation_id": "getCertificateEnrollment", + "group_id": "Devices", + "operation_id": "getBulkDeviceEnrollment", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -18332,292 +38256,280 @@ "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", + "description": "ID", + "example": "00005a4e027f0a580a01081c00000000", + "api_fieldname": "account_id", "readOnly": true, - "_key": "certificate_name" + "required": false, + "_key": "account_id" }, { "type": "string", + "description": "The time the bulk creation task was completed.\nNull when creating bulk upload or delete.", "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "created_at", + "api_fieldname": "completed_at", "readOnly": true, "required": false, - "_key": "created_at" + "_key": "completed_at" }, { "type": "string", - "description": "The device ID.", - "example": "01625daa23230a580a0100bd00000000", - "api_fieldname": "device_id", + "description": "The time of receiving the bulk creation task.", + "format": "date-time", + "api_fieldname": "created_at", "readOnly": true, "required": false, - "_key": "device_id" + "_key": "created_at" }, { - "type": "string", - "enum": [ - "success", - "failure" - ], - "description": "The result of certificate enrollment request.", - "example": "success", - "api_fieldname": "enroll_result", + "type": "integer", + "example": 0, + "description": "The number of enrollment identities with failed processing.", + "api_fieldname": "errors_count", "readOnly": true, "required": false, - "enum_reference": "certificate_enrollment_enroll_result_enum", - "_key": "enroll_result" + "_key": "errors_count" }, { "type": "string", - "description": "Additional information in case of failure.", - "example": "The device is currently processing too many certificate renewals.", - "api_fieldname": "enroll_result_detail", + "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": "enroll_result_detail" + "_key": "errors_report_file" }, { "type": "string", - "description": "The status of certificate enrollment request.", - "enum": [ - "new", - "completed" - ], - "api_fieldname": "enroll_status", + "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, - "enum_reference": "certificate_enrollment_enroll_status_enum", - "_key": "enroll_status" + "_key": "full_report_file" }, { "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", + "description": "Bulk ID", + "pattern": "^[A-Za-z0-9]{32}", "api_fieldname": "id", - "parameter_fieldname": "device-id", - "in": "path", - "required": true, "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", - "format": "date-time", - "description": "Update UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", - "api_fieldname": "updated_at", + "api_fieldname": "status", "readOnly": true, "required": false, - "_key": "updated_at" + "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": [ - "Device security - device certificate renewals" + "Device ownership - enrollments" ], - "group_id": "Security", - "_key": "certificate_enrollment" + "group_id": "Devices", + "_key": "device_enrollment_bulk_create" }, { "swagger_models": [ - "CertificateIssuerInfo", - "CertificateIssuerInfoListResponse", - "CertificateIssuerRequest", - "CertificateIssuerUpdateRequest", - "CertificateIssuerVerifyResponse" + "BulkResponse" ], "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": "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", - "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", + "in": "stream", + "name": "enrollment_identities", + "type": "file", "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" + "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": "enrollment_identities", + "_key": "enrollment_identities" } ], "method": "post", - "mode": "create", + "mode": "delete", "responses": [ { - "description": "Created.", + "description": "Bulk delete data received and asynchronous processing started.", "schema": { "type": "object", + "required": [ + "object", + "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": "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", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", "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", - "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": "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": "Entity instance signature.", + "description": "etag", "example": "1", + "pattern": "[A-Za-z0-9]{0,256}", "api_fieldname": "etag", "entity_fieldname": "etag", "_key": "etag" }, { "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", + "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": "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" + "enrollment-identity-bulk-uploads" ], - "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" + "example": "enrollment-identity-bulk-uploads", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { - "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "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": [ - "certificate-issuer" + "new", + "processing", + "completed" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "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" } ], - "required": [ - "issuer_type" - ], "foreign_key": { - "group": "Security", - "entity": "certificate_issuer" + "group": "Devices", + "entity": "device_enrollment_bulk_create" } }, "_key": "201" }, { - "description": "Validation error: The data used to create the certificate issuer failed validation.\n", + "description": "Bad request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18627,24 +38539,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" } ] }, @@ -18652,22 +38569,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" } ] @@ -18675,12 +38598,11 @@ "_key": "400" }, { - "description": "You are not authorized to view the resource.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18690,24 +38612,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" } ] }, @@ -18715,35 +38642,298 @@ }, { "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" + } + ], + "path": "/v3/device-enrollments-bulk-deletes", + "summary": "Bulk delete.", + "return_type": "device_enrollment_bulk_delete", + "return_info": { + "self": true, + "custom": false, + "type": "device_enrollment_bulk_delete" + }, + "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": "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": "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": "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": [ + { + "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" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "Bulk delete entity found.", + "schema": { + "type": "object", + "required": [ + "object", + "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": "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", + "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": "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" + } + ], + "foreign_key": { + "group": "Devices", + "entity": "device_enrollment_bulk_create" + } + }, + "_key": "200" }, { - "description": "Forbidden.", + "description": "Bad request. Invalid bulk identity.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18753,24 +38943,102 @@ { "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.", + "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": "Message describing the error condition.", "_key": "message" + }, + { + "type": "string", + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -18778,35 +39046,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": "Conflict. A certificate issuer with this name already exists.\n", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -18816,24 +39089,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" } ] }, @@ -18841,405 +39119,675 @@ }, { "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": "404" + } + ], + "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_bulk_delete" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "account_id", + "created_at", + "status", + "total_count", + "processed_count", + "errors_count", + "completed_at", + "full_report_file", + "errors_report_file" + ], + "group_id": "Devices", + "operation_id": "getBulkDeviceEnrollmentDelete", + "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 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", + "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", + "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": "errors_report_file" + }, + { + "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", + "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", + "api_fieldname": "status", + "readOnly": true, + "required": false, + "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": [ + "Device ownership - enrollments" + ], + "group_id": "Devices", + "_key": "device_enrollment_bulk_delete" + }, + { + "swagger_models": [ + "DeviceEventData", + "DeviceEventPage" + ], + "primary_key_field": "id", + "methods": [ + { + "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://www.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": [ + { + "type": "string", + "example": null, + "api_fieldname": "after", + "entity_fieldname": "after", + "description": "The ID of the item after which to retrieve the next page.", + "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", + "example": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "description": "How many objects to retrieve in the page (2-1000). Limit values outside of this range are set to the closest limit.", + "in": "query", + "name": "limit", + "minimum": 2, + "maximum": 1000, + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" }, { - "description": "The request failed due to customer configured external service.\n", + "type": "string", + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "description": "Record order. Acceptable values: ASC, DESC. Default: ASC.", + "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", + "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": "object", + "additionalProperties": { + "type": "object" + }, + "example": [], + "x-deprecation": { + "issued_at": "2019-01-15T14:55:20+00:00", + "end_of_life_at": "2020-01-15T14:55:20+00:00", + "comment": "This field is not used.", + "links": [] + }, + "_key": "changes" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Field name.", - "_key": "field" + "_key": "created_at" + }, + { + "type": "object", + "example": { + "campaign_id": "00000000000000000000000000000000" + }, + "description": "Additional data relevant to the event.", + "additionalProperties": { + "type": "string" + }, + "_key": "data" }, { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "_key": "date_time" + }, + { + "type": "string", + "example": "Device record created", + "_key": "description" + }, + { + "type": "string", + "example": "00000000000000000000000000000000", + "_key": "device_id" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "_key": "etag" + }, + { + "type": "string", + "maxLength": 100, + "example": "UPD2_100", + "description": "Event code", + "_key": "event_type" + }, + { + "type": "string", + "example": "FAIL_MANIFEST_REJECTED", + "description": "Category code that groups the event type by a summary category.", + "_key": "event_type_category" + }, + { + "type": "string", + "example": "FAIL", + "description": "Generic description of the event.", + "_key": "event_type_description" + }, + { + "type": "string", + "example": "00000000000000000000000000000000", + "_key": "id" + }, + { + "type": "string", + "description": "The API resource entity.", + "example": "device-event", + "_key": "object" + }, + { + "type": "boolean", + "_key": "state_change" } - ] + ], + "required": [ + "date_time", + "id" + ], + "foreign_key": { + "group": "Devices", + "entity": "device_events" + } }, - "_key": "fields" + "type": "array", + "example": "[]", + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "Error message.", - "_key": "message" + "type": "boolean", + "example": false, + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" + }, + { + "type": "integer", + "example": 1000, + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: `error`.", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "example": "DESC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" }, { - "type": "string", - "description": "Error type.", - "_key": "type" + "type": "integer", + "example": 1, + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } - ] + ], + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device_events" + } }, - "_key": "424" + "_key": "200" + }, + { + "description": "Bad request.", + "_key": "400" + }, + { + "description": "Not authenticated.", + "_key": "401" + }, + { + "description": "Unable to find page.", + "_key": "404" } ], - "path": "/v3/certificate-issuers", - "summary": "Create certificate issuer.", - "return_type": "certificate_issuer", + "path": "/v3/device-events/", + "summary": "List all device events.", + "return_type": "paginated_response(device_events)", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "device_events" + }, + "x_filter": { + "date_time": [ + "in", + "nin", + "lte", + "gte" + ], + "description": [ + "eq", + "neq", + "in", + "nin" + ], + "id": [ + "eq", + "neq", + "in", + "nin" + ], + "device_id": [ + "eq", + "neq", + "in", + "nin" + ], + "event_type": [ + "eq", + "neq", + "in", + "nin" + ], + "state_change": [ + "eq", + "neq" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "created_at", - "id" + "data", + "has_more", + "total_count", + "date_time__in", + "date_time__nin", + "date_time__lte", + "date_time__gte", + "description__eq", + "description__neq", + "description__in", + "description__nin", + "id__eq", + "id__neq", + "id__in", + "id__nin", + "device_id__eq", + "device_id__neq", + "device_id__in", + "device_id__nin", + "event_type__eq", + "event_type__neq", + "event_type__in", + "event_type__nin", + "state_change__eq", + "state_change__neq" ], - "group_id": "Security", - "parameter_map": { - "certificate-issuer-id": "id" + "foreign_key_priority": "self", + "group_id": "Devices", + "operation_id": "Device_Event_list", + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device_events" }, - "operation_id": "createCertificateIssuer", - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "list" }, { - "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", + "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": [ { - "name": "certificate-issuer-id", - "in": "path", - "description": "Certificate issuer ID.
The ID of the certificate issuer.\nAn active certificate issuer may not be deleted.\n", - "required": true, "type": "string", + "example": "00000000000000000000000000000000", + "api_fieldname": "id", "entity_fieldname": "id", - "api_fieldname": "certificate-issuer-id", - "external_param": false, - "parameter_fieldname": "certificate-issuer-id", + "parameter_fieldname": "device_event_id", + "in": "path", + "required": true, "_key": "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": "Retrieved result successfully.", "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" - } - ] + "type": "object", + "additionalProperties": { + "type": "object" }, - "_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" + "example": [], + "x-deprecation": { + "issued_at": "2019-01-15T14:55:20+00:00", + "end_of_life_at": "2020-01-15T14:55:20+00:00", + "comment": "This field is not used.", + "links": [] + }, + "api_fieldname": "changes", + "entity_fieldname": "changes", + "_key": "changes" }, { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "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" + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "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" - } - ] + "type": "object", + "example": { + "campaign_id": "00000000000000000000000000000000" }, - "_key": "fields" - }, - { - "type": "string", - "description": "Error message.", - "_key": "message" + "description": "Additional data relevant to the event.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "api_fieldname": "date_time", + "entity_fieldname": "date_time", + "_key": "date_time" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "example": "Device record created", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" }, { "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" + "example": "00000000000000000000000000000000", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" }, { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Error message.", - "_key": "message" + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "maxLength": 100, + "example": "UPD2_100", + "description": "Event code", + "api_fieldname": "event_type", + "entity_fieldname": "event_type", + "_key": "event_type" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "example": "FAIL_MANIFEST_REJECTED", + "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" }, { "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" + "example": "FAIL", + "description": "Generic description of the event.", + "api_fieldname": "event_type_description", + "entity_fieldname": "event_type_description", + "_key": "event_type_description" }, { "type": "string", - "description": "Error message.", - "_key": "message" + "example": "00000000000000000000000000000000", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "The API resource entity.", + "example": "device-event", + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { - "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" + "type": "boolean", + "api_fieldname": "state_change", + "entity_fieldname": "state_change", + "_key": "state_change" } - ] + ], + "required": [ + "date_time", + "id" + ], + "foreign_key": { + "group": "Devices", + "entity": "device_events" + } }, + "_key": "200" + }, + { + "description": "Bad request.", + "_key": "400" + }, + { + "description": "Not authenticated.", + "_key": "401" + }, + { + "description": "Unable to find device.", "_key": "404" } ], - "path": "/v3/certificate-issuers/{certificate-issuer-id}", - "summary": "Delete certificate issuer.", - "return_type": "certificate_issuer", + "path": "/v3/device-events/{device_event_id}/", + "summary": "Retrieve a device event.", + "return_type": "device_events", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "device_events" }, "x_filter": {}, "x_deprecation": null, @@ -19247,237 +39795,264 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "created_at", + "changes", + "data", + "date_time", + "description", + "device_id", + "event_type", + "event_type_category", + "event_type_description", + "state_change" ], - "group_id": "Security", + "group_id": "Devices", + "operation_id": "Device_Event_retrieve", "parameter_map": { - "certificate-issuer-id": "id" + "device_event_id": "id" }, - "operation_id": "deleteCertificateIssuer", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" + } + ], + "fields": [ + { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "example": [], + "x-deprecation": { + "issued_at": "2019-01-15T14:55:20+00:00", + "end_of_life_at": "2020-01-15T14:55:20+00:00", + "comment": "This field is not used.", + "links": [] + }, + "api_fieldname": "changes", + "readOnly": true, + "required": false, + "_key": "changes" }, { - "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", - "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", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "type": "object", + "example": { + "campaign_id": "00000000000000000000000000000000" + }, + "description": "Additional data relevant to the event.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "data", + "readOnly": true, + "required": false, + "_key": "data" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "api_fieldname": "date_time", + "readOnly": true, + "required": false, + "_key": "date_time" + }, + { + "type": "string", + "example": "Device record created", + "api_fieldname": "description", + "readOnly": true, + "required": false, + "_key": "description" + }, + { + "type": "string", + "example": "00000000000000000000000000000000", + "api_fieldname": "device_id", + "readOnly": true, + "required": false, + "_key": "device_id" + }, + { + "type": "string", + "maxLength": 100, + "example": "UPD2_100", + "description": "Event code", + "api_fieldname": "event_type", + "readOnly": true, + "required": false, + "_key": "event_type" + }, + { + "type": "string", + "example": "FAIL_MANIFEST_REJECTED", + "description": "Category code that groups the event type by a summary category.", + "api_fieldname": "event_type_category", + "readOnly": true, + "required": false, + "_key": "event_type_category" + }, + { + "type": "string", + "example": "FAIL", + "description": "Generic description of the event.", + "api_fieldname": "event_type_description", + "readOnly": true, + "required": false, + "_key": "event_type_description" + }, + { + "type": "string", + "example": "00000000000000000000000000000000", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "boolean", + "api_fieldname": "state_change", + "readOnly": true, + "required": false, + "_key": "state_change" + } + ], + "field_renames": [], + "tags": [ + "Device directory - events" + ], + "group_id": "Devices", + "_key": "device_events" + }, + { + "swagger_models": [ + "DeviceGroup", + "DeviceGroupManipulation", + "DeviceGroupPage", + "DevicePage" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Add one device to a group. A device can be in multiple groups.", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "00000000000000000000000000000000", + "name": "device_id", + "in": "body", + "schema_param": true, + "entity_fieldname": "device_id", + "api_fieldname": "device_id", "external_param": true, - "parameter_fieldname": "limit", + "parameter_fieldname": "device_id", "required": false, - "_key": "limit" + "_key": "device_id" }, { + "in": "path", + "description": "The ID of the group.", + "name": "device-group-id", + "required": true, "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" + "entity_fieldname": "id", + "api_fieldname": "device-group-id", + "external_param": false, + "parameter_fieldname": "device-group-id", + "_key": "id" } ], - "method": "get", - "mode": "list", + "method": "post", + "mode": "add_device", "responses": [ { - "description": "OK.", + "description": "Success - device added.", + "_key": "204" + }, + { + "description": "Bad request.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "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": "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", - "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": "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" - }, - { - "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", - "_key": "issuer_type" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", + "description": "Name of the field which caused the error.", "_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": "Are there more results available.", - "example": false, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "_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", - "in": "query", - "name": "limit", - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_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", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "_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": "Security", - "entity": "certificate_issuer" - } + ] }, - "_key": "200" + "_key": "400" }, { "description": "Unauthorized.", @@ -19485,7 +40060,6 @@ "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -19495,24 +40069,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" } ] }, @@ -19520,22 +40099,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" } ] @@ -19543,12 +40128,11 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -19558,24 +40142,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" } ] }, @@ -19583,36 +40172,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": "403" + "_key": "404" } ], - "path": "/v3/certificate-issuers", - "summary": "Get certificate issuers list.", - "return_type": "paginated_response(certificate_issuer)", + "path": "/v3/device-groups/{device-group-id}/devices/add/", + "summary": "Add a device to a group.", + "return_type": "void", "return_info": { - "self": true, - "custom": false, - "type": "certificate_issuer" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -19620,145 +40215,254 @@ "object", "etag", "type", - "groups", - "filter", - "has_more", - "total_count", - "data" + "filter" ], - "foreign_key_priority": "self", - "group_id": "Security", + "group_id": "Devices", "parameter_map": { - "certificate-issuer-id": "id" + "device-group-id": "id" }, - "operation_id": "getCertificateIssuers", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer" + "operation_id": "Group_members_add", + "spec": { + "return_type": "void" }, + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "add_device" }, { - "description": "(No description provided)", + "description": "Create a group.", "field_renames": [], "fields": [ + { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "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" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "name": "custom_attributes", + "in": "body", + "schema_param": true, + "parameter_fieldname": "custom_attributes", + "required": false, + "_key": "custom_attributes" + }, { "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" + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", + "api_fieldname": "description", + "entity_fieldname": "description", + "name": "description", + "in": "body", + "schema_param": true, + "parameter_fieldname": "description", + "required": false, + "_key": "description" + }, + { + "type": "string", + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "api_fieldname": "name", + "entity_fieldname": "name", + "name": "name", + "in": "body", + "schema_param": true, + "parameter_fieldname": "name", + "required": false, + "_key": "name" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "OK.", + "description": "Created.", "schema": { "type": "object", "properties": [ { "type": "string", "format": "date-time", - "description": "Creation UTC time RFC3339.", - "example": "2017-01-01T00:00:00Z", + "description": "The time the group was created.", + "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, + { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "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" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "_key": "custom_attributes" + }, { "type": "string", - "maxLength": 100, - "description": "General description for the certificate issuer.", - "example": "GlobalSign sample issuer", - "x-nullable": true, + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", "api_fieldname": "description", "entity_fieldname": "description", "_key": "description" }, { + "type": "integer", + "description": "The number of devices in this group.", + "example": 10, + "api_fieldname": "devices_count", + "entity_fieldname": "devices_count", + "_key": "devices_count" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "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.", - "example": "01234567890ABCDEF01234567890ABCDEF", + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", "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", + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "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" + "description": "Entity name: always `device-group`.", + "example": "device-group", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "format": "date-time", + "description": "The time this object was updated.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" + } + ], + "foreign_key": { + "group": "Devices", + "entity": "device_group" + } + }, + "_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": [ - "certificate-issuer" + "error" ], - "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" } - ], - "required": [ - "issuer_type" - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer" - } + ] }, - "_key": "200" + "_key": "400" }, { - "description": "Validation error: The data used to get the certificate issuer failed validation.\n", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -19768,24 +40472,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" } ] }, @@ -19793,35 +40502,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": "Unauthorized.", + "description": "Conflict - Group name already exists.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -19831,24 +40545,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" } ] }, @@ -19856,35 +40575,95 @@ }, { "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": "409" + } + ], + "path": "/v3/device-groups/", + "summary": "Create a group.", + "return_type": "device_group", + "return_info": { + "self": true, + "custom": false, + "type": "device_group" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "id", + "devices_count", + "created_at", + "updated_at" + ], + "group_id": "Devices", + "parameter_map": { + "device-group-id": "id" + }, + "operation_id": "Group_create", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "description": "Delete a group. This deletes the group, but not the devices in the group.", + "field_renames": [], + "fields": [ + { + "description": "The ID of the group.", + "in": "path", + "name": "device-group-id", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "device-group-id", + "external_param": false, + "parameter_fieldname": "device-group-id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Success - group deleted.", + "_key": "204" }, { - "description": "Forbidden.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -19894,24 +40673,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" } ] }, @@ -19919,35 +40703,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", @@ -19957,24 +40746,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" } ] }, @@ -19982,22 +40776,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" } ] @@ -20005,13 +40805,13 @@ "_key": "404" } ], - "path": "/v3/certificate-issuers/{certificate-issuer-id}", - "summary": "Get certificate issuer by ID.", - "return_type": "certificate_issuer", + "path": "/v3/device-groups/{device-group-id}/", + "summary": "Delete a group.", + "return_type": "device_group", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer" + "type": "device_group" }, "x_filter": {}, "x_deprecation": null, @@ -20019,198 +40819,472 @@ "object", "etag", "type", - "groups", - "filter", - "created_at", - "issuer_type", - "name", - "description", - "issuer_attributes" + "filter" ], - "group_id": "Security", + "group_id": "Devices", "parameter_map": { - "certificate-issuer-id": "id" + "device-group-id": "id" }, - "operation_id": "getCertificateIssuer", + "operation_id": "Group_delete", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete" }, { - "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", + "description": "Get a page of devices in a specified group.", "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", + "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": "description" + "_key": "after" }, { - "type": "string", - "description": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "certificate-issuer-id", "in": "path", + "name": "device-group-id", "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "device-group-id", + "external_param": false, + "parameter_fieldname": "device-group-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", - "parameter_fieldname": "issuer_attributes", - "in": "body", + "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": "issuer_attributes" + "_key": "include" }, { - "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", + "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": "issuer_credentials", + "parameter_fieldname": "limit", "required": false, - "_key": "issuer_credentials" + "_key": "limit" }, { "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", + "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": "name" + "_key": "order" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "devices", "responses": [ { - "description": "OK.", + "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" + "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": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "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": "Device has been suspended by 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.\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": "The timestamp of the current manifest version." + }, + "mechanism": { + "enum": [ + "connector", + "direct" + ], + "type": "string", + "description": "NOT USED: The ID of the channel used to communicate with the device." + }, + "mechanism_url": { + "type": "string", + "description": "NOT USED: The address of the connector to use.", + "example": "" + }, + "name": { + "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" + }, + "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://www.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://www.pelion.com/docs/device-management-api/connect/) can be queued. The device sends events for [subscribed](https://www.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": "The ID of the certificate issuer.", - "example": "01234567890ABCDEF01234567890ABCDEF", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "type": "boolean", + "description": "Are there more results available.", + "example": false, + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { - "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": "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", - "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" + "description": "The type of this API object is a \"list\".", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { "type": "string", - "maxLength": 50, - "description": "Certificate issuer name, unique per account.", - "example": "GS Issuer", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "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" }, { - "type": "string", - "enum": [ - "certificate-issuer" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "format": "integer", + "type": "integer", + "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": "Devices", + "entity": "device" } }, "_key": "200" }, { - "description": "Validation error: The data used to update the certificate issuer failed validation.\n", + "description": "Bad request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20220,24 +41294,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" } ] }, @@ -20245,22 +41324,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" } ] @@ -20273,7 +41358,6 @@ "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20283,87 +41367,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" - }, - { - "type": "string", - "description": "Error message related to the field.", + "description": "Message describing the error condition.", "_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": [ - { - "type": "string", - "description": "Field name.", - "_key": "field" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -20371,27 +41397,33 @@ }, { "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.", @@ -20399,70 +41431,6 @@ "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": "Conflict. A certificate issuer with this name already exists.\n", - "schema": { - "type": "object", - "required": [ - "code", - "fields", "message", "object", "request_id", @@ -20472,87 +41440,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" - }, - { - "type": "string", - "description": "Error message related to the field.", + "description": "Message describing the error condition.", "_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": "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" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -20560,169 +41470,622 @@ }, { "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/{certificate-issuer-id}", - "summary": "Update certificate issuer.", - "return_type": "certificate_issuer", + "path": "/v3/device-groups/{device-group-id}/devices/", + "summary": "Get a page of devices.", + "return_type": "paginated_response(device)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "certificate_issuer" + "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", - "groups", "filter", - "created_at", - "issuer_type" + "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" ], - "group_id": "Security", + "group_id": "Devices", "parameter_map": { - "certificate-issuer-id": "id" + "device-group-id": "id" + }, + "operation_id": "Group_members_retrieve", + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device" }, - "operation_id": "updateCertificateIssuer", - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "update" + "_key": "devices" }, { - "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": "List all groups.", "field_renames": [], "fields": [ { - "name": "certificate-issuer-id", - "in": "path", - "description": "Certificate issuer ID.
The ID of the certificate issuer.\n", - "required": true, "type": "string", - "entity_fieldname": "id", - "api_fieldname": "certificate-issuer-id", - "external_param": false, - "parameter_fieldname": "certificate-issuer-id", - "_key": "id" + "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" + }, + { + "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": "post", - "mode": "verify", + "method": "get", + "mode": "list", "responses": [ { - "description": "OK.", + "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": "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" + "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": [ { "type": "string", - "description": "Field name.", - "_key": "field" + "format": "date-time", + "description": "The time the group was created.", + "example": "2017-05-22T12:37:55.576563Z", + "_key": "created_at" + }, + { + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "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" + }, + "_key": "custom_attributes" }, { "type": "string", - "description": "Error message related to the field.", - "_key": "message" + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", + "_key": "description" + }, + { + "type": "integer", + "description": "The number of devices in this group.", + "example": 10, + "_key": "devices_count" + }, + { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "_key": "etag" + }, + { + "type": "string", + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", + "_key": "id" + }, + { + "type": "string", + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `device-group`.", + "example": "device-group", + "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "description": "The time this object was updated.", + "example": "2017-05-22T12:37:55.576563Z", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Devices", + "entity": "device_group" + } }, - "_key": "fields" + "type": "array", + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "Error message.", - "_key": "message" + "type": "boolean", + "description": "More results are 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 (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", + "_key": "limit" }, { "type": "string", - "description": "Entity name: `error`.", + "description": "The type of this API object is 'list'.", + "example": "list", + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "description": "Record order based on creation time.", + "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_group" + } }, - "_key": "400" + "_key": "200" }, { "description": "Unauthorized.", @@ -20730,7 +42093,6 @@ "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20740,24 +42102,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" } ] }, @@ -20765,22 +42132,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" } ] @@ -20788,12 +42161,11 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Not Found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20803,24 +42175,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" } ] }, @@ -20828,98 +42205,246 @@ }, { "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": "404" + } + ], + "path": "/v3/device-groups/", + "summary": "List all groups.", + "return_type": "paginated_response(device_group)", + "return_info": { + "self": true, + "custom": false, + "type": "device_group" + }, + "x_filter": { + "id": [ + "eq", + "neq", + "in", + "nin" + ], + "devices_count": [ + "eq", + "neq", + "in", + "nin", + "lte", + "gte" + ], + "name": [ + "eq", + "neq", + "in", + "nin" + ], + "created_at": [ + "in", + "nin", + "lte", + "gte" + ], + "updated_at": [ + "in", + "nin", + "lte", + "gte" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "data", + "has_more", + "total_count", + "id__eq", + "id__neq", + "id__in", + "id__nin", + "devices_count__eq", + "devices_count__neq", + "devices_count__in", + "devices_count__nin", + "devices_count__lte", + "devices_count__gte", + "name__eq", + "name__neq", + "name__in", + "name__nin", + "created_at__in", + "created_at__nin", + "created_at__lte", + "created_at__gte", + "updated_at__in", + "updated_at__nin", + "updated_at__lte", + "updated_at__gte" + ], + "foreign_key_priority": "self", + "group_id": "Devices", + "parameter_map": { + "device-group-id": "id" + }, + "operation_id": "Group_list", + "pagination": true, + "foreign_key": { + "group": "Devices", + "entity": "device_group" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "description": "Returns [DeviceGroup](https://www.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": [ { - "description": "Not found.", + "type": "string", + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "device-group-id", + "in": "path", + "required": true, + "_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", + "format": "date-time", + "description": "The time the group was created.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "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" - } - ] + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" }, - "_key": "fields" + "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" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "_key": "custom_attributes" }, { "type": "string", - "description": "Error message.", - "_key": "message" + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "integer", + "description": "The number of devices in this group.", + "example": 10, + "api_fieldname": "devices_count", + "entity_fieldname": "devices_count", + "_key": "devices_count" }, { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "Error type.", - "_key": "type" + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `device-group`.", + "example": "device-group", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "description": "The time this object was updated.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Devices", + "entity": "device_group" + } }, - "_key": "404" + "_key": "200" }, { - "description": "The request failed due to customer configured external service.\n", + "description": "Bad request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -20929,24 +42454,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" } ] }, @@ -20954,266 +42484,113 @@ }, { "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" - } - ], - "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", - "groups", - "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" + "_key": "400" }, { - "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.", + "description": "Unauthorized.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "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": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "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": "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", + "description": "Entity name, always `error`.", "enum": [ - "certificate-issuer-configuration" + "error" ], - "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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_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 used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" - } + ] }, - "_key": "201" + "_key": "401" }, { - "description": "Validation error.", + "description": "Not Found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21223,24 +42600,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" } ] }, @@ -21248,35 +42630,110 @@ }, { "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": "404" + } + ], + "path": "/v3/device-groups/{device-group-id}/", + "summary": "Get a group.", + "return_type": "device_group", + "return_info": { + "self": true, + "custom": false, + "type": "device_group" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "name", + "description", + "custom_attributes", + "devices_count", + "created_at", + "updated_at" + ], + "group_id": "Devices", + "parameter_map": { + "device-group-id": "id" + }, + "operation_id": "Group_retrieve", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "description": "Remove one device from a group.", + "field_renames": [], + "fields": [ + { + "type": "string", + "example": "00000000000000000000000000000000", + "name": "device_id", + "in": "body", + "schema_param": true, + "entity_fieldname": "device_id", + "api_fieldname": "device_id", + "external_param": true, + "parameter_fieldname": "device_id", + "required": false, + "_key": "device_id" }, { - "description": "Unauthorized.", + "in": "path", + "description": "The ID of the group.", + "name": "device-group-id", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "device-group-id", + "external_param": false, + "parameter_fieldname": "device-group-id", + "_key": "id" + } + ], + "method": "post", + "mode": "remove_device", + "responses": [ + { + "description": "Success - device removed.", + "_key": "204" + }, + { + "description": "Bad request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21286,24 +42743,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" } ] }, @@ -21311,35 +42773,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": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21349,24 +42816,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" } ] }, @@ -21374,35 +42846,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": "A certificate issuer configuration with this reference already exists.\n", + "description": "Not found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21412,24 +42889,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" } ] }, @@ -21437,36 +42919,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": "409" + "_key": "404" } ], - "path": "/v3/certificate-issuer-configurations", - "summary": "Create certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "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": "certificate_issuer_config" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -21474,117 +42962,192 @@ "object", "etag", "type", - "groups", - "filter", - "is_custom", - "id", - "created_at", - "updated_at" + "filter" ], - "group_id": "Security", + "group_id": "Devices", "parameter_map": { - "certificate-issuer-configuration-id": "id" + "device-group-id": "id" + }, + "operation_id": "Group_members_remove", + "spec": { + "return_type": "void" }, - "operation_id": "createCertificateIssuerConfig", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "remove_device" }, { - "description": "Delete the configured certificate issuer configuration.\nYou can only delete the configurations of custom certificates.\n", + "description": "Modify the attributes of a group, such as the description.", "field_renames": [], "fields": [ { - "name": "certificate-issuer-configuration-id", - "in": "path", - "description": "The ID of the certificate issuer configuration.\n", - "required": true, + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "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" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "name": "custom_attributes", + "in": "body", + "schema_param": true, + "parameter_fieldname": "custom_attributes", + "required": false, + "_key": "custom_attributes" + }, + { + "type": "string", + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", + "api_fieldname": "description", + "entity_fieldname": "description", + "name": "description", + "in": "body", + "schema_param": true, + "parameter_fieldname": "description", + "required": false, + "_key": "description" + }, + { "type": "string", + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", "entity_fieldname": "id", - "api_fieldname": "certificate-issuer-configuration-id", - "external_param": false, - "parameter_fieldname": "certificate-issuer-configuration-id", + "parameter_fieldname": "device-group-id", + "in": "path", + "required": true, "_key": "id" + }, + { + "type": "string", + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "api_fieldname": "name", + "entity_fieldname": "name", + "name": "name", + "in": "body", + "schema_param": true, + "parameter_fieldname": "name", + "required": false, + "_key": "name" } ], - "method": "delete", - "mode": "delete", + "method": "put", + "mode": "update", "responses": [ { - "description": "No content.", - "_key": "204" - }, - { - "description": "Validation error.", + "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", + "format": "date-time", + "description": "The time the group was created.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "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" - } - ] + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" }, - "_key": "fields" + "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" + }, + "api_fieldname": "custom_attributes", + "entity_fieldname": "custom_attributes", + "_key": "custom_attributes" }, { "type": "string", - "description": "Error message.", - "_key": "message" + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "integer", + "description": "The number of devices in this group.", + "example": 10, + "api_fieldname": "devices_count", + "entity_fieldname": "devices_count", + "_key": "devices_count" }, { + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "Error type.", - "_key": "type" + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `device-group`.", + "example": "device-group", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { + "type": "string", + "format": "date-time", + "description": "The time this object was updated.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Devices", + "entity": "device_group" + } }, - "_key": "400" + "_key": "200" }, { - "description": "Unauthorized.", + "description": "Bad request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21594,24 +43157,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" } ] }, @@ -21619,35 +43187,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": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Unauthorized.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21657,24 +43230,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" } ] }, @@ -21682,35 +43260,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", @@ -21720,24 +43303,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" } ] }, @@ -21745,22 +43333,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" } ] @@ -21768,13 +43362,13 @@ "_key": "404" } ], - "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", - "summary": "Delete certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "path": "/v3/device-groups/{device-group-id}/", + "summary": "Modify the attributes of a group.", + "return_type": "device_group", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" + "type": "device_group" }, "x_filter": {}, "x_deprecation": null, @@ -21782,114 +43376,260 @@ "object", "etag", "type", - "groups", "filter", - "is_custom" + "devices_count", + "created_at", + "updated_at" ], - "group_id": "Security", + "group_id": "Devices", "parameter_map": { - "certificate-issuer-configuration-id": "id" + "device-group-id": "id" }, - "operation_id": "deleteCertificateIssuerConfigByID", + "operation_id": "Group_update", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "update" + } + ], + "fields": [ + { + "type": "string", + "format": "date-time", + "description": "The time the group was created.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" }, { - "description": "Provides the configured certificate issuer to be used when creating device\ncertificates for LwM2M communication.
\n", - "field_renames": [], - "fields": [], - "method": "get", - "mode": "get_default", + "type": "object", + "maxProperties": 10, + "additionalProperties": { + "type": "string", + "maxLength": 128, + "pattern": "^[A-Za-z].*" + }, + "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" + }, + "api_fieldname": "custom_attributes", + "readOnly": false, + "required": false, + "_key": "custom_attributes" + }, + { + "type": "string", + "maxLength": 1024, + "description": "The description of the group.", + "example": "Devices on the factory floor.", + "api_fieldname": "description", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "type": "integer", + "description": "The number of devices in this group.", + "example": 10, + "api_fieldname": "devices_count", + "readOnly": true, + "required": false, + "_key": "devices_count" + }, + { + "type": "string", + "description": "The group ID.", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "type": "string", + "maxLength": 128, + "description": "Name of the group.", + "example": "My devices", + "api_fieldname": "name", + "readOnly": false, + "required": false, + "_key": "name" + }, + { + "type": "string", + "format": "date-time", + "description": "The time this object was updated.", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "updated_at", + "readOnly": true, + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "Device directory - groups" + ], + "group_id": "Devices", + "_key": "device_group" + }, + { + "swagger_models": [ + "FirmwareImage", + "FirmwareImagePage" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Create a firmware image.\n
**Note:** Only use this API for images smaller than 100 MB. For larger images, [upload in chunks](https://www.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", + "_key": "datafile_url" + } + ], + "fields": [ + { + "description": "The description of the object.", + "type": "string", + "format": "free text", + "maxLength": 2000, + "example": "a description", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "stream", + "required": false, + "_key": "description" + }, + { + "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, + "parameter_fieldname": "datafile", + "_key": "firmware_image_file" + }, + { + "description": "The firmware image name.", + "type": "string", + "format": "free text", + "maxLength": 128, + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "stream", + "required": false, + "_key": "name" + } + ], + "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" - }, - { + "description": "Firmware image created. The API gateway enforces the account-specific file size.", + "schema": [ + { + "group": "Device_Update", + "entity": "firmware_image", + "_key": "foreign_key" + }, + { + "created_at": { "type": "string", "format": "date-time", - "description": "Created 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" + "entity_fieldname": "created_at" }, - { + "etag": { "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" + "entity_fieldname": "etag" }, - { + "updated_at": { "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" + "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" }, - { + "object": { + "description": "Entity name: always 'firmware-image'.", "type": "string", - "enum": [ - "certificate-issuer-configuration" - ], + "example": "firmware-image", "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "entity_fieldname": "object" }, - { + "datafile": { + "description": "The firmware image file URL.", "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "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", - "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" + "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": "200" + ], + "_key": "201" }, { - "description": "Validation error.", + "description": "Cannot validate the data used to create the firmware image.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21899,24 +43639,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" } ] }, @@ -21924,22 +43669,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" } ] @@ -21947,12 +43698,11 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -21962,24 +43712,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" } ] }, @@ -21987,22 +43742,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" } ] @@ -22015,7 +43776,6 @@ "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22025,24 +43785,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" } ] }, @@ -22050,261 +43815,179 @@ }, { "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.", - "_key": "request_id" - }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_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", - "groups", - "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": "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", - "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.", + "description": "Firmware image too large.", "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" }, { "type": "array", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "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" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", - "_key": "updated_at" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "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" + "_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 creation time based order of the entries.", - "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": "Security", - "entity": "certificate_issuer_config" - } + ] }, - "_key": "200" + "_key": "413" + } + ], + "path": "/v3/firmware-images", + "summary": "Create an image", + "return_type": "firmware_image", + "return_info": { + "self": true, + "custom": false, + "type": "firmware_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "updated_at", + "datafile_checksum", + "datafile_size", + "id", + "datafile_url" + ], + "group_id": "Device_Update", + "parameter_map": { + "image_id": "id", + "datafile": "firmware_image_file" + }, + "operation_id": "Firmware_Image_create", + "notes": "This is not a standard create method as it uploads a file which creates an entity which contains URIs to the uploaded file.", + "unaggregated": true, + "pagination": false, + "request_content_type": "multipart/form-data", + "request_body": "file", + "_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/11234567f9012ab56790120000789012 \\\n-H 'Authorization: Bearer '\n```\n", + "field_renames": [ + { + "api_fieldname": "datafile", + "_key": "datafile_url" + } + ], + "fields": [ + { + "description": "The firmware image ID.", + "in": "path", + "name": "image_id", + "required": true, + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "entity_fieldname": "id", + "api_fieldname": "image_id", + "external_param": false, + "parameter_fieldname": "image_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Firmware image deleted.", + "_key": "204" }, { - "description": "Validation error.", + "description": "Bad Request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22314,24 +43997,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" } ] }, @@ -22339,22 +44027,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" } ] @@ -22362,12 +44056,11 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22377,24 +44070,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" } ] }, @@ -22402,22 +44100,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" } ] @@ -22425,12 +44129,11 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Firmware image not found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22440,24 +44143,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" } ] }, @@ -22465,176 +44173,276 @@ }, { "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": "404" } ], - "path": "/v3/certificate-issuer-configurations", - "summary": "Get certificate issuer configurations.", - "return_type": "paginated_response(certificate_issuer_config)", + "path": "/v3/firmware-images/{image_id}", + "summary": "Delete an image", + "return_type": "firmware_image", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" - }, - "x_filter": { - "reference": [ - "eq" - ] + "type": "firmware_image" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", - "filter", - "is_custom", - "has_more", - "total_count", - "data", - "reference__eq" + "filter" ], - "foreign_key_priority": "self", - "group_id": "Security", + "group_id": "Device_Update", "parameter_map": { - "certificate-issuer-configuration-id": "id" - }, - "operation_id": "getCertificateIssuerConfigs", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" + "image_id": "id" }, + "operation_id": "Firmware_Image_destroy", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "delete" }, { - "description": "Provides the configured certificate issuer.\n", - "field_renames": [], + "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", + "_key": "datafile_url" + } + ], "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", - "in": "path", - "required": true, - "_key": "id" + "example": null, + "api_fieldname": "after", + "entity_fieldname": "after", + "description": "The ID of the item after which to retrieve the next page.", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", + "required": false, + "_key": "after" + }, + { + "description": "A 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" + }, + { + "format": "int32", + "type": "integer", + "api_fieldname": "limit", + "entity_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.", + "in": "query", + "name": "limit", + "minimum": 2, + "maximum": 1000, + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" + }, + { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "ASC or DESC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "enum_reference": "firmware_image_order_enum", + "_key": "order" } ], "method": "get", - "mode": "read", + "mode": "list", "responses": [ { - "description": "OK.", + "description": "Request successful.", "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" + "example": null, + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, { - "type": "string", - "description": "Entity instance signature.", - "example": "1", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "type": "array", + "items": [ + { + "group": "Device_Update", + "entity": "firmware_image", + "_key": "foreign_key" + }, + { + "created_at": { + "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" + }, + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "object": { + "description": "Entity name: always 'firmware-image'.", + "type": "string", + "example": "firmware-image" + }, + "datafile": { + "description": "The firmware image file URL.", + "type": "string", + "example": "http://bucket.com/myimage.elf" + }, + "datafile_checksum": { + "description": "The checksum (sha256) generated for the datafile.", + "type": "string", + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e" + }, + "datafile_size": { + "description": "The size of the datafile in bytes.", + "format": "int64", + "type": "integer" + }, + "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", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5" + }, + "name": { + "description": "The firmware image name.", + "type": "string", + "format": "free text", + "maxLength": 128 + }, + "_key": "properties" + } + ], + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "type": "boolean", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { - "type": "boolean", - "example": true, - "api_fieldname": "is_custom", - "entity_fieldname": "is_custom", - "_key": "is_custom" + "format": "int32", + "type": "integer", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" }, { + "description": "Entity name: always 'list'.", "type": "string", - "enum": [ - "certificate-issuer-configuration" - ], + "example": "list", "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" + "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" }, { - "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" + "format": "int32", + "type": "integer", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" } ], + "pagination": true, "foreign_key": { - "group": "Security", - "entity": "certificate_issuer_config" + "group": "Device_Update", + "entity": "firmware_image" } }, "_key": "200" }, { - "description": "Validation error.", + "description": "Bad Request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22644,24 +44452,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" } ] }, @@ -22669,22 +44482,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" } ] @@ -22692,12 +44511,11 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22707,24 +44525,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" } ] }, @@ -22732,22 +44555,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" } ] @@ -22755,12 +44584,11 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Unable to find content.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -22770,87 +44598,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" - }, - { - "type": "string", - "description": "Error message related to the field.", + "description": "Message describing the error condition.", "_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" + "description": "Name of the field which caused the error.", + "_key": "name" } ] }, @@ -22858,22 +44628,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" } ] @@ -22881,219 +44657,242 @@ "_key": "404" } ], - "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", - "summary": "Get certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "path": "/v3/firmware-images", + "summary": "List all images", + "return_type": "paginated_response(firmware_image)", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" + "type": "firmware_image" + }, + "x_filter": { + "created_at": [ + "in", + "nin", + "lte", + "gte" + ], + "datafile_url": [ + "eq", + "neq", + "in", + "nin" + ], + "datafile_checksum": [ + "eq", + "neq", + "in", + "nin" + ], + "datafile_size": [ + "eq", + "neq", + "in", + "nin" + ], + "description": [ + "eq", + "neq", + "in", + "nin" + ], + "id": [ + "eq", + "neq", + "in", + "nin" + ], + "name": [ + "eq", + "neq", + "in", + "nin" + ], + "updated_at": [ + "in", + "nin", + "lte", + "gte" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "is_custom", - "certificate_issuer_id", - "reference", - "created_at", - "updated_at" + "data", + "has_more", + "total_count", + "created_at__in", + "created_at__nin", + "created_at__lte", + "created_at__gte", + "datafile__eq", + "datafile__neq", + "datafile__in", + "datafile__nin", + "datafile_checksum__eq", + "datafile_checksum__neq", + "datafile_checksum__in", + "datafile_checksum__nin", + "datafile_size__eq", + "datafile_size__neq", + "datafile_size__in", + "datafile_size__nin", + "description__eq", + "description__neq", + "description__in", + "description__nin", + "id__eq", + "id__neq", + "id__in", + "id__nin", + "name__eq", + "name__neq", + "name__in", + "name__nin", + "updated_at__in", + "updated_at__nin", + "updated_at__lte", + "updated_at__gte" ], - "group_id": "Security", + "foreign_key_priority": "self", + "group_id": "Device_Update", "parameter_map": { - "certificate-issuer-configuration-id": "id" + "image_id": "id" + }, + "operation_id": "Firmware_Image_list", + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "firmware_image" }, - "operation_id": "getCertificateIssuerConfigByID", - "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "list" }, { - "description": "Update the configured certificate issuer configuration.\n", - "field_renames": [], - "fields": [ + "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": [ { - "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" - }, + "api_fieldname": "datafile", + "_key": "datafile_url" + } + ], + "fields": [ { + "description": "The firmware image ID.", "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "certificate-issuer-configuration-id", + "parameter_fieldname": "image_id", "in": "path", "required": true, "_key": "id" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "read", "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" - }, - { + "description": "Retrieved result successfully.", + "schema": [ + { + "group": "Device_Update", + "entity": "firmware_image", + "_key": "foreign_key" + }, + { + "created_at": { "type": "string", "format": "date-time", - "description": "Created 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" + "entity_fieldname": "created_at" }, - { + "etag": { "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" + "entity_fieldname": "etag" }, - { + "updated_at": { "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" + "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" }, - { + "object": { + "description": "Entity name: always 'firmware-image'.", "type": "string", - "enum": [ - "certificate-issuer-configuration" - ], + "example": "firmware-image", "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "entity_fieldname": "object" }, - { + "datafile": { + "description": "The firmware image file URL.", "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "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", - "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", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "Error code. Correlates with response status code.", - "_key": "code" + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e", + "api_fieldname": "datafile_checksum", + "entity_fieldname": "datafile_checksum" }, - { - "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" + "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", - "description": "Error message.", - "_key": "message" + "format": "free text", + "maxLength": 2000, + "example": "a description", + "api_fieldname": "description", + "entity_fieldname": "description" }, - { + "id": { + "description": "The firmware image ID.", "type": "string", - "description": "Entity name: `error`.", - "_key": "object" + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", + "api_fieldname": "id", + "entity_fieldname": "id" }, - { + "name": { + "description": "The firmware image name.", "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "format": "free text", + "maxLength": 128, + "api_fieldname": "name", + "entity_fieldname": "name" }, - { - "type": "string", - "description": "Error type.", - "_key": "type" - } - ] - }, - "_key": "400" + "_key": "properties" + } + ], + "_key": "200" }, { - "description": "Unauthorized.", + "description": "Bad Request.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -23103,24 +44902,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" } ] }, @@ -23128,35 +44932,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": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -23166,24 +44975,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" } ] }, @@ -23191,35 +45005,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": "Firmware image can't be found.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -23229,24 +45048,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" } ] }, @@ -23254,22 +45078,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" } ] @@ -23277,13 +45107,13 @@ "_key": "404" } ], - "path": "/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", - "summary": "Update certificate issuer configuration.", - "return_type": "certificate_issuer_config", + "path": "/v3/firmware-images/{image_id}", + "summary": "Get an image.", + "return_type": "firmware_image", "return_info": { "self": true, "custom": false, - "type": "certificate_issuer_config" + "type": "firmware_image" }, "x_filter": {}, "x_deprecation": null, @@ -23291,205 +45121,675 @@ "object", "etag", "type", - "groups", "filter", - "is_custom", - "reference", "created_at", - "updated_at" + "updated_at", + "datafile_checksum", + "datafile_size", + "description", + "name", + "datafile_url" ], - "group_id": "Security", + "group_id": "Device_Update", "parameter_map": { - "certificate-issuer-configuration-id": "id" + "image_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": "Firmware_Image_retrieve", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "update" + "_key": "read" } ], "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", + "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 checksum (sha256) generated for the datafile.", "type": "string", - "description": "The ID of the certificate issuer configuration.\n", - "example": "01648415a2a30242ac18000500000000", + "example": "e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e", + "api_fieldname": "datafile_checksum", + "readOnly": true, + "required": false, + "_key": "datafile_checksum" + }, + { + "description": "The size of the datafile in bytes.", + "format": "int64", + "type": "integer", + "api_fieldname": "datafile_size", + "readOnly": true, + "required": false, + "_key": "datafile_size" + }, + { + "description": "The firmware image file URL.", + "type": "string", + "example": "http://bucket.com/myimage.elf", + "api_fieldname": "datafile", + "readOnly": true, + "required": false, + "_key": "datafile_url" + }, + { + "description": "The description of the object.", + "type": "string", + "format": "free text", + "maxLength": 2000, + "example": "a description", + "api_fieldname": "description", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "description": "The firmware image ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e652be671000000000001001001e5", "api_fieldname": "id", "readOnly": false, "required": true, "_key": "id" }, { + "description": "The firmware image name.", "type": "string", - "description": "The certificate name to which the certificate issuer configuration applies.", - "example": "customer.dlms", - "api_fieldname": "reference", + "format": "free text", + "maxLength": 128, + "api_fieldname": "name", "readOnly": false, - "required": true, - "_key": "reference" + "required": false, + "_key": "name" }, { "type": "string", "format": "date-time", - "description": "Updated UTC time RFC3339.", - "example": "2017-02-01T00:00:00Z", + "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": [], + "field_renames": [ + { + "api_fieldname": "datafile", + "_key": "datafile_url" + } + ], "tags": [ - "Certificate Issuers Activation" + "Device update - firmware images" ], - "group_id": "Security", - "_key": "certificate_issuer_config" + "group_id": "Device_Update", + "_key": "firmware_image" }, { "swagger_models": [ - "BrandingColor", - "BrandingColorList" + "FirmwareManifest", + "FirmwareManifestPage" ], - "primary_key_field": "reference", + "primary_key_field": "id", "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```", - "field_renames": [], + "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", + "_key": "datafile_url" + }, + { + "api_fieldname": "key_table", + "_key": "key_table_url" + } + ], "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" - ], + "description": "The description of the firmware manifest.", "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", + "format": "free text", + "maxLength": 2000, + "example": "", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "stream", + "required": false, + "_key": "description" + }, + { + "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, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "type": "file", + "entity_fieldname": "firmware_manifest_file", + "api_fieldname": "datafile", + "external_param": true, + "parameter_fieldname": "datafile", + "_key": "firmware_manifest_file" + }, + { + "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, + "type": "file", + "entity_fieldname": "key_table_file", + "api_fieldname": "key_table", + "external_param": true, + "parameter_fieldname": "key_table", + "_key": "key_table_file" + }, + { + "description": "The name of the manifest.", + "type": "string", + "format": "free text", + "maxLength": 128, + "example": "manifest_name", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "stream", + "required": true, + "_key": "name" } ], - "method": "delete", - "mode": "delete", + "method": "post", + "mode": "create", "responses": [ { - "description": "Successful operation.", + "description": "Created.", + "schema": [ + { + "group": "Device_Update", + "entity": "firmware_manifest", + "_key": "foreign_key" + }, + { + "created_at": { + "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" + }, + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "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 ASN.1 DER-encoded firmware manifest binary.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest", + "api_fieldname": "datafile", + "entity_fieldname": "datafile_url" + }, + "datafile_size": { + "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 device class ID.", + "type": "string", + "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/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", - "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": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, + "description": "Entity name, always `error`.", "enum": [ - "branding_color" + "error" ], - "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": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" - } + ] }, - "_key": "200" + "_key": "403" + } + ], + "path": "/v3/firmware-manifests/", + "summary": "Upload a manifest", + "return_type": "firmware_manifest", + "return_info": { + "self": true, + "custom": false, + "type": "firmware_manifest" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "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" + ], + "group_id": "Device_Update", + "parameter_map": { + "manifest_id": "id", + "datafile": "firmware_manifest_file", + "key_table": "key_table_file" + }, + "operation_id": "Firmware_Manifest_create", + "notes": "This is not a standard create method as it uploads a file (or files) which creates an entity which contains URIs to the uploaded file(s).", + "unaggregated": true, + "pagination": false, + "request_content_type": "multipart/form-data", + "request_body": "file", + "_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/11234567f9012ab56780120000789012 \\\n-H 'Authorization: Bearer '\n```\n", + "field_renames": [ + { + "api_fieldname": "datafile", + "_key": "datafile_url" }, { - "description": "Authentication failure.", + "api_fieldname": "key_table", + "_key": "key_table_url" + } + ], + "fields": [ + { + "description": "The firmware manifest ID.", + "in": "path", + "name": "manifest_id", + "required": true, + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "entity_fieldname": "id", + "api_fieldname": "manifest_id", + "external_param": false, + "parameter_fieldname": "manifest_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Firmware manifest deleted.", + "_key": "204" + }, + { + "description": "Bad Request.", "schema": { "type": "object", "required": [ @@ -23559,10 +45859,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ @@ -23632,10 +45932,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Color not found.", + "description": "Firmware manifest not found.", "schema": { "type": "object", "required": [ @@ -23708,13 +46008,13 @@ "_key": "404" } ], - "path": "/v3/branding-colors/dark/{reference}", - "summary": "Reset branding color to default.", - "return_type": "void", + "path": "/v3/firmware-manifests/{manifest_id}", + "summary": "Delete a manifest", + "return_type": "firmware_manifest", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "firmware_manifest" }, "x_filter": {}, "x_deprecation": null, @@ -23722,181 +46022,374 @@ "object", "etag", "type", - "groups", - "filter", - "color", - "updated_at" + "filter" ], - "group_id": "Branding", - "operation_id": "resetDarkColor", - "spec": { - "return_type": "void" + "group_id": "Device_Update", + "parameter_map": { + "manifest_id": "id" }, + "operation_id": "Firmware_Manifest_destroy", "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```", - "field_renames": [], + "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", + "_key": "datafile_url" + }, + { + "api_fieldname": "key_table", + "_key": "key_table_url" + } + ], "fields": [ { - "is_primary_key": true, - "_override": true, "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "example": null, + "api_fieldname": "after", + "entity_fieldname": "after", + "description": "The ID of the item after which to retrieve the next page.", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", + "required": false, + "_key": "after" + }, + { + "description": "A 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" + }, + { + "format": "int32", + "type": "integer", + "api_fieldname": "limit", + "entity_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.", + "in": "query", + "name": "limit", + "minimum": 2, + "maximum": 1000, + "external_param": true, + "parameter_fieldname": "limit", + "required": false, + "_key": "limit" + }, + { + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "description": "ASC or DESC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "enum_reference": "firmware_manifest_order_enum", + "_key": "order" } ], "method": "get", "mode": "list", "responses": [ { - "description": "Successful operation.", + "description": "Request successful.", "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}", + "example": null, "api_fieldname": "after", "entity_fieldname": "after", "_key": "after" }, { "type": "array", - "description": "A list of entities.", - "items": { - "type": "object", - "properties": [ - { + "items": [ + { + "group": "Device_Update", + "entity": "firmware_manifest", + "_key": "foreign_key" + }, + { + "created_at": { "type": "string", - "example": "#f3f93e", - "description": "The color given as name (purple) or as a hex code.", - "x-nullable": true, - "_key": "color" + "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" }, - { + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "object": { + "description": "Entity name: always 'firmware-manifest'.", + "type": "string", + "example": "firmware-manifest" + }, + "manifest_schema_version": { + "description": "Version of the manifest schema (1 or 3).", "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, "enum": [ - "branding_color" - ], - "_key": "object" + "1", + "3" + ] }, - { + "datafile": { + "description": "The URL of the ASN.1 DER-encoded firmware manifest binary.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest" + }, + "datafile_size": { + "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": [ - "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" - ], + "full", + "delta" + ] + }, + "precursor_payload_digest": { + "description": "Digest (SHA256, hex-encoded) of the currently installed payload.", "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "_key": "reference" + "example": "54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f" }, - { + "description": { + "description": "The description of the firmware manifest.", + "type": "string", + "format": "free text", + "maxLength": 2000, + "example": "" + }, + "device_class": { + "description": "The device class ID.", + "type": "string", + "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/key-table" + }, + "id": { + "description": "The firmware manifest ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "12345678901234567890123456789012" + }, + "name": { + "description": "The name of the manifest.", "type": "string", + "format": "free text", + "maxLength": 128, + "example": "manifest_name" + }, + "timestamp": { + "description": "The firmware manifest version as a timestamp.", "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" + "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" } - }, + ], "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`.", + "type": "integer", "api_fieldname": "limit", "entity_fieldname": "limit", "_key": "limit" }, + { + "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 to return. Acceptable values: ASC, DESC. 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_manifest" + } + }, + "_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": "Entity name: always `list`.", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "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_color" - } + ] }, - "_key": "200" + "_key": "400" }, { - "description": "Authentication failure.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ @@ -23969,7 +46462,7 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Unable to find content.", "schema": { "type": "object", "required": [ @@ -24039,155 +46532,345 @@ } ] }, - "_key": "403" + "_key": "404" } ], - "path": "/v3/branding-colors/dark", - "summary": "Get dark theme branding colors.", - "return_type": "paginated_response(dark_theme_color)", + "path": "/v3/firmware-manifests/", + "summary": "List all firmware manifests.", + "return_type": "paginated_response(firmware_manifest)", "return_info": { "self": true, "custom": false, - "type": "dark_theme_color" + "type": "firmware_manifest" + }, + "x_filter": { + "created_at": [ + "in", + "nin", + "lte", + "gte" + ], + "datafile_url": [ + "eq", + "neq", + "in", + "nin" + ], + "datafile_size": [ + "eq", + "neq", + "in", + "nin" + ], + "description": [ + "eq", + "neq", + "in", + "nin" + ], + "device_class": [ + "eq", + "neq", + "in", + "nin" + ], + "id": [ + "eq", + "neq", + "in", + "nin" + ], + "name": [ + "eq", + "neq", + "in", + "nin" + ], + "timestamp": [ + "in", + "nin", + "lte", + "gte" + ], + "updated_at": [ + "in", + "nin", + "lte", + "gte" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "limit", - "after", - "order", - "total_count", + "data", "has_more", - "data" + "total_count", + "created_at__in", + "created_at__nin", + "created_at__lte", + "created_at__gte", + "datafile__eq", + "datafile__neq", + "datafile__in", + "datafile__nin", + "datafile_size__eq", + "datafile_size__neq", + "datafile_size__in", + "datafile_size__nin", + "description__eq", + "description__neq", + "description__in", + "description__nin", + "device_class__eq", + "device_class__neq", + "device_class__in", + "device_class__nin", + "id__eq", + "id__neq", + "id__in", + "id__nin", + "name__eq", + "name__neq", + "name__in", + "name__nin", + "timestamp__in", + "timestamp__nin", + "timestamp__lte", + "timestamp__gte", + "updated_at__in", + "updated_at__nin", + "updated_at__lte", + "updated_at__gte" ], "foreign_key_priority": "self", - "group_id": "Branding", - "operation_id": "getDarkColors", + "group_id": "Device_Update", + "parameter_map": { + "manifest_id": "id" + }, + "operation_id": "Firmware_Manifest_list", "pagination": true, "foreign_key": { - "group": "Branding", - "entity": "dark_theme_color" + "group": "Device_Update", + "entity": "firmware_manifest" }, "request_content_type": "application/json", "request_body": "json", "_key": "list" }, { - "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": [], + "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", + "_key": "datafile_url" + }, + { + "api_fieldname": "key_table", + "_key": "key_table_url" + } + ], "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" - ], + "description": "The firmware manifest ID.", "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", + "pattern": "[A-Fa-f0-9]{32}", + "example": "12345678901234567890123456789012", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "manifest_id", "in": "path", "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "_key": "id" } ], "method": "get", "mode": "read", "responses": [ { - "description": "Successful operation.", - "schema": { - "type": "object", - "properties": [ - { + "description": "Retrieved result successfully.", + "schema": [ + { + "group": "Device_Update", + "entity": "firmware_manifest", + "_key": "foreign_key" + }, + { + "created_at": { "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" + "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" }, - { + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "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", - "description": "Entity name: always 'branding_color'", - "readOnly": true, "enum": [ - "branding_color" + "1", + "3" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "api_fieldname": "manifest_schema_version", + "entity_fieldname": "manifest_schema_version" }, - { + "datafile": { + "description": "The URL of the ASN.1 DER-encoded firmware manifest binary.", + "type": "string", + "format": "uri", + "example": "http://bucket.com/mymanifest.manifest", + "api_fieldname": "datafile", + "entity_fieldname": "datafile_url" + }, + "datafile_size": { + "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": [ - "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" + "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", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "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 device class ID.", + "type": "string", + "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/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": "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" + "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": "200" }, { - "description": "Authentication failure.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -24257,10 +46940,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ @@ -24330,10 +47013,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Color not found.", + "description": "Firmware manifest can't be found.", "schema": { "type": "object", "required": [ @@ -24406,13 +47089,13 @@ "_key": "404" } ], - "path": "/v3/branding-colors/dark/{reference}", - "summary": "Get dark theme branding color.", - "return_type": "dark_theme_color", + "path": "/v3/firmware-manifests/{manifest_id}", + "summary": "Get a manifest", + "return_type": "firmware_manifest", "return_info": { "self": true, "custom": false, - "type": "dark_theme_color" + "type": "firmware_manifest" }, "x_filter": {}, "x_deprecation": null, @@ -24420,227 +47103,994 @@ "object", "etag", "type", - "groups", "filter", - "color", - "updated_at" + "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" ], - "group_id": "Branding", - "operation_id": "getDarkColor", + "group_id": "Device_Update", + "parameter_map": { + "manifest_id": "id" + }, + "operation_id": "Firmware_Manifest_retrieve", "pagination": false, "request_content_type": "application/json", "request_body": "json", "_key": "read" + } + ], + "fields": [ + { + "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 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 ASN.1 DER-encoded firmware manifest binary.", + "type": "string", + "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", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "description": "The device class ID.", + "type": "string", + "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, + "required": true, + "_key": "id" + }, + { + "description": "The key table of pre-shared keys for devices.", + "type": "string", + "format": "uri", + "example": "http://example.com/key-table", + "api_fieldname": "key_table", + "readOnly": true, + "required": false, + "_key": "key_table_url" + }, + { + "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": "manifest_name", + "api_fieldname": "name", + "readOnly": 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", + "example": "2017-05-22T12:37:55.576563Z", + "type": "string", + "api_fieldname": "timestamp", + "readOnly": true, + "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" }, { - "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```", - "field_renames": [], + "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": "datafile", + "_key": "datafile_url" + }, + { + "api_fieldname": "key_table", + "_key": "key_table_url" + } + ], + "tags": [ + "Device update - firmware manifests" + ], + "group_id": "Device_Update", + "_key": "firmware_manifest" + }, + { + "swagger_models": [ + "CertificateGenerationReq", + "IdentityProviderCreationReq", + "IdentityProviderInfo", + "IdentityProviderList", + "IdentityProviderUpdateReq" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Create a new identity provider.\nNote: This endpoint is restricted to administrators.", + "field_renames": [ + { + "api_fieldname": "type", + "_key": "identity_provider_type" + } + ], "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", "in": "body", "required": false, - "_key": "color" + "_key": "description" + }, + { + "in": "query", + "name": "discovery", + "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", + "type": "boolean", + "allowEmptyValue": true, + "entity_fieldname": "discovery", + "api_fieldname": "discovery", + "external_param": true, + "parameter_fieldname": "discovery", + "required": false, + "_key": "discovery" }, { + "type": "string", + "description": "Identity provider type.", "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" + "NATIVE", + "MBED", + "SAML2", + "OIDC" ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "identity_provider_type" + }, + { "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "_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", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, + { + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" }, { "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", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", "in": "body", "required": false, - "_key": "updated_at" + "enum_reference": "identity_provider_status_enum", + "_key": "status" } ], - "method": "put", - "mode": "update", + "method": "post", + "mode": "create", "responses": [ { - "description": "Color has been set successfully.", + "description": "New entity created.", + "headers": [ + { + "type": "string", + "description": "/v3/identity-providers/{identity_provider_id}", + "_key": "Content-Location" + }, + { + "type": "string", + "description": "/v3/identity-providers/{identity_provider_id}", + "_key": "Location" + } + ], "schema": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "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" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "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" }, { - "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" + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" }, { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", "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": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "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": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "api_fieldname": "object", + "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" }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "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": "fields" + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "_key": "saml2_attributes" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Status of the identity provider.", "enum": [ - "error" + "ACTIVE", + "SUSPENDED" ], - "_key": "object" + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "_key": "type" }, { "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": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_identity_provider" + } }, - "_key": "400" + "_key": "201" }, { - "description": "Authentication failure.", + "description": "Error in input data, for example, name is too long.", "schema": { "type": "object", "required": [ @@ -24710,10 +48160,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -24783,10 +48233,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Color not found.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -24856,16 +48306,16 @@ } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/branding-colors/dark/{reference}", - "summary": "Updates a dark theme branding color.", - "return_type": "dark_theme_color", + "path": "/v3/identity-providers", + "summary": "Create a new identity provider.", + "return_type": "identity_provider", "return_info": { "self": true, "custom": false, - "type": "dark_theme_color" + "type": "identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -24873,144 +48323,50 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "id", + "created_at", + "updated_at", + "account_id", + "is_default" ], - "group_id": "Branding", - "operation_id": "setDarkColor", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "createIdentityProvider", "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" + "_key": "create" }, { - "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" + "description": "Delete an identity provider by ID.\nNote: This endpoint is restricted to administrators.", + "field_renames": [ + { + "api_fieldname": "type", + "_key": "identity_provider_type" + } ], - "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", + "name": "identity_provider_id", "in": "path", - "description": "Name of the branding images (icon or picture).", + "description": "The ID of the identity provider to delete.", "required": true, - "enum_reference": "dark_theme_image_reference_enum", - "_key": "reference" + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "identity_provider_id", + "external_param": false, + "parameter_fieldname": "identity_provider_id", + "_key": "id" } ], - "method": "post", + "method": "delete", "mode": "delete", "responses": [ { - "description": "Image reverted successfully.", + "description": "Deleted successfully.", "_key": "204" }, { @@ -25054,391 +48410,40 @@ } ] }, - "_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": "Unknown image reference.", - "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/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": "dark_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Branding", - "operation_id": "clearDarkImage", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "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": [ - { - "is_primary_key": true, - "_override": true, - "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" - } - ], - "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", - "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" + "_key": "fields" }, { "type": "string", - "description": "Entity name: always `list`.", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "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, or identity provider is in use.", "schema": { "type": "object", "required": [ @@ -25508,10 +48513,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -25581,16 +48586,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/identity-providers/{identity_provider_id}", + "summary": "Delete an identity provider by ID.", + "return_type": "identity_provider", "return_info": { "self": true, "custom": false, - "type": "dark_theme_image" + "type": "identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -25598,175 +48603,427 @@ "object", "etag", "type", - "groups", - "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" + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" }, + "operation_id": "deleteIdentityProvider", + "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```", - "field_renames": [], + "description": "Delete a service provider certificate.\nNote: This endpoint is restricted to administrators.", + "field_renames": [ + { + "api_fieldname": "type", + "_key": "identity_provider_type" + } + ], "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", - "entity_fieldname": "reference", - "name": "reference", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", "in": "path", "required": true, - "enum_reference": "dark_theme_image_reference_enum", - "_key": "reference" + "_key": "id" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "delete_service_provider_certificate", "responses": [ { "description": "Successful operation.", + "headers": [ + { + "type": "string", + "description": "/v3/identity-providers/{identity_provider_id}", + "_key": "Content-Location" + } + ], "schema": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", "enum": [ - "branding_image" + "identity-provider" ], "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": "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "_key": "saml2_attributes" + }, + { "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "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" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "_key": "type" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Last update UTC time RFC3339.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", "_key": "updated_at" } ], "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_image" + "group": "Accounts", + "entity": "subtenant_identity_provider" } }, "_key": "200" @@ -25918,7 +49175,7 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -25991,13 +49248,13 @@ "_key": "404" } ], - "path": "/v3/branding-images/dark/{reference}", - "summary": "Get metadata of a dark theme image.", - "return_type": "dark_theme_image", + "path": "/v3/identity-providers/{identity_provider_id}/delete-sp-certificate", + "summary": "Delete the service provider certificate.", + "return_type": "identity_provider", "return_info": { "self": true, "custom": false, - "type": "dark_theme_image" + "type": "identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -26005,196 +49262,483 @@ "object", "etag", "type", - "groups", "filter", - "static_uri", - "updated_at" + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "account_id", + "is_default", + "identity_provider_type" ], - "group_id": "Branding", - "operation_id": "getDarkImageData", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "deleteSpCertificate", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete_service_provider_certificate" }, { - "description": "Upload a new account branding image as form data in the dark theme in PNG or JPEG format.", - "field_renames": [], + "description": "Generate a new service provider certificate.\nNote: This endpoint is restricted to administrators.", + "field_renames": [ + { + "api_fieldname": "type", + "_key": "identity_provider_type" + } + ], "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", + "type": "string", + "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" + ], + "name": "algorithm", + "in": "body", + "schema_param": true, + "entity_fieldname": "algorithm", + "api_fieldname": "algorithm", "external_param": true, - "parameter_fieldname": "image", - "_key": "image" + "parameter_fieldname": "algorithm", + "required": false, + "enum_reference": "identity_provider_algorithm_enum", + "_key": "algorithm" }, { - "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", - "name": "reference", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", "in": "path", "required": true, - "enum_reference": "dark_theme_image_reference_enum", - "_key": "reference" + "_key": "id" + }, + { + "type": "integer", + "format": "int32", + "description": "Validity for the certificate in days.", + "name": "validity", + "in": "body", + "schema_param": true, + "entity_fieldname": "validity", + "api_fieldname": "validity", + "external_param": true, + "parameter_fieldname": "validity", + "required": false, + "_key": "validity" } ], "method": "post", - "mode": "update", + "mode": "generate_service_provider_certificate", "responses": [ { - "description": "Image uploaded successfully.", + "description": "Successful operation.", "headers": [ { "type": "string", - "description": "Location of the image metadata.", + "description": "/v3/identity-providers/{identity_provider_id}", "_key": "Content-Location" - }, - { - "type": "string", - "description": "Location of the image binary.", - "_key": "Location" } ], "schema": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", "enum": [ - "branding_image" + "identity-provider" ], "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": "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "_key": "saml2_attributes" + }, + { "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "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" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "_key": "type" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Last update UTC time RFC3339.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", "_key": "updated_at" } ], "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_image" + "group": "Accounts", + "entity": "subtenant_identity_provider" } }, - "_key": "201" + "_key": "200" }, { - "description": "Error in input data format, for example, image is too large.", + "description": "Error in input data, for example, invalid certificate validity value.", "schema": { "type": "object", "required": [ @@ -26413,7 +49957,7 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -26486,13 +50030,13 @@ "_key": "404" } ], - "path": "/v3/branding-images/dark/{reference}/upload-multipart", - "summary": "Upload a dark theme image.", - "return_type": "dark_theme_image", + "path": "/v3/identity-providers/{identity_provider_id}/generate-sp-certificate", + "summary": "Generate a new service provider certificate.", + "return_type": "identity_provider", "return_info": { "self": true, "custom": false, - "type": "dark_theme_image" + "type": "identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -26500,338 +50044,537 @@ "object", "etag", "type", - "groups", "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." - } + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "account_id", + "is_default", + "identity_provider_type" ], + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "generateSpCertificate", "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" + "request_content_type": "application/json", + "request_body": "json", + "_key": "generate_service_provider_certificate" }, { - "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```", + "description": "Retrieve an array of identity providers.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { - "api_fieldname": "developer_certificate", - "_key": "certificate" + "api_fieldname": "type", + "_key": "identity_provider_type" } ], "fields": [ { "type": "string", - "description": "Description for the developer certificate.", - "x-nullable": true, - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", + "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, - "_key": "description" + "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", - "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": [ + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", + "_key": "include" + }, { - "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" - } + "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" ], - "_key": "201" - }, + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "identity_provider_order_enum", + "_key": "order" + } + ], + "method": "get", + "mode": "list", + "responses": [ { - "description": "Bad request.", + "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": [ + "etag", + "id", "name", - "message" + "object", + "type" ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" }, { "type": "string", - "description": "Name of the field which caused the error.", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" + }, + { + "type": "string", + "maxLength": 500, + "description": "Description for the identity provider.", + "_key": "description" + }, + { + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "_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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "_key": "saml2_attributes" + }, + { + "type": "string", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "_key": "status" + }, + { + "type": "string", + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "_key": "type" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider" + } }, - "_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" } - ] - }, - "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" + ], + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider" } - ], - "_key": "400" + }, + "_key": "200" }, { - "description": "Invalid access token.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -26901,20 +50644,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": [ @@ -26984,171 +50717,448 @@ } ] }, - "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" - }, + } + ], + "path": "/v3/identity-providers", + "summary": "Get all identity providers.", + "return_type": "paginated_response(identity_provider)", + "return_info": { + "self": true, + "custom": false, + "type": "identity_provider" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "total_count", + "has_more", + "data" + ], + "foreign_key_priority": "self", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "getAllIdentityProviders", + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" + }, + { + "description": "Retrieve an identity provider.\nNote: This endpoint is restricted to administrators.", + "field_renames": [ { - "description": "Certificate with the given name already exists.", + "api_fieldname": "type", + "_key": "identity_provider_type" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "code", - "message", + "etag", + "id", + "name", "object", - "request_id", "type" ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "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, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "api_fieldname": "object", + "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" + } }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "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": "fields" + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "_key": "oidc_attributes" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "_key": "saml2_attributes" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Status of the identity provider.", "enum": [ - "error" + "ACTIVE", + "SUSPENDED" ], - "_key": "object" + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "_key": "type" }, { "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": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] - }, - "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" + ], + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_identity_provider" } - ], - "_key": "409" - } - ], - "path": "/v3/developer-certificates", - "summary": "Create a new 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", - "groups", - "filter", - "id", - "created_at", - "account_id", - "developer_private_key", - "security_file_content", - "certificate" - ], - "group_id": "Security", - "parameter_map": { - "developerCertificateId": "id" - }, - "operation_id": "createDeveloperCertificate", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [ - { - "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", - "entity_fieldname": "id", - "api_fieldname": "cert_id", - "external_param": false, - "parameter_fieldname": "cert_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Deleted successfully.", - "_key": "204" + }, + "_key": "200" }, { "description": "Authentication failure.", @@ -27297,7 +51307,7 @@ "_key": "403" }, { - "description": "Certificate not found.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -27370,13 +51380,13 @@ "_key": "404" } ], - "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Delete a trusted certificate by ID.", - "return_type": "developer_certificate", + "path": "/v3/identity-providers/{identity_provider_id}", + "summary": "Get identity provider.", + "return_type": "identity_provider", "return_info": { "self": true, "custom": false, - "type": "developer_certificate" + "type": "identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -27384,26 +51394,34 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "account_id", + "is_default", + "identity_provider_type" ], - "group_id": "Security", + "group_id": "Accounts", "parameter_map": { - "developerCertificateId": "id", - "cert_id": "id" + "identity_provider_id": "id" }, - "operation_id": "deleteCertificate", + "operation_id": "getIdentityProvider", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" }, { - "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": "Refreshes an OIDC IdP's signing keys.\nNote: This endpoint is restricted to administrators.", "field_renames": [ { - "api_fieldname": "developer_certificate", - "_key": "certificate" + "api_fieldname": "type", + "_key": "identity_provider_type" } ], "fields": [ @@ -27414,58 +51432,43 @@ "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "cert_id", + "parameter_fieldname": "identity_provider_id", "in": "path", "required": true, "_key": "id" } ], - "method": "get", - "mode": "get_trusted_certificate_info", + "method": "post", + "mode": "refresh_tokens", "responses": [ { "description": "Successful operation.", + "headers": [ + { + "type": "string", + "description": "/v3/identity-providers/{identity_provider_id}", + "_key": "Content-Location" + } + ], "schema": { "type": "object", "required": [ - "account_id", - "certificate", - "certificate_fingerprint", "etag", "id", - "issuer", "name", "object", - "service", - "subject", - "validity" + "type" ], "properties": [ { "type": "string", "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", + "description": "The ID of the account the identity provider belongs to.", "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", @@ -27478,30 +51481,11 @@ { "type": "string", "maxLength": 500, - "x-nullable": true, - "example": "Certificate created by me.", - "description": "Human readable description of this certificate.", + "description": "Description for the identity provider.", "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", @@ -27520,111 +51504,479 @@ "_key": "id" }, { - "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "api_fieldname": "issuer", - "entity_fieldname": "issuer", - "_key": "issuer" + "type": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" }, { "type": "string", "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", + "description": "Name of the identity provider.", "api_fieldname": "name", "entity_fieldname": "name", "_key": "name" }, { - "type": "string", - "description": "Entity name: always 'trusted-cert'", - "enum": [ - "trusted-cert" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "type": "string", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "api_fieldname": "object", + "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "_key": "saml2_attributes" + }, + { + "type": "string", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" + }, + { + "type": "string", + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "_key": "type" + }, + { + "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" + } + ], + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_identity_provider" + } + }, + "_key": "200" + }, + { + "description": "Not an OIDC IdP or JWKS URI is unspecified.", + "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" }, { - "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": "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": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "_key": "service" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", + "description": "Entity name, always `error`.", "enum": [ - "ACTIVE", - "INACTIVE" + "error" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" - }, - { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" + "_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" - }, - { - "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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "description": "Represents a trusted certificate in responses.", - "foreign_key": { - "group": "Security", - "entity": "developer_certificate" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -27694,10 +52046,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -27747,30 +52099,802 @@ }, { "type": "string", - "description": "Entity name, always `error`.", + "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/identity-providers/{identity_provider_id}/refresh-jwks", + "summary": "Refreshes the OIDC signing keys.", + "return_type": "identity_provider", + "return_info": { + "self": true, + "custom": false, + "type": "identity_provider" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "account_id", + "is_default", + "identity_provider_type" + ], + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "refreshJwks", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "refresh_tokens" + }, + { + "description": "Update an existing identity provider.\nNote: This endpoint is restricted to administrators.", + "field_renames": [ + { + "api_fieldname": "type", + "_key": "identity_provider_type" + } + ], + "fields": [ + { + "type": "string", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "in": "query", + "name": "discovery", + "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", + "type": "boolean", + "allowEmptyValue": true, + "entity_fieldname": "discovery", + "api_fieldname": "discovery", + "external_param": true, + "parameter_fieldname": "discovery", + "required": false, + "_key": "discovery" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "identity_provider_type" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "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", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" + }, + { + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" + }, + { + "type": "string", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "identity_provider_status_enum", + "_key": "status" + } + ], + "method": "put", + "mode": "update", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], + "properties": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "api_fieldname": "object", + "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "_key": "saml2_attributes" + }, + { + "type": "string", + "description": "Status of the identity provider.", "enum": [ - "error" + "ACTIVE", + "SUSPENDED" ], - "_key": "object" + "api_fieldname": "status", + "entity_fieldname": "status", + "_key": "status" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "identity_provider_type", + "_key": "type" }, { "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": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_identity_provider" + } }, - "_key": "403" + "_key": "200" }, { - "description": "Certificate not found.", + "description": "Error in input data, for example, missing name.", "schema": { "type": "object", "required": [ @@ -27840,183 +52964,10 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Get trusted certificate by ID.", - "return_type": "trusted_certificate", - "return_info": { - "self": false, - "custom": false, - "type": "trusted_certificate" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "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" - ], - "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": "get_trusted_certificate_info" - }, - { - "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": [ - { - "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" - } - ], - "method": "get", - "mode": "read", - "responses": [ - { - "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" + "_key": "400" }, { - "description": "Bad request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -28086,10 +53037,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Invalid access token.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -28159,20 +53110,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": "An identity provider not found.", "schema": { "type": "object", "required": [ @@ -28242,26 +53183,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/identity-providers/{identity_provider_id}", + "summary": "Update an existing identity provider.", + "return_type": "identity_provider", "return_info": { "self": true, "custom": false, - "type": "developer_certificate" + "type": "identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -28269,47 +53200,38 @@ "object", "etag", "type", - "groups", "filter", "created_at", + "updated_at", "account_id", - "name", - "description", - "developer_private_key", - "security_file_content", - "certificate" + "is_default" ], - "group_id": "Security", + "group_id": "Accounts", "parameter_map": { - "developerCertificateId": "id" + "identity_provider_id": "id" }, - "operation_id": "getDeveloperCertificate", + "operation_id": "updateIdentityProvider", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "update" } ], "fields": [ { "type": "string", - "description": "Account to which the developer certificate belongs.", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", "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", + "example": "2018-02-13T09:35:20Z", "description": "Creation UTC time RFC3339.", "api_fieldname": "created_at", "readOnly": true, @@ -28318,8 +53240,8 @@ }, { "type": "string", - "description": "Description for the developer certificate.", - "x-nullable": true, + "maxLength": 500, + "description": "Description for the identity provider.", "api_fieldname": "description", "readOnly": false, "required": false, @@ -28327,175 +53249,421 @@ }, { "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" + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" }, { "type": "string", - "description": "ID that uniquely identifies the developer certificate.", - "api_fieldname": "id", - "parameter_fieldname": "developerCertificateId", - "in": "path", - "required": true, + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", "readOnly": false, - "_key": "id" + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "identity_provider_type" + }, + { + "type": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "required": false, + "_key": "is_default" }, { "type": "string", - "description": "Name of the developer certificate.", + "maxLength": 100, + "description": "Name of the identity provider.", "api_fieldname": "name", "readOnly": false, "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "readOnly": false, + "required": false, + "_key": "saml2_attributes" + }, + { + "type": "string", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "readOnly": false, + "required": false, + "enum_reference": "identity_provider_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": [ + { + "api_fieldname": "type", + "_key": "identity_provider_type" + } + ], + "tags": [ + "Account - identity providers" + ], + "group_id": "Accounts", + "_key": "identity_provider" + }, + { + "swagger_models": [ + "IdpPublicKey" + ], + "primary_key_field": null, + "methods": [], + "fields": [ { "type": "string", - "description": "Content of the `security.c` file flashed to the device to provide security credentials.", - "api_fieldname": "security_file_content", + "description": "The public key.", + "api_fieldname": "key", "readOnly": true, "required": false, - "_key": "security_file_content" - } - ], - "field_renames": [ + "_key": "key" + }, { - "api_fieldname": "developer_certificate", - "_key": "certificate" + "type": "string", + "description": "The public key ID.", + "api_fieldname": "kid", + "readOnly": true, + "required": false, + "_key": "kid" } ], - "tags": [ - "Device security - developer class certificates", - "Device security - certificates" - ], - "group_id": "Security", - "_key": "developer_certificate" + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "identity_provider_public_key" }, { "swagger_models": [ - "CertificateEnrollment", - "DeviceData", - "DeviceDataPostRequest", - "DeviceDataPutRequest", - "DeviceGroupManipulation", - "DevicePage" + "BrandingColor", + "BrandingColorList" ], - "primary_key_field": "id", + "primary_key_field": "reference", "methods": [ { - "description": "Add one device to a group.", + "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": [ { - "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" - }, - { + "is_primary_key": true, + "_override": true, "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", + "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", + "in": "path", + "description": "The name of the branding color.", "required": true, - "_key": "id" + "enum_reference": "light_theme_color_reference_enum", + "_key": "reference" } ], - "method": "post", - "mode": "add_to_group", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Success - device added.", + "description": "Deleted successfully.", "_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.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -28568,7 +53736,7 @@ "_key": "401" }, { - "description": "Not found.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -28597,666 +53765,461 @@ ], "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", - "groups", - "filter" - ], - "group_id": "Devices", - "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": "add_to_group" - }, - { - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 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" - }, - { - "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" - }, - { - "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": "post", - "mode": "create", - "responses": [ - { - "description": "Device created.", - "schema": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "groups": { - "description": "An array containing an ID of each group this device belongs to.", - "type": "array", - "items": { - "type": "string", - "example": "00000000000000000000000000000000" + "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "account_id": { + { "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id" - }, - "device_execution_mode": { + "description": "Entity name, always `error`.", "enum": [ - 0, - 1, - 5 + "error" ], - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 0, - "api_fieldname": "device_execution_mode", - "entity_fieldname": "device_execution_mode" - }, - "auto_update": { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", - "entity_fieldname": "auto_update" + "_key": "object" }, - "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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Color 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" }, - "ca_id": { - "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "entity_fieldname": "ca_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" }, - "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "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": { + "description": "Entity name, always `error`.", "enum": [ - "development", - "production" + "error" ], - "type": "string", - "description": "DEPRECATED: The state of the device's deployment.", - "api_fieldname": "deployed_state", - "entity_fieldname": "deployed_state" + "_key": "object" }, - "deployment": { + { "type": "string", - "description": "DEPRECATED: The last deployment used on the device.", - "example": "", - "api_fieldname": "deployment", - "entity_fieldname": "deployment" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "description": { + { "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description", - "api_fieldname": "description", - "entity_fieldname": "description" - }, - "device_class": { + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "404" + } + ], + "path": "/v3/branding-colors/light/{reference}", + "summary": "Reset branding color to default.", + "return_type": "void", + "return_info": { + "self": false, + "custom": true, + "type": "void" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Branding", + "operation_id": "resetLightColor", + "spec": { + "return_type": "void" + }, + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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```", + "field_renames": [], + "fields": [ + { + "is_primary_key": true, + "_override": true, + "type": "string", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + } + ], + "method": "get", + "mode": "list", + "responses": [ + { + "description": "Successful operation.", + "schema": { + "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], + "properties": [ + { "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": "01619571f3c00242ac12000600000000", + "description": "The entity ID to retrieve after the given one.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, - "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" + { + "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" }, - "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" + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, - "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": "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" }, - "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": "Entity name: always `list`.", + "enum": [ + "list" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, - "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": "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" }, - "firmware_checksum": { - "type": "string", - "description": "The SHA256 checksum of the current firmware image.", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "firmware_checksum", - "entity_fieldname": "firmware_checksum" + { + "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": "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" }, - "host_gateway": { - "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "entity_fieldname": "host_gateway" + { + "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": { + { "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "entity_fieldname": "manifest" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "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": { + "description": "Entity name, always `error`.", "enum": [ - "connector", - "direct" + "error" ], + "_key": "object" + }, + { "type": "string", - "description": "The ID of the channel used to communicate with the device.", - "api_fieldname": "mechanism", - "entity_fieldname": "mechanism" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "mechanism_url": { + { "type": "string", - "description": "The address of the connector to use.", - "example": "", - "api_fieldname": "mechanism_url", - "entity_fieldname": "mechanism_url" + "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" }, - "name": { - "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "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" }, - "object": { + { "type": "string", - "description": "The API resource entity.", - "example": "device", - "api_fieldname": "object", - "entity_fieldname": "object" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "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" - }, - "state": { + "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.\n", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Account limit reached. Could not create device.", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "403" - }, - { - "description": "Unique-constrained fields are used by other resources.", - "_key": "409" } ], - "path": "/v3/devices/", - "summary": "Create a device", - "return_type": "device", + "path": "/v3/branding-colors/light", + "summary": "Get light theme branding colors.", + "return_type": "paginated_response(light_theme_color)", "return_info": { "self": true, "custom": false, - "type": "device" + "type": "light_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -29264,68 +54227,378 @@ "object", "etag", "type", - "groups", "filter", - "account_id", - "bootstrapped_timestamp", - "created_at", - "deployed_state", - "id", - "firmware_checksum", - "manifest_timestamp", - "updated_at", - "enrolment_list_timestamp" + "limit", + "after", + "order", + "total_count", + "has_more", + "data" ], - "group_id": "Devices", - "operation_id": "Device_create", - "pagination": false, + "foreign_key_priority": "self", + "group_id": "Branding", + "operation_id": "getLightColors", + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "light_theme_color" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "list" }, { - "description": "Delete device. Only available for devices with a developer certificate. Attempts to delete a device with a production certicate will return a 400 response.", + "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": [ { + "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", - "name": "id", "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "id", - "external_param": false, - "parameter_fieldname": "id", - "_key": "id" + "enum_reference": "light_theme_color_reference_enum", + "_key": "reference" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "read", "responses": [ { - "description": "Device deleted.", - "_key": "204" + "description": "Successful operation.", + "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", + "parameter_fieldname": "color", + "in": "body", + "required": false, + "_key": "color" + }, + { + "type": "string", + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "name": "object", + "in": "body", + "schema_param": true, + "external_param": true, + "parameter_fieldname": "object", + "required": false, + "_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", + "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" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "_key": "200" }, { - "description": "Bad Request.", - "_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": "Not authenticated.", - "_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": "Unable to delete device because it can't be found.", + "description": "Color 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/devices/{id}/", - "summary": "Delete a device.", - "return_type": "device", + "path": "/v3/branding-colors/light/{reference}", + "summary": "Get light theme branding color.", + "return_type": "light_theme_color", "return_info": { "self": true, "custom": false, - "type": "device" + "type": "light_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -29333,1015 +54606,1202 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "color", + "updated_at" ], - "group_id": "Devices", - "operation_id": "Device_destroy", + "group_id": "Branding", + "operation_id": "getLightColor", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" }, { - "description": "List all devices.", + "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": [ { "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", + "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": "include" + "_key": "color" }, { - "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" + "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": "light_theme_color_reference_enum", + "_key": "reference" }, { "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", + "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": "order" + "_key": "updated_at" } ], - "method": "get", - "mode": "list", + "method": "put", + "mode": "update", "responses": [ { - "description": "Request successful.", + "description": "Color has been set successfully.", "schema": { + "type": "object", "properties": [ { "type": "string", - "description": "An offset token for current page.", - "example": "01631667477600000000000100100374", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "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" }, { - "items": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "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" - }, - "account_id": { - "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000" - }, - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 0 - }, - "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": "string", - "description": "The address of the connector to use.", - "example": "" - }, - "name": { - "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000" - }, - "object": { + "type": "string", + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "name": "object", + "in": "body", + "schema_param": true, + "external_param": true, + "parameter_fieldname": "object", + "required": false, + "_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", + "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" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "_key": "200" + }, + { + "description": "Error in input data format.", + "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" + } + ] + }, + "_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": "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" + } + ] + }, + "_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": "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" - } + "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" ], - "type": "array", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "_key": "object" }, { - "type": "boolean", - "description": "Are there more results available.", - "example": false, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "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": "Color not found.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "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" + "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": "The type of this API object is a \"list\".", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", + "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 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)", + "path": "/v3/branding-colors/light/{reference}", + "summary": "Updates light theme branding color.", + "return_type": "light_theme_color", "return_info": { "self": true, "custom": false, - "type": "device" - }, - "x_filter": { - "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" - ] + "type": "light_theme_color" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", - "filter", - "data", - "has_more", - "total_count", - "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" - }, + "group_id": "Branding", + "operation_id": "setLightColor", + "additional_operations": [ + { + "operation_id": "bulkSetLightColors", + "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": "list" + "_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", + "parameter_fieldname": "color", + "in": "body", + "required": false, + "readOnly": 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", + "name": "reference", + "in": "path", + "required": false, + "enum_reference": "light_theme_color_reference_enum", + "readOnly": false, + "_key": "reference" }, { - "description": "Retrieve information about a specific device.", + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "api_fieldname": "updated_at", + "parameter_fieldname": "updated_at", + "in": "body", + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "User interface configuration - colors" + ], + "group_id": "Branding", + "_key": "light_theme_color" + }, + { + "swagger_models": [ + "BrandingImage", + "BrandingImageList" + ], + "primary_key_field": "reference", + "methods": [ + { + "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": [ { + "is_primary_key": true, + "_override": true, "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", + "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, - "_key": "id" + "enum_reference": "light_theme_image_reference_enum", + "_key": "reference" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "delete", "responses": [ { - "description": "Retrieved result successfully.", - "schema": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "groups": { - "description": "An array containing an ID of each group this device belongs to.", + "description": "Image reverted 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": "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" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "account_id": { + { "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id" - }, - "device_execution_mode": { + "description": "Entity name, always `error`.", "enum": [ - 0, - 1, - 5 + "error" ], - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 0, - "api_fieldname": "device_execution_mode", - "entity_fieldname": "device_execution_mode" + "_key": "object" }, - "auto_update": { - "type": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", - "entity_fieldname": "auto_update" + { + "type": "string", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "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" + "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" }, - "bootstrapped_timestamp": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { + "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 timestamp of the device's most recent bootstrap process.", - "api_fieldname": "bootstrapped_timestamp", - "entity_fieldname": "bootstrapped_timestamp" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "ca_id": { + { "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "entity_fieldname": "ca_id" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Unknown image reference.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "custom_attributes": { - "type": "object", - "maxProperties": 5, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" + { + "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": "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" + "_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/branding-images/light/{reference}/clear", + "summary": "Revert an image to light theme default.", + "return_type": "light_theme_image", + "return_info": { + "self": true, + "custom": false, + "type": "light_theme_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Branding", + "operation_id": "clearLightImage", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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```", + "field_renames": [], + "fields": [ + { + "is_primary_key": true, + "_override": true, + "type": "string", + "api_fieldname": "reference", + "entity_fieldname": "reference", + "_key": "reference" + } + ], + "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 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", + "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": "custom_attributes", - "entity_fieldname": "custom_attributes" - }, - "deployed_state": { - "enum": [ - "development", - "production" - ], - "type": "string", - "description": "DEPRECATED: The state of the device's deployment.", - "api_fieldname": "deployed_state", - "entity_fieldname": "deployed_state" - }, - "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": "description", - "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" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, - "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" + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, - "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": "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" }, - "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": "Entity name: always `list`.", + "enum": [ + "list" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, - "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": "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" }, - "firmware_checksum": { - "type": "string", - "description": "The SHA256 checksum of the current firmware image.", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "firmware_checksum", - "entity_fieldname": "firmware_checksum" + { + "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": "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" }, - "host_gateway": { - "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "entity_fieldname": "host_gateway" + { + "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": { + { "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "entity_fieldname": "manifest" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "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": { + "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": "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" }, - "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": "200" - }, - { - "description": "Bad Request.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to find device.", - "_key": "404" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" } ], - "path": "/v3/devices/{id}/", - "summary": "Get a device", - "return_type": "device", + "path": "/v3/branding-images/light", + "summary": "Get metadata of all light theme images.", + "return_type": "paginated_response(light_theme_image)", "return_info": { "self": true, "custom": false, - "type": "device" + "type": "light_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -30349,84 +55809,184 @@ "object", "etag", "type", - "groups", "filter", - "issuer_fingerprint", - "account_id", - "device_execution_mode", - "auto_update", - "bootstrap_expiration_date", - "bootstrapped_timestamp", - "ca_id", - "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", - "serial_number", - "state", - "updated_at", - "vendor_id", - "enrolment_list_timestamp" + "limit", + "after", + "order", + "total_count", + "has_more", + "data" ], - "group_id": "Devices", - "operation_id": "Device_retrieve", - "pagination": false, + "foreign_key_priority": "self", + "group_id": "Branding", + "operation_id": "getAllLightImageData", + "pagination": true, + "foreign_key": { + "group": "Branding", + "entity": "light_theme_image" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "list" }, { - "description": "Remove one device from a group.", + "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": [ { - "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" - }, - { + "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", - "example": "00000000000000000000000000000000", - "name": "device_id", - "in": "body", - "schema_param": true, - "entity_fieldname": "id", - "api_fieldname": "device_id", - "external_param": false, - "parameter_fieldname": "device_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": "light_theme_image_reference_enum", + "_key": "reference" } ], - "method": "post", - "mode": "remove_from_group", + "method": "get", + "mode": "read", "responses": [ { - "description": "Success - device removed.", - "_key": "204" + "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", + "name": "reference", + "in": "path", + "required": true, + "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", + "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": "Bad Request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -30496,10 +56056,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -30569,10 +56129,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "Unknown image reference.", "schema": { "type": "object", "required": [ @@ -30645,13 +56205,13 @@ "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/devices/remove/", - "summary": "Remove a device from a group", - "return_type": "void", + "path": "/v3/branding-images/light/{reference}", + "summary": "Get metadata of a light theme image.", + "return_type": "light_theme_image", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "light_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -30659,426 +56219,203 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "static_uri", + "updated_at" ], - "group_id": "Devices", - "operation_id": "Group_members_remove", - "parameter_map": { - "device_id": "id" - }, - "spec": { - "return_type": "void" - }, + "group_id": "Branding", + "operation_id": "getLightImageData", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "remove_from_group" + "_key": "read" }, { - "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": "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": [ { - "type": "string", - "maxLength": 50, - "description": "The certificate name.", - "example": "customer.dlms", - "api_fieldname": "certificate-name", - "entity_fieldname": "certificate_name", - "in": "path", - "name": "certificate-name", + "in": "stream", + "name": "image", + "description": "The image in PNG or JPEG format as multipart form data.", "required": true, - "pattern": "[\\w\\-]{1,10}\\.[\\w\\-.]{1,10}", + "type": "file", + "entity_fieldname": "image", + "api_fieldname": "image", "external_param": true, - "parameter_fieldname": "certificate-name", - "_key": "certificate_name" + "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" + ], "type": "string", - "description": "The certificate enrollment ID.", - "example": "01612df56f3b0a580a010fc700000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "device-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": "light_theme_image_reference_enum", + "_key": "reference" } ], "method": "post", - "mode": "renew_certificate", + "mode": "update", "responses": [ { - "description": "Created.", + "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", - "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", + "description": "Entity name: always 'branding_image'", + "readOnly": true, "enum": [ - "certificate-enrollment" + "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", - "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" - }, - { - "description": "Validation error: There is no certificate issuer configured for this certificate.", - "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": "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": [ - { - "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": "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": "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": [ - { - "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" + "description": "Name of the image.", + "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" }, { "type": "string", - "description": "Request ID from JWT.", - "_key": "request_id" + "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": "Error type.", - "_key": "type" + "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": "404" + "_key": "201" }, { - "description": "Conflict. A renewal request for this certificate is in progress.", + "description": "Error in input data format, for example, image is too large.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -31088,24 +56425,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" } ] }, @@ -31113,35 +56455,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": "400" }, { - "description": "Either:\n- Operation not supported for this device.\n- The device is not connected.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ "code", - "fields", "message", "object", "request_id", @@ -31151,533 +56498,218 @@ { "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" } ] - }, - "_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": "423" - } - ], - "path": "/v3/devices/{device-id}/certificates/{certificate-name}/renew", - "summary": "Request certificate renewal.", - "return_type": "certificate_enrollment", - "return_info": { - "self": false, - "custom": false, - "type": "certificate_enrollment" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at", - "device_id", - "enroll_status", - "enroll_result", - "enroll_result_detail", - "updated_at" - ], - "group_id": "Devices", - "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": "renew_certificate" - }, - { - "description": "Update a specific 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" - }, - { - "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.", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "id", - "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", - "responses": [ - { - "description": "Device updated.", - "schema": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "groups": { - "description": "An array containing an ID of each group this device belongs to.", - "type": "array", - "items": { - "type": "string", - "example": "00000000000000000000000000000000" - }, - "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" - }, - "account_id": { - "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id" - }, - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 0, - "api_fieldname": "device_execution_mode", - "entity_fieldname": "device_execution_mode" - }, - "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" - }, - "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": [ - "development", - "production" - ], - "type": "string", - "description": "DEPRECATED: The state of the device's deployment.", - "api_fieldname": "deployed_state", - "entity_fieldname": "deployed_state" - }, - "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": "description", - "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.", - "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" - }, - "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": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "entity_fieldname": "host_gateway" + }, + "_key": "fields" }, - "manifest": { + { "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "entity_fieldname": "manifest" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "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": { + "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": "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" }, - "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" ], + "_key": "object" + }, + { "type": "string", - "description": "The current state of the device.", - "api_fieldname": "state", - "entity_fieldname": "state" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, + "_key": "403" + }, + { + "description": "Unknown image reference.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ + { + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, - "vendor_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", - "description": "The device vendor ID.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "vendor_id", - "entity_fieldname": "vendor_id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "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" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "_key": "properties" - } - ], - "_key": "200" - }, - { - "description": "Validation error: The data used to update the device did not validate.\n", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to update device because it can't be found.", + { + "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/devices/{id}/", - "summary": "Update a device", - "return_type": "device", + "path": "/v3/branding-images/light/{reference}/upload-multipart", + "summary": "Upload a light theme image.", + "return_type": "light_theme_image", "return_info": { "self": true, "custom": false, - "type": "device" + "type": "light_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -31685,489 +56717,1026 @@ "object", "etag", "type", - "groups", "filter", - "issuer_fingerprint", - "account_id", - "device_execution_mode", - "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" + "static_uri", + "updated_at" + ], + "group_id": "Branding", + "operation_id": "uploadLightImageMultipart", + "additional_operations": [ + { + "operation_id": "uploadLightImage", + "notes": "The multipart request is more generic and better supported by SDKs." + } ], - "group_id": "Devices", - "operation_id": "Device_update", "pagination": false, - "request_content_type": "application/json", - "request_body": "json", + "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": "The ID of the associated account.", - "example": "00000000000000000000000000000000", - "api_fieldname": "account_id", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "name": "reference", + "in": "path", + "required": false, + "enum_reference": "light_theme_image_reference_enum", + "readOnly": false, + "_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": "account_id" + "_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": "light_theme_image" + }, + { + "swagger_models": [ + "LoginHistory" + ], + "primary_key_field": null, + "methods": [], + "fields": [ + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T17:52:07Z", + "description": "UTC time RFC3339 for this login attempt.", + "api_fieldname": "date", + "readOnly": true, + "required": false, + "_key": "date" + }, + { + "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": "boolean", - "description": "DEPRECATED: Mark this device for automatic firmware update.", - "api_fieldname": "auto_update", + "example": true, + "description": "Flag indicating whether login attempt was successful or not.", + "api_fieldname": "success", + "readOnly": true, + "required": false, + "_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", + "readOnly": true, + "required": false, + "_key": "user_agent" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "login_history" + }, + { + "swagger_models": [ + "LoginProfile" + ], + "primary_key_field": "id", + "methods": [], + "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, + "api_fieldname": "id", + "required": false, + "_key": "id" + }, + { + "type": "string", + "description": "Identity provider type.", + "example": "NATIVE", + "readOnly": true, + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "required": false, + "enum_reference": "login_profile_type_enum", + "_key": "login_profile_type" + }, + { + "type": "string", + "example": "Pelion", + "readOnly": false, + "description": "Name of the identity provider.", + "_override": true, + "api_fieldname": "name", + "required": false, + "_key": "name" + } + ], + "field_renames": [ + { + "api_fieldname": "type", + "_key": "login_profile_type" + } + ], + "tags": [], + "group_id": "Accounts", + "_key": "login_profile" + }, + { + "swagger_models": [ + "OIDCInfo" + ], + "primary_key_field": null, + "methods": [], + "fields": [ + { + "type": "string", + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "api_fieldname": "authorization_endpoint", + "readOnly": true, + "required": false, + "_key": "authorization_endpoint" + }, + { + "type": "boolean", + "description": "For future use.", + "x-nullable": true, + "api_fieldname": "auto_enrollment", + "readOnly": true, + "required": false, + "_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, + "api_fieldname": "claim_mapping", + "readOnly": true, "required": false, - "_key": "auto_update" + "_key": "claim_mapping" }, { - "format": "date", "type": "string", + "description": "Client ID needed to authenticate and gain access to identity provider's API.", "x-nullable": true, - "description": "The expiration date of the certificate used to connect to bootstrap server.", - "api_fieldname": "bootstrap_expiration_date", - "readOnly": false, + "api_fieldname": "client_id", + "readOnly": true, "required": false, - "_key": "bootstrap_expiration_date" + "_key": "client_id" }, { - "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", + "description": "Client secret needed to authenticate and gain access to identity provider's API.", + "x-nullable": true, + "api_fieldname": "client_secret", "readOnly": true, "required": false, - "_key": "bootstrapped_timestamp" + "_key": "client_secret" }, { "type": "string", - "maxLength": 500, - "description": "The certificate issuer's ID.", - "example": "00000000000000000000000000000000", - "api_fieldname": "ca_id", - "readOnly": false, + "description": "URL of the provider's end session endpoint.", + "x-nullable": true, + "api_fieldname": "end_session_endpoint", + "readOnly": true, "required": false, - "_key": "ca_id" + "_key": "end_session_endpoint" }, { - "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, + "description": "Issuer of the identity provider.", + "api_fieldname": "issuer", + "readOnly": true, "required": false, - "_key": "connector_expiration_date" + "_key": "issuer" }, { - "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", + "description": "URL of the provider's JSON web key set document.", + "x-nullable": true, + "api_fieldname": "jwks_uri", "readOnly": true, "required": false, - "_key": "created_at" + "_key": "jwks_uri" }, { - "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" + "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" + } }, - "api_fieldname": "custom_attributes", - "readOnly": false, + "x-nullable": true, + "api_fieldname": "keys", + "readOnly": true, "required": false, - "_key": "custom_attributes" + "_key": "keys" }, { - "enum": [ - "development", - "production" - ], "type": "string", - "description": "DEPRECATED: The state of the device's deployment.", - "api_fieldname": "deployed_state", + "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, + "api_fieldname": "redirect_uri", "readOnly": true, "required": false, - "enum_reference": "device_deployed_state_enum", - "_key": "deployed_state" + "_key": "redirect_uri" }, { "type": "string", - "description": "DEPRECATED: The last deployment used on the device.", - "example": "", - "api_fieldname": "deployment", - "readOnly": false, + "description": "URL of the provider's token revocation endpoint.", + "x-nullable": true, + "api_fieldname": "revocation_endpoint", + "readOnly": true, "required": false, - "_key": "deployment" + "_key": "revocation_endpoint" }, { "type": "string", - "maxLength": 2000, - "description": "The description of the device.", - "example": "description", - "api_fieldname": "description", - "readOnly": false, + "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", + "api_fieldname": "scopes", + "readOnly": true, "required": false, - "_key": "description" + "_key": "scopes" }, { "type": "string", - "maxLength": 32, - "description": "An ID representing the model and hardware revision of the device.", - "example": "", - "api_fieldname": "device_class", - "readOnly": false, + "description": "URL of the OAuth 2.0 authorization endpoint.", + "x-nullable": true, + "api_fieldname": "token_endpoint", + "readOnly": true, "required": false, - "_key": "device_class" + "_key": "token_endpoint" }, { + "type": "string", "enum": [ - 0, - 1, - 5 + "POST", + "GET" ], - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 0, - "api_fieldname": "device_execution_mode", - "readOnly": false, + "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.", + "api_fieldname": "token_request_mode", + "readOnly": true, "required": false, - "_key": "device_execution_mode" + "enum_reference": "oidc_request_token_mode_enum", + "_key": "token_request_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, + "description": "Path to the standard data in the token response. Levels in the JSON structure must be separated by '.' (dot) characters.", + "example": "oidc.data", + "api_fieldname": "token_response_path", + "readOnly": true, "required": false, - "_key": "device_key" + "_key": "token_response_path" }, { "type": "string", - "description": "The endpoint name given to the device.", - "example": "00000000-0000-0000-0000-000000000000", + "description": "URL of the OAuth 2.0 UserInfo endpoint.", + "x-nullable": true, + "api_fieldname": "userinfo_endpoint", "readOnly": true, - "api_fieldname": "endpoint_name", "required": false, - "_key": "endpoint_name" - }, + "_key": "userinfo_endpoint" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "oidc_request" + }, + { + "swagger_models": [ + "OIDCClaimMapping" + ], + "primary_key_field": null, + "methods": [], + "fields": [ { "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, + "description": "Custom claim name for 'email'.", + "example": "email_address", + "x-nullable": true, + "api_fieldname": "email", + "readOnly": true, "required": false, - "_key": "endpoint_type" + "_key": "email" }, { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "The claim date/time.", - "api_fieldname": "enrolment_list_timestamp", + "description": "Custom claim name for 'email_verified'.", + "example": "email_verified", + "x-nullable": true, + "api_fieldname": "email_verified", "readOnly": true, "required": false, - "_key": "enrolment_list_timestamp" + "_key": "email_verified" }, { "type": "string", - "description": "The SHA256 checksum of the current firmware image.", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "firmware_checksum", + "description": "Custom claim name for 'family_name'.", + "example": "family_name", + "x-nullable": true, + "api_fieldname": "family_name", "readOnly": true, "required": false, - "_key": "firmware_checksum" + "_key": "family_name" }, { "type": "string", - "description": "The ID of the host gateway, if appropriate.", - "example": "", - "api_fieldname": "host_gateway", - "readOnly": false, + "description": "Custom claim name for 'given_name'.", + "example": "given_name", + "x-nullable": true, + "api_fieldname": "given_name", + "readOnly": true, "required": false, - "_key": "host_gateway" + "_key": "given_name" }, { "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" + "description": "Custom claim name for 'name'.", + "example": "name", + "x-nullable": true, + "api_fieldname": "name", + "readOnly": true, + "required": false, + "_key": "name" }, { "type": "string", - "pattern": "[A-Fa-f0-9]{64}", + "description": "Custom claim name for 'phone_number'.", + "example": "phone_number", "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, + "api_fieldname": "phone_number", + "readOnly": true, "required": false, - "_key": "issuer_fingerprint" + "_key": "phone_number" }, { "type": "string", - "description": "DEPRECATED: The URL for the current device manifest.", - "example": "", - "api_fieldname": "manifest", - "readOnly": false, + "description": "Custom claim name for 'sub'.", + "example": "sub", + "x-nullable": true, + "api_fieldname": "sub", + "readOnly": true, "required": false, - "_key": "manifest" + "_key": "sub" }, { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "The timestamp of the current manifest version.", - "api_fieldname": "manifest_timestamp", + "description": "Custom claim name for 'updated_at'.", + "example": "updated_at", + "x-nullable": true, + "api_fieldname": "updated_at", "readOnly": true, "required": false, - "_key": "manifest_timestamp" + "_key": "updated_at" }, { - "enum": [ - "connector", - "direct" - ], "type": "string", - "description": "The ID of the channel used to communicate with the device.", - "api_fieldname": "mechanism", - "readOnly": false, + "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, + "api_fieldname": "updated_at_pattern", + "readOnly": true, "required": false, - "enum_reference": "device_mechanism_enum", - "_key": "mechanism" + "_key": "updated_at_pattern" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "oidc_request_claim_mapping" + }, + { + "swagger_models": [ + "ParentAccountInfo" + ], + "primary_key_field": "id", + "methods": [], + "fields": [ + { + "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", + "readOnly": true, + "required": false, + "_key": "admin_email" }, { "type": "string", - "description": "The address of the connector to use.", - "example": "", - "api_fieldname": "mechanism_url", - "readOnly": false, + "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", + "readOnly": true, "required": false, - "_key": "mechanism_url" + "_key": "admin_name" }, { "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "name", - "readOnly": false, + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the parent account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "readOnly": true, "required": false, - "_key": "name" + "_key": "id" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "parent_account" + }, + { + "swagger_models": [ + "PasswordPolicy" + ], + "primary_key_field": null, + "methods": [], + "fields": [ + { + "type": "integer", + "minimum": 8, + "maximum": 512, + "example": "8", + "description": "Minimum length for the password.", + "api_fieldname": "minimum_length", + "readOnly": true, + "required": false, + "_key": "minimum_length" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "password_policy" + }, + { + "swagger_models": [ + "FeaturePolicy" + ], + "primary_key_field": null, + "methods": [], + "fields": [ + { + "type": "string", + "example": "GET", + "description": "Comma-separated list of actions, empty string represents all actions.", + "api_fieldname": "action", + "readOnly": true, + "required": false, + "_key": "action" + }, + { + "type": "boolean", + "example": true, + "description": "True or false controlling whether an action is allowed or not.", + "api_fieldname": "allow", + "readOnly": true, + "required": false, + "_key": "allow" }, { "type": "string", - "description": "The serial number of the device.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "serial_number", - "readOnly": false, + "example": "update-campaigns", + "description": "Feature name corresponding to this policy.", + "api_fieldname": "feature", + "readOnly": true, "required": false, - "_key": "serial_number" + "_key": "feature" + }, + { + "type": "boolean", + "example": false, + "description": "Flag indicating whether this feature is inherited or overwritten specifically.", + "readOnly": true, + "api_fieldname": "inherited", + "required": false, + "_key": "inherited" }, { - "enum": [ - "unenrolled", - "cloud_enrolling", - "bootstrapped", - "registered", - "deregistered" - ], "type": "string", - "description": "The current state of the device.", - "api_fieldname": "state", - "readOnly": false, + "example": "016ada3ec2d46665bf66e32e00000000", + "description": "An ID indicating where this policy is inherited from.", + "pattern": "[a-f0-9]{32}", + "readOnly": true, + "api_fieldname": "inherited_from", "required": false, - "enum_reference": "device_state_enum", - "_key": "state" + "_key": "inherited_from" }, { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "description": "The time the object was updated.", - "api_fieldname": "updated_at", + "example": "account", + "description": "Indicates the type of entity this policy is inherited from.", "readOnly": true, + "enum": [ + "account", + "template", + "tier_template" + ], + "api_fieldname": "inherited_type", "required": false, - "_key": "updated_at" + "enum_reference": "policy_inherited_type_enum", + "_key": "inherited_type" }, { "type": "string", - "description": "The device vendor ID.", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "vendor_id", - "readOnly": false, + "example": "/v3/update-campaign", + "description": "Resource that is protected by this policy.", + "api_fieldname": "resource", + "readOnly": true, "required": false, - "_key": "vendor_id" + "_key": "resource" } ], "field_renames": [], - "tags": [ - "Device security - device certificate renewals" - ], - "group_id": "Devices", - "_key": "device" + "tags": [], + "group_id": "Accounts", + "_key": "policy" }, { "swagger_models": [ - "EnrollmentId", - "EnrollmentIdentities", - "EnrollmentIdentity" + "ApiKeyInfoRespList", + "GroupCreationInfo", + "GroupSummary", + "GroupSummaryList", + "GroupUpdateInfo", + "UserInfoRespList" ], "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": "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", - "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", + "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": "group_id", + "in": "path", + "description": "The ID of the group.", "required": true, - "_key": "enrollment_identity" + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "group_id", + "external_param": false, + "parameter_fieldname": "group_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": "policy_group_order_enum", + "_key": "order" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "api_keys", "responses": [ { - "description": "Created. The enrollment claim has been created and is waiting for the device to connect.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ + "data", + "has_more", + "limit", "object", - "id", - "etag", - "account_id", - "created_at", - "expires_at", - "claimed_at", - "enrollment_identity", - "enrolled_device_id" + "total_count" ], "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" + "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": "string", - "pattern": "[A-Za-z0-9]{1,256}", - "example": "7642xfaxz", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "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": "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": "boolean", + "example": false, + "description": "Flag indicating whether there are more results.", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, { - "type": "string", - "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "id", - "entity_fieldname": "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": "Entity name: always `list`.", "enum": [ - "enrollment" + "list" ], - "example": "enrollment", "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": "account_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": "Devices", - "entity": "device_enrollment" + "group": "Accounts", + "entity": "api_key" } }, - "_key": "201" + "_key": "200" }, { - "description": "Bad request. The enrollment identity is not valid.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -32237,10 +57806,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "The provided access token is not valid.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -32310,10 +57879,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Conflict. The requested identity to add already exists on this or another account.", + "description": "A group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -32383,469 +57952,378 @@ } ] }, - "_key": "409" + "_key": "404" } ], - "path": "/v3/device-enrollments", - "summary": "Create a single enrollment.", - "return_type": "device_enrollment", + "path": "/v3/policy-groups/{group_id}/api-keys", + "summary": "Get the API keys of a policy group.", + "return_type": "paginated_response(api_key)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "device_enrollment" + "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", "type", - "groups", "filter", - "id", - "created_at", - "claimed_at", - "account_id", - "expires_at", - "enrolled_device_id" + "total_count", + "has_more", + "data" ], - "group_id": "Devices", - "operation_id": "createDeviceEnrollment", - "pagination": false, + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "getApiKeysOfGroup", + "foreign_key": { + "entity": "api_key" + }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "api_keys" }, { - "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](../docs/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```", + "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": [ { - "in": "path", - "name": "id", + "type": "object", + "properties": [ + { + "type": "array", + "description": "An array of API key IDs.", + "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.", + "items": { + "type": "string" + }, + "_key": "users" + } + ], + "description": "Represents arrays of user and API key IDs.", + "name": "members", + "in": "body", + "schema_param": true, + "entity_fieldname": "members", + "api_fieldname": "members", + "external_param": true, + "parameter_fieldname": "members", + "required": false, + "_key": "members" + }, + { "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", "required": true, - "description": "Enrollment identity.", - "entity_fieldname": "id", - "api_fieldname": "id", - "external_param": false, - "parameter_fieldname": "id", - "_key": "id" + "_key": "name" } ], - "method": "delete", - "mode": "delete", + "method": "post", + "mode": "create", "responses": [ { - "description": "No content. The enrollment claim has been deleted.", - "_key": "204" - }, - { - "description": "Bad request. Invalid enrollment identity.", + "description": "New entity created.", "schema": { "type": "object", "required": [ - "code", - "message", + "account_id", + "apikey_count", + "etag", + "id", + "name", "object", - "request_id", - "type" + "user_count" ], "properties": [ { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "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" - } - ] + "type": "integer", + "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": "fields" + "api_fieldname": "apikey_count", + "entity_fieldname": "apikey_count", + "_key": "apikey_count" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "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": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "400" - }, - { - "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" + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `group`.", "enum": [ - "error" + "group" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_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" + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "entity_fieldname": "user_count", + "_key": "user_count" } - ] - }, - "_key": "404" - } - ], - "path": "/v3/device-enrollments/{id}", - "summary": "Delete an 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", - "groups", - "filter" - ], - "group_id": "Devices", - "operation_id": "deleteDeviceEnrollment", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "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": "Entity ID to fetch after.", - "example": "00005a4e027f0a580a01081c00000000", - "pattern": "^[A-Za-z0-9]{32}", - "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": "list", - "responses": [ + ], + "description": "This object contains basic information about groups.", + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_policy_group" + } + }, + "_key": "201" + }, { - "description": "OK.", + "description": "Error in input data, for example, invalid group name.", "schema": { "type": "object", "required": [ + "code", + "message", "object", - "limit", - "after", - "order", - "has_more", - "total_count", - "data" + "request_id", + "type" ], "properties": [ { - "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "pattern": "^[A-Za-z0-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": "Request fields which failed validation.", "items": { "type": "object", "required": [ - "object", - "id", - "etag", - "account_id", - "created_at", - "expires_at", - "claimed_at", - "enrollment_identity", - "enrolled_device_id" + "name", + "message" ], "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" + "description": "Message describing the error condition.", + "_key": "message" }, { "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" - }, + "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": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "_key": "id" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "enum": [ - "enrollment" - ], - "example": "enrollment", - "_key": "object" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" - } + ] }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "example": true, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "_key": "fields" }, { - "type": "integer", - "description": "Range 2-1000, or default.", - "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": "Entity name, always `error`.", "enum": [ - "list" + "error" ], - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "default": "ASC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "type": "integer", - "example": 100, - "format": "int32", - "minimum": 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_enrollment" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Bad request. The access token could not be read.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -32915,10 +58393,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "The provided access token is not valid.", + "description": "A group with that name already exists.", "schema": { "type": "object", "required": [ @@ -32988,16 +58466,16 @@ } ] }, - "_key": "401" + "_key": "409" } ], - "path": "/v3/device-enrollments", - "summary": "Get a list of enrollments per account.", - "return_type": "paginated_response(device_enrollment)", + "path": "/v3/policy-groups", + "summary": "Create a new group.", + "return_type": "policy_group", "return_info": { "self": true, "custom": false, - "type": "device_enrollment" + "type": "policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -33005,147 +58483,124 @@ "object", "etag", "type", - "groups", "filter", - "has_more", - "total_count", - "data" + "id", + "created_at", + "updated_at", + "account_id", + "user_count", + "application_count", + "apikey_count" ], - "foreign_key_priority": "self", - "group_id": "Devices", - "operation_id": "getDeviceEnrollments", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" }, + "operation_id": "createGroup", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "create" }, { - "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```", + "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": [ { - "type": "string", - "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "id", + "name": "group_id", "in": "path", + "description": "The ID of the group to delete.", "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "group_id", + "external_param": false, + "parameter_fieldname": "group_id", "_key": "id" } ], - "method": "get", - "mode": "read", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "OK. Pending enrollment data.", + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { "type": "object", "required": [ + "code", + "message", "object", - "id", - "etag", - "account_id", - "created_at", - "expires_at", - "claimed_at", - "enrollment_identity", - "enrolled_device_id" + "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 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": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "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": "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", - "pattern": "[A-Za-z0-9]{1,256}", - "example": "7642xfaxz", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "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": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "Enrollment identity.", - "pattern": "^[A-Za-z0-9]{32}", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "enum": [ - "enrollment" - ], - "example": "enrollment", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_enrollment" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Bad request. Invalid enrollment identity.", + "description": "Forbidden, or Administrators group cannot be removed.", "schema": { "type": "object", "required": [ @@ -33215,10 +58670,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Not found.", + "description": "A group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -33291,272 +58746,298 @@ "_key": "404" } ], - "path": "/v3/device-enrollments/{id}", - "summary": "Get details of an single enrollment by ID.", - "return_type": "device_enrollment", + "path": "/v3/policy-groups/{group_id}", + "summary": "Delete a group.", + "return_type": "policy_group", "return_info": { - "self": true, - "custom": false, - "type": "device_enrollment" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "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": [ + "self": true, + "custom": false, + "type": "policy_group" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "deleteGroup", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, { - "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```", + "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": [ { - "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", + "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": "enrollment_identities", - "_key": "enrollment_identities" + "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. 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": "policy_group_order_enum", + "_key": "order" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "list", "responses": [ { - "description": "Bulk upload data received and asynchronous processing started.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ + "data", + "has_more", + "limit", "object", - "id", - "etag", - "created_at", - "account_id", - "status", - "total_count", - "processed_count", - "errors_count", - "completet_at", - "full_report_file", - "errors_report_file" + "total_count" ], "properties": [ { "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_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" }, { - "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", + "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.", + "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": "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": "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": false, + "description": "Flag indicating whether there are more results.", + "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" + "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": [ - "enrollment-identity-bulk-uploads" + "list" ], - "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" - }, - { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "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" + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "subtenant_api_key_order_enum", + "_key": "order" }, { "type": "integer", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", + "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": "Devices", - "entity": "device_enrollment_bulk_delete" + "group": "Accounts", + "entity": "policy_group" } }, - "_key": "201" + "_key": "200" }, { - "description": "Bad request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -33626,10 +59107,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Invalid access token.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -33699,124 +59180,60 @@ } ] }, - "_key": "401" + "_key": "403" } ], - "path": "/v3/device-enrollments-bulk-uploads", - "summary": "Bulk upload.", - "return_type": "device_enrollment_bulk_create", + "path": "/v3/policy-groups", + "summary": "Get policy groups.", + "return_type": "paginated_response(policy_group)", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_bulk_create" + "type": "policy_group" + }, + "x_filter": { + "name": [ + "eq" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "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", - "groups", - "filter" + "has_more", + "data", + "name__eq" ], - "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" + "foreign_key_priority": "self", + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "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": "getAllGroups", + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "policy_group" }, "request_content_type": "application/json", "request_body": "json", - "_key": "download_full_report_file" + "_key": "list" }, { - "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": "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": [ { "type": "string", - "description": "Bulk ID", - "pattern": "^[A-Za-z0-9]{32}", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "id", + "parameter_fieldname": "group_id", "in": "path", "required": true, "_key": "id" @@ -33826,139 +59243,126 @@ "mode": "read", "responses": [ { - "description": "Bulk upload entity found.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "object", - "id", - "etag", - "created_at", "account_id", - "status", - "total_count", - "processed_count", - "errors_count", - "completet_at", - "full_report_file", - "errors_report_file" + "apikey_count", + "etag", + "id", + "name", + "object", + "user_count" ], "properties": [ { "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", "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", + "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 enrollment identities with failed processing.", - "api_fieldname": "errors_count", - "entity_fieldname": "errors_count", - "_key": "errors_count" + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_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" + "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": "etag", "example": "1", - "pattern": "[A-Za-z0-9]{0,256}", + "description": "API resource entity version.", "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}", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", "_key": "id" }, { "type": "string", - "enum": [ - "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" + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { + "type": "string", + "description": "Entity name: always `group`.", "enum": [ - "new", - "processing", - "completed" + "group" ], - "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'.", + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" + }, + { "type": "string", - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "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", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "entity_fieldname": "user_count", + "_key": "user_count" } ], + "description": "This object contains basic information about groups.", "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_bulk_delete" + "group": "Accounts", + "entity": "subtenant_policy_group" } }, "_key": "200" }, { - "description": "Bad request. Invalid bulk identity.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -34028,10 +59432,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Invalid access token.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -34101,10 +59505,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not found.", + "description": "A group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -34177,13 +59581,13 @@ "_key": "404" } ], - "path": "/v3/device-enrollments-bulk-uploads/{id}", - "summary": "Get bulk upload entity.", - "return_type": "device_enrollment_bulk_create", + "path": "/v3/policy-groups/{group_id}", + "summary": "Get a policy group.", + "return_type": "policy_group", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_bulk_create" + "type": "policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -34191,295 +59595,178 @@ "object", "etag", "type", - "groups", "filter", - "account_id", "created_at", - "status", - "total_count", - "processed_count", - "errors_count", - "completed_at", - "full_report_file", - "errors_report_file" + "updated_at", + "account_id", + "name", + "user_count", + "application_count", + "apikey_count" ], - "group_id": "Devices", - "operation_id": "getBulkDeviceEnrollment", + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "getGroupSummary", "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 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", - "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": "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" - }, - { - "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", - "readOnly": true, - "required": false, - "_key": "full_report_file" - }, - { - "type": "string", - "description": "Bulk ID", - "pattern": "^[A-Za-z0-9]{32}", - "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" - ], - "group_id": "Devices", - "_key": "device_enrollment_bulk_create" - }, - { - "swagger_models": [ - "BulkResponse" - ], - "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": "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": [ { - "in": "stream", - "name": "enrollment_identities", - "type": "file", + "type": "string", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "group_id", + "in": "path", "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": "enrollment_identities", - "_key": "enrollment_identities" + "_key": "id" + }, + { + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" } ], - "method": "post", - "mode": "delete", + "method": "put", + "mode": "update", "responses": [ { - "description": "Bulk delete data received and asynchronous processing started.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "object", - "id", - "etag", - "created_at", "account_id", - "status", - "total_count", - "processed_count", - "errors_count", - "completet_at", - "full_report_file", - "errors_report_file" + "apikey_count", + "etag", + "id", + "name", + "object", + "user_count" ], "properties": [ { "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", "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", + "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 enrollment identities with failed processing.", - "api_fieldname": "errors_count", - "entity_fieldname": "errors_count", - "_key": "errors_count" + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_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" + "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": "etag", "example": "1", - "pattern": "[A-Za-z0-9]{0,256}", + "description": "API resource entity version.", "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}", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, "_key": "id" }, { "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `group`.", "enum": [ - "enrollment-identity-bulk-uploads" + "group" ], - "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" + "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", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "entity_fieldname": "user_count", + "_key": "user_count" } ], + "description": "This object contains basic information about groups.", "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_bulk_create" + "group": "Accounts", + "entity": "subtenant_policy_group" } }, - "_key": "201" + "_key": "200" }, { - "description": "Bad request.", + "description": "Error in input data, for example, the group name is too long.", "schema": { "type": "object", "required": [ @@ -34552,7 +59839,7 @@ "_key": "400" }, { - "description": "Invalid access token.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -34623,91 +59910,161 @@ ] }, "_key": "401" - } - ], - "path": "/v3/device-enrollments-bulk-deletes", - "summary": "Bulk delete.", - "return_type": "device_enrollment_bulk_delete", - "return_info": { - "self": true, - "custom": false, - "type": "device_enrollment_bulk_delete" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "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": "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", - "groups", - "filter" + }, + { + "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": "A group with that 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" + } ], - "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": "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", + "path": "/v3/policy-groups/{group_id}", + "summary": "Update the group name.", + "return_type": "policy_group", "return_info": { - "self": false, - "custom": true, - "type": "file" + "self": true, + "custom": false, + "type": "policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -34715,176 +60072,598 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "created_at", + "updated_at", + "account_id", + "user_count", + "application_count", + "apikey_count" ], - "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" + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" }, + "operation_id": "updateGroupName", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "download_full_report_file" + "_key": "update" }, { - "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": "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", - "description": "Bulk ID", - "pattern": "^[A-Za-z0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "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" + }, + { + "name": "group_id", "in": "path", + "description": "The ID of the group.", "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "group_id", + "external_param": false, + "parameter_fieldname": "group_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": "policy_group_order_enum", + "_key": "order" } ], "method": "get", - "mode": "read", + "mode": "users", "responses": [ { - "description": "Bulk delete entity found.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ + "data", + "has_more", + "limit", "object", - "id", - "etag", - "created_at", - "account_id", - "status", - "total_count", - "processed_count", - "errors_count", - "completet_at", - "full_report_file", - "errors_report_file" + "total_count" ], "properties": [ { "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_key": "account_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" }, { - "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", + "description": "A list of entities.", + "items": { + "type": "object", + "required": [ + "account_id", + "email", + "etag", + "id", + "object", + "status" + ], + "properties": [ + { + "type": "string", + "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", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "_key": "address" + }, + { + "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": "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", + "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" + } + }, + "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": false, + "description": "Flag indicating whether there are more results.", + "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", - "parameter_fieldname": "id", - "in": "path", - "required": true, - "_key": "id" + "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": [ - "enrollment-identity-bulk-uploads" + "list" ], - "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" - }, - { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "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" + "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" }, { "type": "integer", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", + "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": "Devices", - "entity": "device_enrollment_bulk_create" + "group": "Accounts", + "entity": "user" } }, "_key": "200" }, { - "description": "Bad request. Invalid bulk identity.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -34954,10 +60733,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Invalid access token.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -35027,10 +60806,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not found.", + "description": "A group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -35103,301 +60882,460 @@ "_key": "404" } ], - "path": "/v3/device-enrollments-bulk-deletes/{id}", - "summary": "Get bulk delete entity.", - "return_type": "device_enrollment_bulk_delete", + "path": "/v3/policy-groups/{group_id}/users", + "summary": "Get users of a policy group.", + "return_type": "paginated_response(user)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "device_enrollment_bulk_delete" + "type": "user" + }, + "x_filter": { + "status": [ + "eq", + "in", + "nin" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "account_id", - "created_at", - "status", "total_count", - "processed_count", - "errors_count", - "completed_at", - "full_report_file", - "errors_report_file" + "has_more", + "data", + "status__eq", + "status__in", + "status__nin" ], - "group_id": "Devices", - "operation_id": "getBulkDeviceEnrollmentDelete", - "pagination": false, + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "getUsersOfGroup", + "foreign_key": { + "entity": "user" + }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "users" } ], "fields": [ { "type": "string", - "description": "ID", - "example": "00005a4e027f0a580a01081c00000000", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "account_id", "readOnly": true, "required": false, "_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", - "readOnly": true, - "required": false, - "_key": "completed_at" - }, - { - "type": "string", - "description": "The time of receiving the bulk creation task.", - "format": "date-time", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, { "type": "integer", + "format": "int32", "example": 0, - "description": "The number of enrollment identities with failed processing.", - "api_fieldname": "errors_count", + "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": "errors_count" + "_key": "apikey_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", + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", "readOnly": true, "required": false, - "_key": "errors_report_file" + "_key": "application_count" }, { "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", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", "readOnly": true, "required": false, - "_key": "full_report_file" + "_key": "created_at" }, { "type": "string", - "description": "Bulk ID", - "pattern": "^[A-Za-z0-9]{32}", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", - "parameter_fieldname": "id", - "in": "path", - "required": true, "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" + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "readOnly": false, + "required": true, + "_key": "name" }, { - "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", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", "readOnly": true, "required": false, - "enum_reference": "device_enrollment_bulk_delete_status_enum", - "_key": "status" + "_key": "updated_at" }, { "type": "integer", - "example": 10, - "description": "Total number of enrollment identities found in the input CSV.", - "api_fieldname": "total_count", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", "readOnly": true, "required": false, - "_key": "total_count" + "_key": "user_count" } ], "field_renames": [], "tags": [ - "Public API" + "Account - policy groups" ], - "group_id": "Devices", - "_key": "device_enrollment_bulk_delete" + "group_id": "Accounts", + "_key": "policy_group" }, { "swagger_models": [ - "BlackListedDeviceData", - "DenialAttemptsResponse" + "ListOfPreSharedKeysWithoutSecret", + "PreSharedKey", + "PreSharedKeyWithoutSecret" ], "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": "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": [ + { + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, + "type": "string", + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name", + "_key": "endpoint_name" + }, + { + "description": "The Id of the pre_shared_key, shadows the endpoint_name", + "type": "string", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "pattern": "^[ -~]{16,64}$", + "example": "my-endpoint-0001", + "name": "endpoint_name", + "in": "body", + "schema_param": true, + "_key": "id" + }, + { + "type": "string", + "pattern": "^(0[xX])?[0-9a-fA-F]{32,64}$", + "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", + "name": "secret_hex", + "in": "body", + "schema_param": true, + "entity_fieldname": "secret_hex", + "api_fieldname": "secret_hex", + "external_param": true, + "parameter_fieldname": "secret_hex", + "required": true, + "_key": "secret_hex" + } + ], + "method": "post", + "mode": "create", + "responses": [ + { + "description": "Successfully created.", + "_key": "201" + }, + { + "description": "Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, INVALID_SECRET_HEX, and MALFORMED_JSON_CONTENT.", + "schema": { + "type": "string" + }, + "_key": "400" + }, + { + "description": "Authentication failure.", + "_key": "401" + }, + { + "description": "Forbidden. You need to read and accept the PSK license in Device Management Portal.", + "_key": "403" + }, + { + "description": "Conflict. The PSK for the endpoint already exists and cannot be overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT.", + "schema": { + "type": "string" + }, + "_key": "409" + } + ], + "path": "/v2/device-shared-keys", + "summary": "Upload a PSK to Pelion Device Management.", + "return_type": "pre_shared_key", + "return_info": { + "self": true, + "custom": false, + "type": "pre_shared_key" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Security", + "parameter_map": { + "endpoint_name": "id" + }, + "operation_id": "uploadPreSharedKey", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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```", + "field_renames": [], + "fields": [ + { + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, + "type": "string", + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name", + "_key": "endpoint_name" + }, + { + "description": "The Id of the pre_shared_key, shadows the endpoint_name", + "type": "string", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "name": "endpoint_name", + "in": "path", + "required": true, + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Successfully deleted. Responds even if the endpoint does not have an associated PSK.", + "_key": "204" + }, + { + "description": "Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME.", + "schema": { + "type": "string" + }, + "_key": "400" + }, + { + "description": "Authentication failure.", + "_key": "401" + } + ], + "path": "/v2/device-shared-keys/{endpoint_name}", + "summary": "Remove a PSK.", + "return_type": "pre_shared_key", + "return_info": { + "self": true, + "custom": false, + "type": "pre_shared_key" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Security", + "parameter_map": { + "endpoint_name": "id" + }, + "operation_id": "deletePreSharedKey", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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```", "field_renames": [], "fields": [ { "type": "string", - "description": "Optional parameter for pagination. Denied device ID.", + "description": "An offset token for fetching a specific page. Provided by the server.", + "example": "001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004", "api_fieldname": "after", "entity_fieldname": "after", - "in": "query", "name": "after", + "in": "query", + "required": false, "external_param": true, "parameter_fieldname": "after", - "required": false, "_key": "after" }, + { + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, + "type": "string", + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name", + "_key": "endpoint_name" + }, + { + "description": "The Id of the pre_shared_key, shadows the endpoint_name", + "type": "string", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, { "type": "integer", - "description": "Optional parameter for pagination.", + "description": "The number of objects to retrieve on a page (2-1000). Values outside the 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", - "enum": [ - "ASC", - "DESC" - ], - "description": "Optional parameter for pagination.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", + "name": "limit", + "in": "query", "required": false, - "enum_reference": "device_enrollment_denial_order_enum", - "_key": "order" + "default": 50, + "minimum": 2, + "maximum": 1000, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" } ], "method": "get", "mode": "list", "responses": [ { - "description": "Query Success. Responding with List of Devices.", + "description": "List of PSKs.", "schema": { "type": "object", "required": [ "object", + "limit", + "order", + "has_more", "data" ], "properties": [ { "type": "string", "description": "An offset token for current page.", + "example": "001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004", "api_fieldname": "after", "entity_fieldname": "after", "_key": "after" }, { + "type": "string", + "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", + "api_fieldname": "continuation_marker", + "entity_fieldname": "continuation_marker", + "_key": "continuation_marker" + }, + { + "type": "array", + "description": "Array of the PSK entries. The array is empty if there are no PSKs.", + "minLength": 0, "items": { + "type": "object", "required": [ - "id", - "account_id", - "endpoint_name", - "trusted_certificate_id", - "created_at", - "object" + "endpoint_name" ], "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", + "description": "The date-time (RFC3339) when this PSK was uploaded to Device Management.", + "example": "2017-07-21T17:32:28.012Z", "_key": "created_at" }, { "type": "string", - "description": "endpoint name", - "example": "Endpoint_1234", + "pattern": "^[ -~]{16,64}$", + "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", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, "_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" + "group": "Security", + "entity": "pre_shared_key" } }, - "type": "array", "api_fieldname": "data", "entity_fieldname": "data", "_key": "data" }, { "type": "boolean", - "description": "Are there more results available.", - "example": false, + "description": "More results are available.", + "example": true, "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.", + "description": "The value of limit query parameter from the request, or default if not specified.", "example": 50, - "minimum": 2, - "maximum": 1000, "api_fieldname": "limit", "entity_fieldname": "limit", "_key": "limit" @@ -35412,316 +61350,368 @@ }, { "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "description": "The creation time based order of the entries.", + "description": "Record order based on creation time.", "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": "Devices", - "entity": "device_enrollment_denial" + "group": "Security", + "entity": "pre_shared_key" } }, "_key": "200" }, { - "description": "JWT validation failed.", - "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": "ID set in pagination parameter `after` 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" + "description": "Bad request. Contains the error as a string, either TOKEN_NOT_FOUND or INVALID_LIMIT.", + "_key": "400" } ], - "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": "/v2/device-shared-keys", + "summary": "List PSKs.", + "return_type": "paginated_response(pre_shared_key)", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_denial" - }, - "x_filter": { - "trusted_certificate_id": [ - "eq" - ], - "endpoint_name": [ - "eq" - ] + "type": "pre_shared_key" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", + "order", "has_more", - "total_count", - "data", - "trusted_certificate_id__eq", - "endpoint_name__eq" + "continuation_marker", + "data" ], "foreign_key_priority": "self", - "group_id": "Devices", - "operation_id": "listEnrollmentDenialAttempts", + "group_id": "Security", + "parameter_map": { + "endpoint_name": "id" + }, + "operation_id": "listPreSharedKeys", "pagination": true, "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_denial" + "group": "Security", + "entity": "pre_shared_key" }, "request_content_type": "application/json", "request_body": "json", "_key": "list" }, { - "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": "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": [ { - "in": "path", - "name": "device_enrollment_denial_id", "type": "string", - "description": "id of the recorded failed bootstrap attempt", + "pattern": "^[ -~]{16,64}$", + "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", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, + "api_fieldname": "endpoint_name", + "entity_fieldname": "endpoint_name", + "_key": "endpoint_name" + }, + { + "description": "The Id of the pre_shared_key, shadows the endpoint_name", + "type": "string", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "name": "endpoint_name", + "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": "Pre-shared key for the device (does not contain secret).", "schema": { + "type": "object", "required": [ - "id", - "account_id", - "endpoint_name", - "trusted_certificate_id", - "created_at", - "object" + "endpoint_name" ], "properties": [ - { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "account id", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "_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", + "description": "The date-time (RFC3339) when this PSK was uploaded to Device Management.", + "example": "2017-07-21T17:32:28.012Z", "api_fieldname": "created_at", "entity_fieldname": "created_at", "_key": "created_at" }, { "type": "string", - "description": "endpoint name", - "example": "Endpoint_1234", + "pattern": "^[ -~]{16,64}$", + "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", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, "api_fieldname": "endpoint_name", "entity_fieldname": "endpoint_name", "_key": "endpoint_name" + } + ], + "foreign_key": { + "group": "Security", + "entity": "pre_shared_key" + } + }, + "_key": "200" + }, + { + "description": "Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME.", + "schema": { + "type": "string" + }, + "_key": "400" + }, + { + "description": "Authentication failure.", + "_key": "401" + }, + { + "description": "The PSK does not exist.", + "_key": "404" + } + ], + "path": "/v2/device-shared-keys/{endpoint_name}", + "summary": "Get a PSK.", + "return_type": "pre_shared_key", + "return_info": { + "self": true, + "custom": false, + "type": "pre_shared_key" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at" + ], + "group_id": "Security", + "parameter_map": { + "endpoint_name": "id" + }, + "operation_id": "getPreSharedKey", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "format": "date-time", + "description": "The date-time (RFC3339) when this PSK was uploaded to Device Management.", + "example": "2017-07-21T17:32:28.012Z", + "api_fieldname": "created_at", + "readOnly": true, + "required": false, + "_key": "created_at" + }, + { + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "readOnly": false, + "_override": true, + "type": "string", + "api_fieldname": "endpoint_name", + "pattern": "^[ -~]{16,64}$", + "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", + "required": false, + "_key": "endpoint_name" + }, + { + "description": "The Id of the pre_shared_key, shadows the endpoint_name", + "type": "string", + "getter_custom_method": "pre_shared_key_id_getter", + "setter_custom_method": "pre_shared_key_id_setter", + "_override": true, + "api_fieldname": "id", + "readOnly": false, + "required": false, + "_key": "id" + } + ], + "field_renames": [], + "tags": [ + "Security and identity - pre-shared keys" + ], + "group_id": "Security", + "_key": "pre_shared_key" + }, + { + "swagger_models": [ + "SAML2Req" + ], + "primary_key_field": null, + "methods": [], + "fields": [ + { + "type": "string", + "format": "byte", + "maxLength": 65535, + "description": "Contains an entity descriptor document for the identity provider. Can be used as an alternative method to provide the identity provider's attributes.", + "api_fieldname": "entity_descriptor", + "readOnly": true, + "required": false, + "_key": "entity_descriptor" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "api_fieldname": "idp_entity_id", + "readOnly": true, + "required": false, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider. Certificates must be in PEM format.", + "items": { + "type": "string" + }, + "api_fieldname": "idp_x509_certs", + "readOnly": true, + "required": false, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "api_fieldname": "slo_endpoint", + "readOnly": true, + "required": false, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider. We recommend that you leave it empty and let the system generate it.", + "api_fieldname": "sp_entity_id", + "readOnly": true, + "required": false, + "_key": "sp_entity_id" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "api_fieldname": "sso_endpoint", + "readOnly": true, + "required": false, + "_key": "sso_endpoint" + } + ], + "field_renames": [], + "tags": [], + "group_id": "Accounts", + "_key": "saml2_request" + }, + { + "swagger_models": [ + "ServerCredentialsResponseData" + ], + "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```", + "field_renames": [], + "fields": [], + "method": "get", + "mode": "get_bootstrap", + "responses": [ + { + "description": "Bootstrap server credentials fetched successfully.", + "schema": { + "type": "object", + "properties": [ + { + "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "id of the recorded failed bootstrap attempt", - "example": "00005a4e027f0a580a04567c00000000", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "Unique entity ID.", "api_fieldname": "id", "entity_fieldname": "id", "_key": "id" }, { "type": "string", - "enum": [ - "denied_device" - ], + "description": "Entity name: always `server-credentials`.", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { "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" + "description": "PEM-format X.509 server certificate used to validate the server certificate received during the TLS/DTLS handshake.", + "api_fieldname": "server_certificate", + "entity_fieldname": "server_certificate", + "_key": "server_certificate" + }, + { + "type": "string", + "description": "Server URI that the client connects to.", + "api_fieldname": "server_uri", + "entity_fieldname": "server_uri", + "_key": "server_uri" } ], "foreign_key": { - "group": "Devices", - "entity": "device_enrollment_denial" + "group": "Security", + "entity": "server_credentials" } }, + "examples": [ + { + "object": "server-credentials", + "id": "015fee4431fd38c98640fbfb00000000", + "etag": "1", + "created_at": "2017-12-11T14:22:20.009Z", + "server_certificate": "-----BEGIN CERTIFICATE-----\\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\\n-----END CERTIFICATE-----", + "server_uri": "coaps://coap.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000", + "_key": "Success" + } + ], "_key": "200" }, { - "description": "JWT validation failed.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -35791,10 +61781,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "ID not found.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -35864,16 +61854,26 @@ } ] }, - "_key": "404" + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], + "_key": "401" } ], - "path": "/v3/device-enrollment-denials/{device_enrollment_denial_id}", - "summary": "Query for a single device by ID", - "return_type": "device_enrollment_denial", + "path": "/v3/server-credentials/bootstrap", + "summary": "Fetch bootstrap server credentials.", + "return_type": "server_credentials", "return_info": { "self": true, "custom": false, - "type": "device_enrollment_denial" + "type": "server_credentials" }, "x_filter": {}, "x_deprecation": null, @@ -35881,578 +61881,263 @@ "object", "etag", "type", - "groups", "filter", "id", - "account_id", - "endpoint_name", - "trusted_certificate_id", - "created_at" + "created_at", + "server_certificate", + "server_uri" + ], + "group_id": "Security", + "operation_id": "getBootstrapServerCredentials", + "additional_operations": [ + { + "operation_id": "getAllServerCredentials", + "notes": "The information returned by this endpoint can be obtained by calling `get_bootstrap`." + } ], - "group_id": "Devices", - "operation_id": "getEnrollmentDenialAttempt", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "account id", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "account_id", - "readOnly": true, - "required": false, - "_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", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "description": "endpoint name", - "example": "Endpoint_1234", - "api_fieldname": "endpoint_name", - "readOnly": true, - "required": false, - "_key": "endpoint_name" - }, - { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "id of the recorded failed bootstrap attempt", - "example": "00005a4e027f0a580a04567c00000000", - "api_fieldname": "id", - "readOnly": true, - "required": false, - "_key": "id" + "_key": "get_bootstrap" }, { - "type": "string", - "pattern": "[a-f0-9]{32}", - "description": "Trusted certificate id", - "example": "00005a4e027f0a580a01081c00000000", - "api_fieldname": "trusted_certificate_id", - "readOnly": true, - "required": false, - "_key": "trusted_certificate_id" - } - ], - "field_renames": [], - "tags": [ - "EnrollmentDenials" - ], - "group_id": "Devices", - "_key": "device_enrollment_denial" - }, - { - "swagger_models": [ - "DeviceEventData", - "DeviceEventPage" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "List all device events for an account.", + "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": [ - { - "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "description": "The ID of The item after which to retrieve the next page.", - "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", - "example": 1000, - "api_fieldname": "limit", - "entity_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.", - "in": "query", - "name": "limit", - "minimum": 2, - "maximum": 1000, - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" - }, - { - "type": "string", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "description": "The order of the records based on creation time, `ASC` or `DESC`; by default `ASC`.", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "_key": "order" - } - ], + "fields": [], "method": "get", - "mode": "list", + "mode": "get_lwm2m", "responses": [ { - "description": "Request successful.", + "description": "LwM2M server credentials fetched successfully.", "schema": { + "type": "object", "properties": [ { "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" - }, - { - "items": { - "properties": [ - { - "type": "object", - "additionalProperties": { - "type": "object" - }, - "example": [], - "x-deprecation": { - "issued_at": "2019-01-15T14:55:20+00:00", - "end_of_life_at": "2020-01-15T14:55:20+00:00", - "comment": "This field is not used.", - "links": [] - }, - "_key": "changes" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "created_at" - }, - { - "type": "object", - "example": { - "campaign_id": "00000000000000000000000000000000" - }, - "description": "Additional data relevant to the event.", - "additionalProperties": { - "type": "string" - }, - "_key": "data" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "date_time" - }, - { - "type": "string", - "example": "Device record created", - "_key": "description" - }, - { - "type": "string", - "example": "00000000000000000000000000000000", - "_key": "device_id" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "etag" - }, - { - "type": "string", - "maxLength": 100, - "example": "UPD2_100", - "description": "Event code", - "_key": "event_type" - }, - { - "type": "string", - "example": "FAIL_MANIFEST_REJECTED", - "description": "Category code which groups the event type by a summary category.", - "_key": "event_type_category" - }, - { - "type": "string", - "example": "FAIL", - "description": "Generic description of the event", - "_key": "event_type_description" - }, - { - "type": "string", - "example": "00000000000000000000000000000000", - "_key": "id" - }, - { - "type": "string", - "description": "The API resource entity.", - "example": "device-event", - "_key": "object" - }, - { - "type": "boolean", - "_key": "state_change" - } - ], - "required": [ - "date_time", - "id" - ], - "foreign_key": { - "group": "Devices", - "entity": "device_events" - } - }, - "type": "array", - "example": "[]", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "format": "date-time", + "description": "Creation UTC time RFC3339.", + "api_fieldname": "created_at", + "entity_fieldname": "created_at", + "_key": "created_at" }, { - "type": "boolean", - "example": false, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "type": "string", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { - "type": "integer", - "example": 1000, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "description": "Unique entity ID.", + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "example": "list", + "description": "Entity name: always `server-credentials`.", "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "description": "PEM-format X.509 server certificate used to validate the server certificate received during the TLS/DTLS handshake.", + "api_fieldname": "server_certificate", + "entity_fieldname": "server_certificate", + "_key": "server_certificate" }, { - "type": "integer", - "example": 1, - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "type": "string", + "description": "Server URI that the client connects to.", + "api_fieldname": "server_uri", + "entity_fieldname": "server_uri", + "_key": "server_uri" } ], - "pagination": true, "foreign_key": { - "group": "Devices", - "entity": "device_events" + "group": "Security", + "entity": "server_credentials" } }, + "examples": [ + { + "object": "server-credentials", + "id": "015fee4431fd38c98640fbfb00000000", + "etag": "1", + "created_at": "2017-12-11T14:22:20.009Z", + "server_certificate": "-----BEGIN CERTIFICATE-----\\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\\n-----END CERTIFICATE-----", + "server_uri": "coaps://mds.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000", + "_key": "Success" + } + ], "_key": "200" }, { - "description": "Bad Request.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Unable to find page.", - "_key": "404" - } - ], - "path": "/v3/device-events/", - "summary": "List all device events.", - "return_type": "paginated_response(device_events)", - "return_info": { - "self": true, - "custom": false, - "type": "device_events" - }, - "x_filter": { - "date_time": [ - "in", - "nin", - "lte", - "gte" - ], - "description": [ - "eq", - "neq", - "in", - "nin" - ], - "id": [ - "eq", - "neq", - "in", - "nin" - ], - "device_id": [ - "eq", - "neq", - "in", - "nin" - ], - "event_type": [ - "eq", - "neq", - "in", - "nin" - ], - "state_change": [ - "eq", - "neq" - ] - }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "data", - "has_more", - "total_count", - "date_time__in", - "date_time__nin", - "date_time__lte", - "date_time__gte", - "description__eq", - "description__neq", - "description__in", - "description__nin", - "id__eq", - "id__neq", - "id__in", - "id__nin", - "device_id__eq", - "device_id__neq", - "device_id__in", - "device_id__nin", - "event_type__eq", - "event_type__neq", - "event_type__in", - "event_type__nin", - "state_change__eq", - "state_change__neq" - ], - "foreign_key_priority": "self", - "group_id": "Devices", - "operation_id": "Device_Event_list", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device_events" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "list" - }, - { - "description": "Retrieve a specific device event.", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "device_event_id", - "in": "path", - "required": true, - "_key": "id" - } - ], - "method": "get", - "mode": "read", - "responses": [ - { - "description": "Retrieved result successfully.", + "description": "Bad request.", "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "object", - "additionalProperties": { - "type": "object" - }, - "example": [], - "x-deprecation": { - "issued_at": "2019-01-15T14:55:20+00:00", - "end_of_life_at": "2020-01-15T14:55:20+00:00", - "comment": "This field is not used.", - "links": [] - }, - "api_fieldname": "changes", - "entity_fieldname": "changes", - "_key": "changes" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "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", - "example": { - "campaign_id": "00000000000000000000000000000000" - }, - "description": "Additional data relevant to the event.", - "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": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "date_time", - "entity_fieldname": "date_time", - "_key": "date_time" + "_key": "fields" }, { "type": "string", - "example": "Device record created", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "maxLength": 100, - "example": "UPD2_100", - "description": "Event code", - "api_fieldname": "event_type", - "entity_fieldname": "event_type", - "_key": "event_type" + "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": "string", - "example": "FAIL_MANIFEST_REJECTED", - "description": "Category code which groups the event type by a summary category.", - "api_fieldname": "event_type_category", - "entity_fieldname": "event_type_category", - "_key": "event_type_category" + "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": "FAIL", - "description": "Generic description of the event", - "api_fieldname": "event_type_description", - "entity_fieldname": "event_type_description", - "_key": "event_type_description" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "The API resource entity.", - "example": "device-event", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "type": "boolean", - "api_fieldname": "state_change", - "entity_fieldname": "state_change", - "_key": "state_change" + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "required": [ - "date_time", - "id" - ], - "foreign_key": { - "group": "Devices", - "entity": "device_events" - } + ] }, - "_key": "200" - }, - { - "description": "Bad Request.", - "_key": "400" - }, - { - "description": "Not authenticated.", + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], "_key": "401" - }, - { - "description": "Unable to find device.", - "_key": "404" } ], - "path": "/v3/device-events/{device_event_id}/", - "summary": "Retrieve a device event.", - "return_type": "device_events", + "path": "/v3/server-credentials/lwm2m", + "summary": "Fetch LwM2M server credentials.", + "return_type": "server_credentials", "return_info": { "self": true, "custom": false, - "type": "device_events" + "type": "server_credentials" }, "x_filter": {}, "x_deprecation": null, @@ -36460,193 +62145,309 @@ "object", "etag", "type", - "groups", "filter", + "id", "created_at", - "changes", - "data", - "date_time", - "description", - "device_id", - "event_type", - "event_type_category", - "event_type_description", - "state_change" + "server_certificate", + "server_uri" + ], + "group_id": "Security", + "operation_id": "getL2M2MServerCredentials", + "additional_operations": [ + { + "operation_id": "getAllServerCredentials", + "notes": "The information returned by this endpoint can be obtained by calling `get_lwm2m`." + } ], - "group_id": "Devices", - "operation_id": "Device_Event_retrieve", - "parameter_map": { - "device_event_id": "id" - }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "get_lwm2m" } ], "fields": [ { - "type": "object", - "additionalProperties": { - "type": "object" - }, - "example": [], - "x-deprecation": { - "issued_at": "2019-01-15T14:55:20+00:00", - "end_of_life_at": "2020-01-15T14:55:20+00:00", - "comment": "This field is not used.", - "links": [] - }, - "api_fieldname": "changes", - "readOnly": true, - "required": false, - "_key": "changes" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", + "format": "date-time", + "description": "Creation UTC time RFC3339.", "api_fieldname": "created_at", "readOnly": true, "required": false, "_key": "created_at" }, - { - "type": "object", - "example": { - "campaign_id": "00000000000000000000000000000000" - }, - "description": "Additional data relevant to the event.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "data", - "readOnly": true, - "required": false, - "_key": "data" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "date_time", - "readOnly": true, - "required": false, - "_key": "date_time" - }, - { - "type": "string", - "example": "Device record created", - "api_fieldname": "description", - "readOnly": true, - "required": false, - "_key": "description" - }, - { - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "device_id", - "readOnly": true, - "required": false, - "_key": "device_id" - }, - { - "type": "string", - "maxLength": 100, - "example": "UPD2_100", - "description": "Event code", - "api_fieldname": "event_type", - "readOnly": true, - "required": false, - "_key": "event_type" - }, { "type": "string", - "example": "FAIL_MANIFEST_REJECTED", - "description": "Category code which groups the event type by a summary category.", - "api_fieldname": "event_type_category", + "description": "Unique entity ID.", + "api_fieldname": "id", "readOnly": true, "required": false, - "_key": "event_type_category" + "_key": "id" }, { "type": "string", - "example": "FAIL", - "description": "Generic description of the event", - "api_fieldname": "event_type_description", + "description": "PEM-format X.509 server certificate used to validate the server certificate received during the TLS/DTLS handshake.", + "api_fieldname": "server_certificate", "readOnly": true, "required": false, - "_key": "event_type_description" + "_key": "server_certificate" }, { "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "boolean", - "api_fieldname": "state_change", + "description": "Server URI that the client connects to.", + "api_fieldname": "server_uri", "readOnly": true, "required": false, - "_key": "state_change" + "_key": "server_uri" } ], "field_renames": [], - "tags": [], - "group_id": "Devices", - "_key": "device_events" + "tags": [ + "Security and identity - server credentials" + ], + "group_id": "Security", + "_key": "server_credentials" }, { "swagger_models": [ - "DeviceGroup", - "DeviceGroupManipulation", - "DeviceGroupPage", - "DevicePage" + "ApiKeyInfoReq", + "ApiKeyInfoResp", + "ApiKeyUpdateReq", + "GroupSummaryList" ], "primary_key_field": "id", "methods": [ { - "description": "Add one device to a group.", + "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": [ { "type": "string", - "example": "00000000000000000000000000000000", - "name": "device_id", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "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", - "schema_param": true, - "entity_fieldname": "device_id", - "api_fieldname": "device_id", - "external_param": true, - "parameter_fieldname": "device_id", "required": false, - "_key": "device_id" + "_key": "groups" }, { - "in": "path", - "description": "The ID of the group.", - "name": "device-group-id", - "required": true, "type": "string", - "entity_fieldname": "id", - "api_fieldname": "device-group-id", - "external_param": false, - "parameter_fieldname": "device-group-id", - "_key": "id" + "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": "subtenant_api_key_status_enum", + "_key": "status" } ], "method": "post", - "mode": "add_device", + "mode": "create", "responses": [ { - "description": "Success - device added.", - "_key": "204" + "description": "New entity created.", + "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", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, + { + "type": "string", + "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": "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", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_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", + "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" + }, + { + "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": "api_key" + } + }, + "_key": "201" }, { - "description": "Bad Request.", + "description": "Error in input data, for example, missing API key name.", "schema": { "type": "object", "required": [ @@ -36719,7 +62520,7 @@ "_key": "400" }, { - "description": "Unauthorized.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -36792,7 +62593,80 @@ "_key": "401" }, { - "description": "Not found.", + "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": "An account with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -36865,192 +62739,154 @@ "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/devices/add/", - "summary": "Add a device to a group", - "return_type": "void", + "path": "/v3/accounts/{account_id}/api-keys", + "summary": "Create a new API key.", + "return_type": "subtenant_api_key", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "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", "type", - "groups", - "filter" + "filter", + "id", + "created_at", + "updated_at", + "key", + "creation_time", + "last_login_time" ], - "group_id": "Devices", + "group_id": "Accounts", "parameter_map": { - "device-group-id": "id" - }, - "operation_id": "Group_members_add", - "spec": { - "return_type": "void" + "apikey_id": "id" }, + "operation_id": "createAccountApiKey", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "add_device" + "_key": "create" }, { - "description": "Create a group.", + "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": [ { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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": "custom_attributes", - "entity_fieldname": "custom_attributes", - "name": "custom_attributes", - "in": "body", - "schema_param": true, - "parameter_fieldname": "custom_attributes", - "required": false, - "_key": "custom_attributes" - }, - { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, "type": "string", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "api_fieldname": "description", - "entity_fieldname": "description", - "name": "description", - "in": "body", - "schema_param": true, - "parameter_fieldname": "description", - "required": false, - "_key": "description" + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" }, { + "name": "apikey_id", + "in": "path", + "description": "The ID of the API key to delete.", + "required": true, "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", - "api_fieldname": "name", - "entity_fieldname": "name", - "name": "name", - "in": "body", - "schema_param": true, - "parameter_fieldname": "name", - "required": false, - "_key": "name" + "entity_fieldname": "id", + "api_fieldname": "apikey_id", + "external_param": false, + "parameter_fieldname": "apikey_id", + "_key": "id" } ], - "method": "post", - "mode": "create", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Created.", + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ - { - "type": "string", - "format": "date-time", - "description": "The time the campaign was created.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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": "custom_attributes", - "entity_fieldname": "custom_attributes", - "_key": "custom_attributes" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" - }, { "type": "integer", - "description": "The number of devices in this group.", - "example": 10, - "api_fieldname": "devices_count", - "entity_fieldname": "devices_count", - "_key": "devices_count" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "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": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "Entity name: always 'device-group'.", - "example": "device-group", - "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 object 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": "Devices", - "entity": "device_group" - } + ] }, - "_key": "201" + "_key": "401" }, { - "description": "Bad Request.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -37120,10 +62956,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Unauthorized.", + "description": "An account or API key with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -37148,55 +62984,375 @@ "type": "object", "required": [ "name", - "message" + "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}/api-keys/{apikey_id}", + "summary": "Delete the API key.", + "return_type": "subtenant_api_key", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_api_key" + }, + "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 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", + "type", + "filter" + ], + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "deleteAccountApiKey", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "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": "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. 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_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 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", - "description": "Message describing the error condition.", - "_key": "message" + "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.", + "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", - "description": "Name of the field which caused the error.", + "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" + } }, - "_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": "api_key_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": "subtenant_policy_group" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Conflict - Group name already exists.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -37266,66 +63422,10 @@ } ] }, - "_key": "409" - } - ], - "path": "/v3/device-groups/", - "summary": "Create a group", - "return_type": "device_group", - "return_info": { - "self": true, - "custom": false, - "type": "device_group" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "id", - "devices_count", - "created_at", - "updated_at" - ], - "group_id": "Devices", - "parameter_map": { - "device-group-id": "id" - }, - "operation_id": "Group_create", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "create" - }, - { - "description": "Delete a group.", - "field_renames": [], - "fields": [ - { - "description": "The ID of the group", - "in": "path", - "name": "device-group-id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "device-group-id", - "external_param": false, - "parameter_fieldname": "device-group-id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Success - group deleted.", - "_key": "204" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -37395,10 +63495,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "An account or API key with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -37471,410 +63571,234 @@ "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/", - "summary": "Delete a group", - "return_type": "device_group", + "path": "/v3/accounts/{account_id}/api-keys/{apikey_id}/groups", + "summary": "Get policy groups of an API key.", + "return_type": "paginated_response(subtenant_policy_group)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "device_group" + "type": "subtenant_policy_group" }, "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Devices", - "parameter_map": { - "device-group-id": "id" + "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": [] }, - "operation_id": "Group_delete", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "description": "Get a page of devices.", - "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" - }, - { - "in": "path", - "name": "device-group-id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "device-group-id", - "external_param": false, - "parameter_fieldname": "device-group-id", - "_key": "id" - }, - { - "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": "devices", - "responses": [ - { - "description": "Ok.", - "schema": { - "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" - }, - { - "items": [ - { - "group": "Devices", - "entity": "device", - "_key": "foreign_key" - }, - { - "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" - }, - "account_id": { - "type": "string", - "description": "The ID of the associated account.", - "example": "00000000000000000000000000000000" - }, - "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)\n - 1 - development devices\n - 5 - production devices", - "example": 0 - }, - "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": "string", - "description": "The address of the connector to use.", - "example": "" - }, - "name": { - "type": "string", - "maxLength": 128, - "description": "The name of the device.", - "example": "00000000-0000-0000-0000-000000000000" - }, - "object": { - "type": "string", - "description": "The API resource entity.", - "example": "device" - }, - "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" - ], - "type": "string", - "description": "The current state of the device." - }, - "updated_at": { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "description": "The time the 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" - } - ], + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "total_count", + "has_more", + "data" + ], + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "getGroupsOfAccountApikey", + "foreign_key": { + "entity": "subtenant_policy_group" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "policy_groups" + }, + { + "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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "type": "string", + "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" + } + ], + "method": "get", + "mode": "read", + "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", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "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": "boolean", - "description": "Are there more results available.", - "example": false, - "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", + "parameter_fieldname": "apikey_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "example": "ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000", + "description": "The API key.", + "api_fieldname": "key", + "entity_fieldname": "key", + "_key": "key" }, { "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", + "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", + "parameter_fieldname": "name", + "in": "body", "required": false, - "_key": "limit" + "_key": "name" }, { "type": "string", - "description": "The type of this API object is a \"list\".", - "example": "list", + "description": "Entity name: always 'api-key'", + "enum": [ + "api-key" + ], "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", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", + "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": "order" + "_key": "owner" }, { - "format": "integer", - "type": "integer", - "example": 1, - "api_fieldname": "total_count", - "entity_fieldname": "total_count", - "_key": "total_count" + "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" + }, + { + "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": "Devices", - "entity": "device" + "group": "Accounts", + "entity": "api_key" } }, "_key": "200" }, { - "description": "Bad Request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -37944,10 +63868,83 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Unauthorized.", + "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": "An account or API key with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -37967,60 +63964,343 @@ }, { "type": "array", - "description": "Request fields which failed validation.", + "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}/api-keys/{apikey_id}", + "summary": "Get API key details.", + "return_type": "subtenant_api_key", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_api_key" + }, + "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 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", + "type", + "filter", + "created_at", + "updated_at", + "key", + "name", + "groups", + "owner", + "status", + "creation_time", + "last_login_time" + ], + "group_id": "Accounts", + "parameter_map": { + "apikey_id": "id" + }, + "operation_id": "getAccountApiKey", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "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.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "apikey_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "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": "subtenant_api_key_status_enum", + "_key": "status" + } + ], + "method": "put", + "mode": "update", + "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": "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", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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": "string", - "description": "Entity name, always `error`.", + "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", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "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", + "parameter_fieldname": "owner", + "in": "body", + "required": false, + "_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", + "parameter_fieldname": "status", + "in": "body", + "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", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "description": "Represents an API key in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "api_key" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Not found.", + "description": "Error in input data, for example, invalid API key name.", "schema": { "type": "object", "required": [ @@ -38059,559 +64339,114 @@ "_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/", - "summary": "Get a page of devices", - "return_type": "paginated_response(device)", - "return_info": { - "self": false, - "custom": false, - "type": "device" - }, - "x_filter": { - "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" - ] - }, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "data", - "has_more", - "total_count", - "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" - ], - "group_id": "Devices", - "parameter_map": { - "device-group-id": "id" - }, - "operation_id": "Group_members_retrieve", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "devices" - }, - { - "description": "List all groups.", - "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" + }, + "_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" }, { - "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.", + "description": "Authentication failure.", "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" }, { + "type": "array", + "description": "Request fields which failed validation.", "items": { "type": "object", + "required": [ + "name", + "message" + ], "properties": [ { "type": "string", - "format": "date-time", - "description": "The time the campaign was created.", - "example": "2017-05-22T12:37:55.576563Z", - "_key": "created_at" - }, - { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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" - }, - "_key": "custom_attributes" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "_key": "description" - }, - { - "type": "integer", - "description": "The number of devices in this group.", - "example": 10, - "_key": "devices_count" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "etag" - }, - { - "type": "string", - "description": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "_key": "id" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", + "description": "Name of the field which caused the error.", "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'device-group'.", - "example": "device-group", - "_key": "object" - }, - { - "type": "string", - "format": "date-time", - "description": "The time the object was updated.", - "example": "2017-05-22T12:37:55.576563Z", - "_key": "updated_at" } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_group" - } + ] }, - "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" + "_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 creation time based order of the entries.", - "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_group" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -38681,10 +64516,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "An account ID or API key with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -38757,214 +64592,239 @@ "_key": "404" } ], - "path": "/v3/device-groups/", - "summary": "List all groups.", - "return_type": "paginated_response(device_group)", + "path": "/v3/accounts/{account_id}/api-keys/{apikey_id}", + "summary": "Update API key details.", + "return_type": "subtenant_api_key", "return_info": { "self": true, "custom": false, - "type": "device_group" + "type": "subtenant_api_key" }, - "x_filter": { - "id": [ - "eq", - "neq", - "in", - "nin" - ], - "devices_count": [ - "eq", - "neq", - "in", - "nin", - "lte", - "gte" - ], - "name": [ - "eq", - "neq", - "in", - "nin" - ], - "created_at": [ - "in", - "nin", - "lte", - "gte" - ], - "updated_at": [ - "in", - "nin", - "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/accounts/{account_id}/applications/{application_id}/access-keys/{access_key_id}", + "links": [] }, - "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "data", - "has_more", - "total_count", - "id__eq", - "id__neq", - "id__in", - "id__nin", - "devices_count__eq", - "devices_count__neq", - "devices_count__in", - "devices_count__nin", - "devices_count__lte", - "devices_count__gte", - "name__eq", - "name__neq", - "name__in", - "name__nin", - "created_at__in", - "created_at__nin", - "created_at__lte", - "created_at__gte", - "updated_at__in", - "updated_at__nin", - "updated_at__lte", - "updated_at__gte" + "created_at", + "updated_at", + "key", + "creation_time", + "last_login_time" ], - "foreign_key_priority": "self", - "group_id": "Devices", + "group_id": "Accounts", "parameter_map": { - "device-group-id": "id" - }, - "operation_id": "Group_list", - "pagination": true, - "foreign_key": { - "group": "Devices", - "entity": "device_group" + "apikey_id": "id" }, + "operation_id": "updateAccountApiKey", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "update" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": false, + "required": true, + "_key": "account_id" }, { - "description": "Get a group.", - "field_renames": [], - "fields": [ - { - "type": "string", - "description": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "device-group-id", - "in": "path", - "required": true, - "_key": "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", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "readOnly": false, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571f7020242ac12000600000000", + "description": "The ID of the API key.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "apikey_id", + "in": "path", + "required": true, + "readOnly": false, + "_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", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "readOnly": 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", + "parameter_fieldname": "owner", + "in": "body", + "required": false, + "readOnly": false, + "_key": "owner" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "The status of the API key.", + "enum": [ + "ACTIVE", + "INACTIVE" ], - "method": "get", - "mode": "read", - "responses": [ - { - "description": "Ok.", - "schema": { - "type": "object", - "properties": [ - { - "type": "string", - "format": "date-time", - "description": "The time the campaign was created.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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": "custom_attributes", - "entity_fieldname": "custom_attributes", - "_key": "custom_attributes" - }, - { - "type": "string", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" - }, - { - "type": "integer", - "description": "The number of devices in this group.", - "example": 10, - "api_fieldname": "devices_count", - "entity_fieldname": "devices_count", - "_key": "devices_count" - }, - { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "description": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'device-group'.", - "example": "device-group", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "type": "string", - "format": "date-time", - "description": "The time the object was updated.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - } - ], - "foreign_key": { - "group": "Devices", - "entity": "device_group" - } - }, - "_key": "200" + "api_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "subtenant_api_key_status_enum", + "readOnly": false, + "_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": [ + "Tenant accounts - API keys" + ], + "group_id": "Accounts", + "_key": "subtenant_api_key" + }, + { + "swagger_models": [ + "BrandingColor" + ], + "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/accounts/{account_id}/branding-colors/dark/{reference} \\\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": "account_id", + "api_fieldname": "account_id", + "external_param": true, + "parameter_fieldname": "account_id", + "_key": "account_id" }, { - "description": "Bad request.", + "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", + "in": "path", + "description": "The name of the branding color.", + "required": true, + "enum_reference": "subtenant_dark_theme_color_reference_enum", + "_key": "reference" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -39034,10 +64894,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -39107,10 +64967,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "Color or account not found.", "schema": { "type": "object", "required": [ @@ -39183,13 +65043,13 @@ "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/", - "summary": "Get a group.", - "return_type": "device_group", + "path": "/v3/accounts/{account_id}/branding-colors/dark/{reference}", + "summary": "Reset branding color to default.", + "return_type": "void", "return_info": { - "self": true, - "custom": false, - "type": "device_group" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -39197,64 +65057,157 @@ "object", "etag", "type", - "groups", - "filter", - "name", - "description", - "custom_attributes", - "devices_count", - "created_at", - "updated_at" + "filter" ], - "group_id": "Devices", - "parameter_map": { - "device-group-id": "id" + "group_id": "Branding", + "operation_id": "resetAccountDarkColor", + "spec": { + "return_type": "void" }, - "operation_id": "Group_retrieve", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete" }, { - "description": "Remove one device from a group.", + "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": [ { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, "type": "string", - "example": "00000000000000000000000000000000", - "name": "device_id", - "in": "body", - "schema_param": true, - "entity_fieldname": "device_id", - "api_fieldname": "device_id", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", "external_param": true, - "parameter_fieldname": "device_id", - "required": false, - "_key": "device_id" + "parameter_fieldname": "account_id", + "_key": "account_id" }, { + "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", - "description": "The ID of the group.", - "name": "device-group-id", "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "device-group-id", - "external_param": false, - "parameter_fieldname": "device-group-id", - "_key": "id" + "enum_reference": "subtenant_dark_theme_color_reference_enum", + "_key": "reference" } ], - "method": "post", - "mode": "remove_device", + "method": "get", + "mode": "read", "responses": [ { - "description": "Success - device removed.", - "_key": "204" + "description": "Successful operation.", + "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", + "parameter_fieldname": "color", + "in": "body", + "required": false, + "_key": "color" + }, + { + "type": "string", + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "name": "object", + "in": "body", + "schema_param": true, + "external_param": true, + "parameter_fieldname": "object", + "required": false, + "_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", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "light_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" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "_key": "200" }, { - "description": "Bad Request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -39324,10 +65277,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -39397,10 +65350,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "Color or account not found.", "schema": { "type": "object", "required": [ @@ -39473,13 +65426,13 @@ "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/devices/remove/", - "summary": "Remove a device from a group", - "return_type": "void", + "path": "/v3/accounts/{account_id}/branding-colors/dark/{reference}", + "summary": "Get dark theme branding color.", + "return_type": "subtenant_dark_theme_color", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "subtenant_dark_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -39487,189 +65440,254 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "color", + "updated_at" ], - "group_id": "Devices", - "parameter_map": { - "device-group-id": "id" - }, - "operation_id": "Group_members_remove", - "spec": { - "return_type": "void" - }, + "group_id": "Branding", + "operation_id": "getAccountDarkColor", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "remove_device" + "_key": "read" }, { - "description": "Modify the attributes of a group.", + "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": [ { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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": "custom_attributes", - "entity_fieldname": "custom_attributes", - "name": "custom_attributes", - "in": "body", - "schema_param": true, - "parameter_fieldname": "custom_attributes", - "required": false, - "_key": "custom_attributes" + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, + "parameter_fieldname": "account_id", + "_key": "account_id" }, { "type": "string", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "api_fieldname": "description", - "entity_fieldname": "description", - "name": "description", + "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", - "schema_param": true, - "parameter_fieldname": "description", "required": false, - "_key": "description" + "_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": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "device-group-id", + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", "in": "path", "required": true, - "_key": "id" + "enum_reference": "subtenant_dark_theme_color_reference_enum", + "_key": "reference" }, { "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", - "api_fieldname": "name", - "entity_fieldname": "name", - "name": "name", + "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", - "schema_param": true, - "parameter_fieldname": "name", "required": false, - "_key": "name" + "_key": "updated_at" } ], "method": "put", "mode": "update", "responses": [ { - "description": "Ok.", + "description": "Color has been set successfully.", "schema": { "type": "object", "properties": [ { "type": "string", - "format": "date-time", - "description": "The time the campaign was created.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "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" }, { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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": "custom_attributes", - "entity_fieldname": "custom_attributes", - "_key": "custom_attributes" + "type": "string", + "description": "Entity name: always 'branding_color'", + "readOnly": true, + "enum": [ + "branding_color" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "name": "object", + "in": "body", + "schema_param": true, + "external_param": true, + "parameter_fieldname": "object", + "required": false, + "_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", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "light_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" + } + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_light_theme_color" + } + }, + "_key": "200" + }, + { + "description": "Error in input data format.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "type": "integer", - "description": "The number of devices in this group.", - "example": 10, - "api_fieldname": "devices_count", - "entity_fieldname": "devices_count", - "_key": "devices_count" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "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": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "Entity name: always 'device-group'.", - "example": "device-group", - "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 object 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": "Devices", - "entity": "device_group" - } + ] }, - "_key": "200" + "_key": "400" }, { - "description": "Bad Request.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -39739,10 +65757,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Unauthorized.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -39812,10 +65830,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Not Found.", + "description": "Color or account not found.", "schema": { "type": "object", "required": [ @@ -39888,13 +65906,13 @@ "_key": "404" } ], - "path": "/v3/device-groups/{device-group-id}/", - "summary": "Modify the attributes of a group.", - "return_type": "device_group", + "path": "/v3/accounts/{account_id}/branding-colors/dark/{reference}", + "summary": "Updates a dark theme branding color.", + "return_type": "subtenant_dark_theme_color", "return_info": { "self": true, "custom": false, - "type": "device_group" + "type": "subtenant_dark_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -39902,17 +65920,16 @@ "object", "etag", "type", - "groups", - "filter", - "devices_count", - "created_at", - "updated_at" + "filter" + ], + "group_id": "Branding", + "operation_id": "setAccountDarkColor", + "additional_operations": [ + { + "operation_id": "bulkSetAccountDarkColors", + "notes": "Bulk operation is not appriate for SDK's entity model, this functionality is covered by the update method." + } ], - "group_id": "Devices", - "parameter_map": { - "device-group-id": "id" - }, - "operation_id": "Group_update", "pagination": false, "request_content_type": "application/json", "request_body": "json", @@ -39922,873 +65939,787 @@ "fields": [ { "type": "string", - "format": "date-time", - "description": "The time the campaign was created.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "readOnly": true, + "example": "#f3f93e", + "description": "The color given as name (purple) or as a hex code.", + "x-nullable": true, + "api_fieldname": "color", + "parameter_fieldname": "color", + "in": "body", "required": false, - "_key": "created_at" - }, - { - "type": "object", - "maxProperties": 10, - "additionalProperties": { - "type": "string", - "maxLength": 128, - "pattern": "^[A-Za-z].*" - }, - "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": "custom_attributes", "readOnly": false, - "required": false, - "_key": "custom_attributes" + "_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", - "maxLength": 2000, - "description": "The description of the group.", - "example": "Devices on the factory floor.", - "api_fieldname": "description", - "readOnly": false, - "required": false, - "_key": "description" - }, - { - "type": "integer", - "description": "The number of devices in this group.", - "example": 10, - "api_fieldname": "devices_count", - "readOnly": true, + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "name": "reference", + "in": "path", "required": false, - "_key": "devices_count" - }, - { - "type": "string", - "description": "The group ID.", - "example": "015c3029f6f7000000000001001000c3", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "type": "string", - "maxLength": 128, - "description": "Name of the group.", - "example": "My devices", - "api_fieldname": "name", + "enum_reference": "subtenant_dark_theme_color_reference_enum", "readOnly": false, - "required": false, - "_key": "name" + "_key": "reference" }, { "type": "string", "format": "date-time", - "description": "The time the object was updated.", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "updated_at", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", "readOnly": true, + "api_fieldname": "updated_at", + "parameter_fieldname": "updated_at", + "in": "body", "required": false, "_key": "updated_at" } ], "field_renames": [], - "tags": [], - "group_id": "Devices", - "_key": "device_group" + "tags": [ + "Tenant user interface configuration - colors" + ], + "group_id": "Branding", + "_key": "subtenant_dark_theme_color" }, { "swagger_models": [ - "FirmwareImage", - "FirmwareImagePage" + "BrandingImage" ], - "primary_key_field": "id", + "primary_key_field": "reference", "methods": [ { - "description": "Create a firmware image.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - } - ], - "fields": [ - { - "description": "The description of the object", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "stream", - "required": false, - "_key": "description" - }, - { - "description": "The firmware image file to upload", - "in": "stream", - "name": "datafile", - "required": true, - "type": "file", - "entity_fieldname": "firmware_image_file", - "api_fieldname": "datafile", - "external_param": true, - "parameter_fieldname": "datafile", - "_key": "firmware_image_file" - }, - { - "description": "The firmware image name", - "type": "string", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "stream", - "required": false, - "_key": "name" - } - ], - "method": "post", - "mode": "create", - "responses": [ - { - "description": "Firmware image created. The API gateway enforces the account-specific file size.", - "schema": { - "properties": [ - { - "description": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" - }, - { - "description": "The firmware image file URL", - "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "datafile", - "entity_fieldname": "datafile_url", - "_key": "datafile" - }, - { - "description": "The checksum (sha256) generated for the datafile", - "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "datafile_checksum", - "entity_fieldname": "datafile_checksum", - "_key": "datafile_checksum" - }, - { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "api_fieldname": "datafile_size", - "entity_fieldname": "datafile_size", - "_key": "datafile_size" - }, - { - "description": "The description of the object", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" - }, - { - "description": "The entity instance signature", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "description": "The firmware image ID", - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "description": "The firmware image name", - "type": "string", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" - }, - { - "description": "The API resource entity", - "type": "string", - "example": "firmware-image", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" - }, - { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" - } - ], - "required": [ - "created_at", - "datafile", - "datafile_checksum", - "description", - "etag", - "id", - "name", - "object", - "updated_at" - ], - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_image" - } - }, - "_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.", - "_key": "413" - } - ], - "path": "/v3/firmware-images/", - "summary": "Create an image", - "return_type": "firmware_image", - "return_info": { - "self": true, - "custom": false, - "type": "firmware_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at", - "datafile_checksum", - "datafile_size", - "id", - "updated_at", - "datafile_url" - ], - "group_id": "Device_Update", - "parameter_map": { - "image_id": "id", - "datafile": "firmware_image_file" - }, - "operation_id": "Firmware_Image_create", - "notes": "This is not a standard create method as it uploads a file which creates an entity which contains URIs to the uploaded file.", - "unaggregated": true, - "pagination": false, - "request_content_type": "multipart/form-data", - "request_body": "file", - "_key": "create" - }, - { - "description": "Delete a firmware image.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - } - ], + "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": [ { - "description": "The firmware image ID", + "name": "account_id", "in": "path", - "name": "image_id", + "description": "The ID of the account.", "required": true, "type": "string", - "entity_fieldname": "id", - "api_fieldname": "image_id", - "external_param": false, - "parameter_fieldname": "image_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Firmware image deleted", - "_key": "204" - }, - { - "description": "Bad Request", - "_key": "400" - }, - { - "description": "Not authenticated", - "_key": "401" - }, - { - "description": "Firmware image not found", - "_key": "404" - } - ], - "path": "/v3/firmware-images/{image_id}/", - "summary": "Delete an image", - "return_type": "firmware_image", - "return_info": { - "self": true, - "custom": false, - "type": "firmware_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Device_Update", - "parameter_map": { - "image_id": "id" - }, - "operation_id": "Firmware_Image_destroy", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "description": "List all firmware images.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - } - ], - "fields": [ - { - "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "description": "The ID of the the item after which to retrieve the next page", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, - { - "description": "A 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" - }, - { - "format": "int32", - "type": "integer", - "api_fieldname": "limit", - "entity_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.", - "in": "query", - "name": "limit", - "minimum": 2, - "maximum": 1000, + "entity_fieldname": "account_id", + "api_fieldname": "account_id", "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" + "parameter_fieldname": "account_id", + "_key": "account_id" }, { + "is_primary_key": true, + "_override": true, "type": "string", + "api_fieldname": "reference", + "entity_fieldname": "reference", "enum": [ - "ASC", - "DESC" + "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" ], - "description": "ASC or DESC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "enum_reference": "firmware_image_order_enum", - "_key": "order" + "name": "reference", + "in": "path", + "description": "Name of the branding images (icon or picture).", + "required": true, + "enum_reference": "subtenant_dark_theme_image_reference_enum", + "_key": "reference" } ], - "method": "get", - "mode": "list", + "method": "post", + "mode": "delete", "responses": [ { - "description": "Request successful", + "description": "Image reverted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "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": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "created_at" - }, - { - "description": "The firmware image file URL", - "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "_key": "datafile" - }, - { - "description": "The checksum (sha256) generated for the datafile", - "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "_key": "datafile_checksum" - }, - { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "_key": "datafile_size" - }, - { - "description": "The description of the object", "type": "string", - "maxLength": 2000, - "example": "", - "_key": "description" + "description": "Message describing the error condition.", + "_key": "message" }, { - "description": "The entity instance signature", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "_key": "etag" - }, + "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": [ { - "description": "The firmware image ID", "type": "string", - "example": "00000000000000000000000000000000", - "_key": "id" + "description": "Message describing the error condition.", + "_key": "message" }, { - "description": "The firmware image name", "type": "string", - "maxLength": 128, - "example": "", + "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": "Unknown image reference, or 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": [ { - "description": "The API resource entity", "type": "string", - "example": "firmware-image", - "_key": "object" + "description": "Message describing the error condition.", + "_key": "message" }, { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "_key": "updated_at" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "required": [ - "created_at", - "datafile", - "datafile_checksum", - "description", - "etag", - "id", - "name", - "object", - "updated_at" - ], - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_image" - } + ] }, - "type": "array", - "example": "[]", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "_key": "fields" }, { - "format": "int32", - "type": "integer", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "format": "int32", - "type": "integer", - "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": "Device_Update", - "entity": "firmware_image" - } + ] }, - "_key": "200" - }, - { - "description": "Bad Request", - "_key": "400" - }, - { - "description": "Not authenticated", - "_key": "401" - }, - { - "description": "Unable to find content", "_key": "404" } ], - "path": "/v3/firmware-images/", - "summary": "List all images", - "return_type": "paginated_response(firmware_image)", + "path": "/v3/accounts/{account_id}/branding-images/dark/{reference}/clear", + "summary": "Revert an image to dark theme default.", + "return_type": "subtenant_dark_theme_image", "return_info": { "self": true, "custom": false, - "type": "firmware_image" - }, - "x_filter": { - "created_at": [ - "in", - "nin", - "lte", - "gte" - ], - "datafile_url": [ - "eq", - "neq", - "in", - "nin" - ], - "datafile_checksum": [ - "eq", - "neq", - "in", - "nin" - ], - "datafile_size": [ - "eq", - "neq", - "in", - "nin" - ], - "description": [ - "eq", - "neq", - "in", - "nin" - ], - "id": [ - "eq", - "neq", - "in", - "nin" - ], - "name": [ - "eq", - "neq", - "in", - "nin" - ], - "updated_at": [ - "in", - "nin", - "lte", - "gte" - ] + "type": "subtenant_dark_theme_image" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", - "filter", - "data", - "has_more", - "total_count", - "created_at__in", - "created_at__nin", - "created_at__lte", - "created_at__gte", - "datafile__eq", - "datafile__neq", - "datafile__in", - "datafile__nin", - "datafile_checksum__eq", - "datafile_checksum__neq", - "datafile_checksum__in", - "datafile_checksum__nin", - "datafile_size__eq", - "datafile_size__neq", - "datafile_size__in", - "datafile_size__nin", - "description__eq", - "description__neq", - "description__in", - "description__nin", - "id__eq", - "id__neq", - "id__in", - "id__nin", - "name__eq", - "name__neq", - "name__in", - "name__nin", - "updated_at__in", - "updated_at__nin", - "updated_at__lte", - "updated_at__gte" + "filter" ], - "foreign_key_priority": "self", - "group_id": "Device_Update", - "parameter_map": { - "image_id": "id" - }, - "operation_id": "Firmware_Image_list", - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_image" - }, + "group_id": "Branding", + "operation_id": "clearAccountDarkImage", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "delete" }, { - "description": "Retrieve a firmware image.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - } - ], + "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": [ { - "description": "The firmware image ID", + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "image_id", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "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", + "name": "reference", "in": "path", "required": true, - "_key": "id" + "enum_reference": "subtenant_dark_theme_image_reference_enum", + "_key": "reference" } ], "method": "get", "mode": "read", "responses": [ { - "description": "Retrieved result successfully", + "description": "Successful operation.", "schema": { + "type": "object", "properties": [ { - "description": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "Entity name: always 'branding_image'", + "readOnly": true, + "enum": [ + "branding_image" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { - "description": "The firmware image file URL", + "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", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "datafile", - "entity_fieldname": "datafile_url", - "_key": "datafile" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "light_theme_image_reference_enum", + "_key": "reference" }, { - "description": "The checksum (sha256) generated for the datafile", "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "datafile_checksum", - "entity_fieldname": "datafile_checksum", - "_key": "datafile_checksum" + "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" }, { - "description": "The size of the datafile in bytes", - "format": "int64", + "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", + "object", + "request_id", + "type" + ], + "properties": [ + { "type": "integer", - "api_fieldname": "datafile_size", - "entity_fieldname": "datafile_size", - "_key": "datafile_size" + "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" }, { - "description": "The description of the object", "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { - "description": "The entity instance signature", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "description": "The firmware image ID", "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "description": "The firmware image name", "type": "string", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "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" }, { - "description": "The API resource entity", "type": "string", - "example": "firmware-image", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" + }, + { + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "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" } - ], + ] + }, + "_key": "403" + }, + { + "description": "Unknown image reference, or account not found.", + "schema": { + "type": "object", "required": [ - "created_at", - "datafile", - "datafile_checksum", - "description", - "etag", - "id", - "name", + "code", + "message", "object", - "updated_at" + "request_id", + "type" ], - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_image" - } + "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": "Bad Request", - "_key": "400" - }, - { - "description": "Not authenticated", - "_key": "401" - }, - { - "description": "Firmware image can't be found", "_key": "404" } ], - "path": "/v3/firmware-images/{image_id}/", - "summary": "Get an image", - "return_type": "firmware_image", + "path": "/v3/accounts/{account_id}/branding-images/dark/{reference}", + "summary": "Get metadata of a dark theme image.", + "return_type": "subtenant_dark_theme_image", "return_info": { "self": true, "custom": false, - "type": "firmware_image" + "type": "subtenant_dark_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -40796,1266 +66727,1442 @@ "object", "etag", "type", - "groups", "filter", - "created_at", - "datafile_checksum", - "datafile_size", - "description", - "name", - "updated_at", - "datafile_url" + "static_uri", + "updated_at" ], - "group_id": "Device_Update", - "parameter_map": { - "image_id": "id" - }, - "operation_id": "Firmware_Image_retrieve", + "group_id": "Branding", + "operation_id": "getAccountDarkImageData", "pagination": false, "request_content_type": "application/json", "request_body": "json", "_key": "read" - } - ], - "fields": [ - { - "description": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "description": "The checksum (sha256) generated for the datafile", - "type": "string", - "example": "0000000000000000000000000000000000000000000000000000000000000000", - "api_fieldname": "datafile_checksum", - "readOnly": true, - "required": false, - "_key": "datafile_checksum" - }, - { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "api_fieldname": "datafile_size", - "readOnly": true, - "required": false, - "_key": "datafile_size" - }, - { - "description": "The firmware image file URL", - "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "datafile", - "readOnly": true, - "required": false, - "_key": "datafile_url" - }, - { - "description": "The description of the object", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "readOnly": false, - "required": false, - "_key": "description" - }, - { - "description": "The firmware image ID", - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "description": "The firmware image name", - "type": "string", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "readOnly": false, - "required": false, - "_key": "name" }, { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - } - ], - "tags": [], - "group_id": "Device_Update", - "_key": "firmware_image" - }, - { - "swagger_models": [ - "FirmwareManifest", - "FirmwareManifestPage" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "Upload a firmware manifest. The API enforces a maximum size of manifests of 2 KB.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - }, - { - "api_fieldname": "key_table", - "_key": "key_table_url" - } - ], + "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": [ { - "description": "The description of the firmware manifest", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "stream", - "required": false, - "_key": "description" - }, - { - "description": "The manifest file to create. The API gateway enforces the account-specific file size.", - "in": "stream", - "name": "datafile", + "name": "account_id", + "in": "path", + "description": "The ID of the account.", "required": true, - "type": "file", - "entity_fieldname": "firmware_manifest_file", - "api_fieldname": "datafile", + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", "external_param": true, - "parameter_fieldname": "datafile", - "_key": "firmware_manifest_file" + "parameter_fieldname": "account_id", + "_key": "account_id" }, { - "description": "The key table of pre-shared keys for devices", "in": "stream", - "name": "key_table", - "required": false, + "name": "image", + "description": "The image in PNG or JPEG format as multipart form data.", + "required": true, "type": "file", - "entity_fieldname": "key_table_file", - "api_fieldname": "key_table", + "entity_fieldname": "image", + "api_fieldname": "image", "external_param": true, - "parameter_fieldname": "key_table", - "_key": "key_table_file" + "parameter_fieldname": "image", + "_key": "image" }, { - "description": "The name of the 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", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "stream", - "required": false, - "_key": "name" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "subtenant_dark_theme_image_reference_enum", + "_key": "reference" } ], "method": "post", - "mode": "create", + "mode": "update", "responses": [ { - "description": "Created", + "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": [ { - "description": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "Entity name: always 'branding_image'", + "readOnly": true, + "enum": [ + "branding_image" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { - "description": "The URL of the firmware manifest binary", + "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", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "datafile", - "entity_fieldname": "datafile_url", - "_key": "datafile" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "light_theme_image_reference_enum", + "_key": "reference" }, { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "api_fieldname": "datafile_size", - "entity_fieldname": "datafile_size", - "_key": "datafile_size" + "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" }, { - "description": "The description of the firmware manifest", "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" + "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": "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" }, { - "description": "The class of the device", "type": "string", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "device_class", - "entity_fieldname": "device_class", - "_key": "device_class" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { - "description": "The entity instance signature", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "description": "The firmware manifest ID", "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "description": "The key table of pre-shared keys for devices", "type": "string", - "format": "uri", - "example": "http://example.com", - "api_fieldname": "key_table", - "entity_fieldname": "key_table_url", - "_key": "key_table" + "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" }, { - "description": "The name of the object", "type": "string", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { - "description": "The API resource entity", "type": "string", - "example": "firmware-manifest", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { - "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": "timestamp" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "required": [ - "created_at", - "datafile", - "description", - "device_class", - "etag", - "id", - "name", - "object", - "timestamp", - "updated_at" - ], - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_manifest" - } + ] }, - "_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", - "_key": "403" - } - ], - "path": "/v3/firmware-manifests/", - "summary": "Upload a manifest", - "return_type": "firmware_manifest", - "return_info": { - "self": true, - "custom": false, - "type": "firmware_manifest" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at", - "datafile_size", - "device_class", - "id", - "timestamp", - "updated_at", - "datafile_url", - "key_table_url" - ], - "group_id": "Device_Update", - "parameter_map": { - "manifest_id": "id", - "datafile": "firmware_manifest_file", - "key_table": "key_table_file" - }, - "operation_id": "Firmware_Manifest_create", - "notes": "This is not a standard create method as it uploads a file (or files) which creates an entity which contains URIs to the uploaded file(s).", - "unaggregated": true, - "pagination": false, - "request_content_type": "multipart/form-data", - "request_body": "file", - "_key": "create" - }, - { - "description": "Delete a firmware manifest.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - }, - { - "api_fieldname": "key_table", - "_key": "key_table_url" - } - ], - "fields": [ - { - "description": "The firmware manifest ID", - "in": "path", - "name": "manifest_id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "manifest_id", - "external_param": false, - "parameter_fieldname": "manifest_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Firmware manifest deleted", - "_key": "204" - }, - { - "description": "Bad Request", - "_key": "400" - }, - { - "description": "Not authenticated", "_key": "401" }, { - "description": "Firmware manifest not found", - "_key": "404" - } - ], - "path": "/v3/firmware-manifests/{manifest_id}/", - "summary": "Delete a manifest", - "return_type": "firmware_manifest", - "return_info": { - "self": true, - "custom": false, - "type": "firmware_manifest" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Device_Update", - "parameter_map": { - "manifest_id": "id" - }, - "operation_id": "Firmware_Manifest_destroy", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "description": "List firmware manifests.", - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - }, - { - "api_fieldname": "key_table", - "_key": "key_table_url" - } - ], - "fields": [ - { - "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "description": "The ID of the the item after which to retrieve the next page", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, - { - "description": "A 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" - }, - { - "format": "int32", - "type": "integer", - "api_fieldname": "limit", - "entity_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.", - "in": "query", - "name": "limit", - "minimum": 2, - "maximum": 1000, - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" - }, - { - "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "description": "ASC or DESC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "enum_reference": "firmware_manifest_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "list", - "responses": [ - { - "description": "Request successful", + "description": "Forbidden.", "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "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": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "created_at" - }, - { - "description": "The URL of the firmware manifest binary", - "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "_key": "datafile" - }, - { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "_key": "datafile_size" - }, - { - "description": "The description of the firmware manifest", - "type": "string", - "maxLength": 2000, - "example": "", - "_key": "description" - }, - { - "description": "The class of the device", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000", - "_key": "device_class" - }, - { - "description": "The entity instance signature", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "_key": "etag" - }, - { - "description": "The firmware manifest ID", - "type": "string", - "example": "00000000000000000000000000000000", - "_key": "id" - }, - { - "description": "The key table of pre-shared keys for devices", "type": "string", - "format": "uri", - "example": "http://example.com", - "_key": "key_table" + "description": "Message describing the error condition.", + "_key": "message" }, { - "description": "The name of the object", "type": "string", - "maxLength": 128, - "example": "", + "description": "Name of the field which caused the error.", "_key": "name" - }, - { - "description": "The API resource entity", - "type": "string", - "example": "firmware-manifest", - "_key": "object" - }, + } + ] + }, + "_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": "Unknown image reference.", + "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": "The firmware manifest version as a timestamp", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "_key": "timestamp" + "description": "Message describing the error condition.", + "_key": "message" }, { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "_key": "updated_at" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "required": [ - "created_at", - "datafile", - "description", - "device_class", - "etag", - "id", - "name", - "object", - "timestamp", - "updated_at" - ], - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_manifest" - } + ] }, - "type": "array", - "example": "[]", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" - }, - { - "type": "boolean", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "_key": "fields" }, { - "format": "int32", - "type": "integer", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "format": "int32", - "type": "integer", - "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": "Device_Update", - "entity": "firmware_manifest" - } + ] }, - "_key": "200" - }, - { - "description": "Bad Request", - "_key": "400" - }, - { - "description": "Not authenticated", - "_key": "401" - }, - { - "description": "Unable to find content", "_key": "404" } ], - "path": "/v3/firmware-manifests/", - "summary": "List manifests", - "return_type": "paginated_response(firmware_manifest)", + "path": "/v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart", + "summary": "Upload a dark theme image.", + "return_type": "subtenant_dark_theme_image", "return_info": { "self": true, "custom": false, - "type": "firmware_manifest" - }, - "x_filter": { - "created_at": [ - "in", - "nin", - "lte", - "gte" - ], - "datafile_url": [ - "eq", - "neq", - "in", - "nin" - ], - "datafile_size": [ - "eq", - "neq", - "in", - "nin" - ], - "description": [ - "eq", - "neq", - "in", - "nin" - ], - "device_class": [ - "eq", - "neq", - "in", - "nin" - ], - "id": [ - "eq", - "neq", - "in", - "nin" - ], - "name": [ - "eq", - "neq", - "in", - "nin" - ], - "timestamp": [ - "in", - "nin", - "lte", - "gte" - ], - "updated_at": [ - "in", - "nin", - "lte", - "gte" - ] + "type": "subtenant_dark_theme_image" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "data", - "has_more", - "total_count", - "created_at__in", - "created_at__nin", - "created_at__lte", - "created_at__gte", - "datafile__eq", - "datafile__neq", - "datafile__in", - "datafile__nin", - "datafile_size__eq", - "datafile_size__neq", - "datafile_size__in", - "datafile_size__nin", - "description__eq", - "description__neq", - "description__in", - "description__nin", - "device_class__eq", - "device_class__neq", - "device_class__in", - "device_class__nin", - "id__eq", - "id__neq", - "id__in", - "id__nin", - "name__eq", - "name__neq", - "name__in", - "name__nin", - "timestamp__in", - "timestamp__nin", - "timestamp__lte", - "timestamp__gte", - "updated_at__in", - "updated_at__nin", - "updated_at__lte", - "updated_at__gte" + "static_uri", + "updated_at" ], - "foreign_key_priority": "self", - "group_id": "Device_Update", - "parameter_map": { - "manifest_id": "id" - }, - "operation_id": "Firmware_Manifest_list", - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "firmware_manifest" - }, - "request_content_type": "application/json", - "request_body": "json", - "_key": "list" + "group_id": "Branding", + "operation_id": "uploadAccountDarkImageMultipart", + "additional_operations": [ + { + "operation_id": "uploadAccountDarkImage", + "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", + "name": "reference", + "in": "path", + "required": false, + "enum_reference": "subtenant_dark_theme_image_reference_enum", + "readOnly": false, + "_key": "reference" }, { - "description": "Retrieve a firmware manifest.", - "field_renames": [ + "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": [ + "Tenant user interface configuration - images" + ], + "group_id": "Branding", + "_key": "subtenant_dark_theme_image" + }, + { + "swagger_models": [ + "CertificateGenerationReq", + "IdentityProviderCreationReq", + "IdentityProviderInfo", + "IdentityProviderList", + "IdentityProviderUpdateReq" + ], + "primary_key_field": "id", + "methods": [ + { + "description": "Create a new identity provider.\nNote: This endpoint is restricted to administrators.", + "field_renames": [], + "fields": [ { - "api_fieldname": "datafile", - "_key": "datafile_url" + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "type": "string", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "in": "query", + "name": "discovery", + "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", + "type": "boolean", + "allowEmptyValue": true, + "entity_fieldname": "discovery", + "api_fieldname": "discovery", + "external_param": true, + "parameter_fieldname": "discovery", + "required": false, + "_key": "discovery" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "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", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" }, { - "api_fieldname": "key_table", - "_key": "key_table_url" - } - ], - "fields": [ + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" + }, { - "description": "The firmware manifest ID", "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "manifest_id", - "in": "path", - "required": true, - "_key": "id" + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "subtenant_identity_provider_status_enum", + "_key": "status" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "Retrieved result successfully", + "description": "New entity created.", + "headers": [ + { + "type": "string", + "description": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "_key": "Content-Location" + }, + { + "type": "string", + "description": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "_key": "Location" + } + ], "schema": { + "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "properties": [ { - "description": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { - "description": "The URL of the firmware manifest binary", "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "datafile", - "entity_fieldname": "datafile_url", - "_key": "datafile" - }, - { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "api_fieldname": "datafile_size", - "entity_fieldname": "datafile_size", - "_key": "datafile_size" + "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": "The description of the firmware manifest", "type": "string", - "maxLength": 2000, - "example": "", + "maxLength": 500, + "description": "Description for the identity provider.", "api_fieldname": "description", "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, "_key": "description" }, { - "description": "The class of the device", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "device_class", - "entity_fieldname": "device_class", - "_key": "device_class" - }, - { - "description": "The entity instance signature", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "type": "string", + "example": "1", + "description": "API resource entity version.", "api_fieldname": "etag", "entity_fieldname": "etag", "_key": "etag" }, { - "description": "The firmware manifest ID", "type": "string", - "example": "00000000000000000000000000000000", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, "_key": "id" }, { - "description": "The key table of pre-shared keys for devices", - "type": "string", - "format": "uri", - "example": "http://example.com", - "api_fieldname": "key_table", - "entity_fieldname": "key_table_url", - "_key": "key_table" + "type": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" }, { - "description": "The name of the object", "type": "string", - "maxLength": 128, - "example": "", + "maxLength": 100, + "description": "Name of the identity provider.", "api_fieldname": "name", "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, "_key": "name" }, { - "description": "The API resource entity", "type": "string", - "example": "firmware-manifest", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { - "description": "The firmware manifest version as a timestamp", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" + }, + { "type": "string", - "api_fieldname": "timestamp", - "entity_fieldname": "timestamp", - "_key": "timestamp" + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "identity_provider_status_enum", + "_key": "status" + }, + { + "type": "string", + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "type" }, { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", "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" } ], - "required": [ - "created_at", - "datafile", - "description", - "device_class", - "etag", - "id", - "name", - "object", - "timestamp", - "updated_at" - ], "foreign_key": { - "group": "Device_Update", - "entity": "firmware_manifest" + "group": "Accounts", + "entity": "identity_provider" } - }, - "_key": "200" - }, - { - "description": "Bad request", - "_key": "400" - }, - { - "description": "Not authenticated", - "_key": "401" - }, - { - "description": "Firmware manifest can't be found", - "_key": "404" - } - ], - "path": "/v3/firmware-manifests/{manifest_id}/", - "summary": "Get a manifest", - "return_type": "firmware_manifest", - "return_info": { - "self": true, - "custom": false, - "type": "firmware_manifest" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at", - "datafile_size", - "description", - "device_class", - "name", - "timestamp", - "updated_at", - "datafile_url", - "key_table_url" - ], - "group_id": "Device_Update", - "parameter_map": { - "manifest_id": "id" - }, - "operation_id": "Firmware_Manifest_retrieve", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "description": "The time the object was created", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "description": "The size of the datafile in bytes", - "format": "int64", - "type": "integer", - "api_fieldname": "datafile_size", - "readOnly": true, - "required": false, - "_key": "datafile_size" - }, - { - "description": "The URL of the firmware manifest binary", - "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "datafile", - "readOnly": true, - "required": false, - "_key": "datafile_url" - }, - { - "description": "The description of the firmware manifest", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "readOnly": false, - "required": false, - "_key": "description" - }, - { - "description": "The class of the device", - "type": "string", - "example": "00000000-0000-0000-0000-000000000000", - "api_fieldname": "device_class", - "readOnly": true, - "required": false, - "_key": "device_class" - }, - { - "description": "The firmware manifest ID", - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "description": "The key table of pre-shared keys for devices", - "type": "string", - "format": "uri", - "example": "http://example.com", - "api_fieldname": "key_table", - "readOnly": true, - "required": false, - "_key": "key_table_url" - }, - { - "description": "The name of the object", - "type": "string", - "maxLength": 128, - "example": "", - "api_fieldname": "name", - "readOnly": false, - "required": false, - "_key": "name" - }, - { - "description": "The firmware manifest version as a timestamp", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "timestamp", - "readOnly": true, - "required": false, - "_key": "timestamp" - }, - { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "updated_at", - "readOnly": true, - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [ - { - "api_fieldname": "datafile", - "_key": "datafile_url" - }, - { - "api_fieldname": "key_table", - "_key": "key_table_url" - } - ], - "tags": [], - "group_id": "Device_Update", - "_key": "firmware_manifest" - }, - { - "swagger_models": [ - "BrandingColor", - "BrandingColorList" - ], - "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```", - "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": "light_theme_color_reference_enum", - "_key": "reference" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ + }, + "_key": "201" + }, { - "description": "Successful operation.", + "description": "Error in input data, for example, too long name.", "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": "#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": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, + "description": "Entity name, always `error`.", "enum": [ - "branding_color" + "error" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, "_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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" - } + ] }, - "_key": "200" + "_key": "400" }, { "description": "Authentication failure.", @@ -42204,7 +68311,7 @@ "_key": "403" }, { - "description": "Color not found.", + "description": "Account not found.", "schema": { "type": "object", "required": [ @@ -42277,13 +68384,13 @@ "_key": "404" } ], - "path": "/v3/branding-colors/light/{reference}", - "summary": "Reset branding color to default.", - "return_type": "void", + "path": "/v3/accounts/{account_id}/identity-providers", + "summary": "Create a new identity provider.", + "return_type": "subtenant_identity_provider", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -42291,181 +68398,133 @@ "object", "etag", "type", - "groups", "filter", - "color", - "updated_at" + "id", + "created_at", + "updated_at", + "is_default" ], - "group_id": "Branding", - "operation_id": "resetLightColor", - "spec": { - "return_type": "void" + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" }, + "operation_id": "createAccountIdentityProvider", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "create" }, { - "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": "Delete an identity provider by ID.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { - "is_primary_key": true, - "_override": true, + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "name": "identity_provider_id", + "in": "path", + "description": "The ID of the identity provider to delete.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "identity_provider_id", + "external_param": false, + "parameter_fieldname": "identity_provider_id", + "_key": "id" } ], - "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", - "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": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, - "_key": "updated_at" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "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": "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": "light_theme_color" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden, or identity provider is in use.", "schema": { "type": "object", "required": [ @@ -42535,10 +68594,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -42608,16 +68667,16 @@ } ] }, - "_key": "403" + "_key": "404" } ], - "path": "/v3/branding-colors/light", - "summary": "Get light theme branding colors.", - "return_type": "paginated_response(light_theme_color)", + "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "summary": "Delete an identity provider by ID.", + "return_type": "subtenant_identity_provider", "return_info": { "self": true, "custom": false, - "type": "light_theme_color" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -42625,148 +68684,454 @@ "object", "etag", "type", - "groups", - "filter", - "limit", - "after", - "order", - "total_count", - "has_more", - "data" + "filter" ], - "foreign_key_priority": "self", - "group_id": "Branding", - "operation_id": "getLightColors", - "pagination": true, - "foreign_key": { - "group": "Branding", - "entity": "light_theme_color" + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" }, + "operation_id": "deleteAccountIdentityProvider", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_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/branding-colors/light/{reference} \\\n-H 'Authorization: Bearer '\n```", + "description": "Delete a service provider certificate.\nNote: This endpoint is restricted to administrators.", "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", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", "in": "path", "required": true, - "enum_reference": "light_theme_color_reference_enum", - "_key": "reference" + "_key": "account_id" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "delete_service_provider_certificate", "responses": [ { "description": "Successful operation.", + "headers": [ + { + "type": "string", + "description": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "_key": "Content-Location" + } + ], "schema": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "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", - "parameter_fieldname": "color", + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "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", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "api_fieldname": "object", + "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", "in": "body", "required": false, - "_key": "color" + "_key": "saml2_attributes" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, + "description": "Status of the identity provider.", "enum": [ - "branding_color" + "ACTIVE", + "SUSPENDED" ], - "api_fieldname": "object", - "entity_fieldname": "object", - "name": "object", + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", "required": false, - "_key": "object" + "enum_reference": "identity_provider_status_enum", + "_key": "status" }, { + "type": "string", + "description": "Identity provider type.", "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" + "NATIVE", + "MBED", + "SAML2", + "OIDC" ], - "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", + "api_fieldname": "type", + "entity_fieldname": "type", + "parameter_fieldname": "type", + "in": "body", "required": true, - "enum_reference": "dark_theme_color_reference_enum", - "_key": "reference" + "enum_reference": "identity_provider_type_enum", + "_key": "type" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Last update UTC time RFC3339.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, "_key": "updated_at" } ], "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" + "group": "Accounts", + "entity": "identity_provider" } }, "_key": "200" @@ -42918,7 +69283,7 @@ "_key": "403" }, { - "description": "Color not found.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -42991,13 +69356,13 @@ "_key": "404" } ], - "path": "/v3/branding-colors/light/{reference}", - "summary": "Get light theme branding color.", - "return_type": "light_theme_color", + "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate", + "summary": "Delete the service provider certificate.", + "return_type": "subtenant_identity_provider", "return_info": { "self": true, "custom": false, - "type": "light_theme_color" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -43005,389 +69370,508 @@ "object", "etag", "type", - "groups", "filter", - "color", - "updated_at" + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "is_default" ], - "group_id": "Branding", - "operation_id": "getLightColor", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "deleteAccountSpCertificate", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete_service_provider_certificate" }, { - "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": "Generate a new service provider certificate.\nNote: This endpoint is restricted to administrators.", "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" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" }, { + "type": "string", + "description": "The algorithm and its key size used for generating the certificate. Defaults to RSA2048.", "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" + "RSA2048", + "RSA3072", + "EC224", + "EC256", + "EC384", + "EC521", + "ECDSA224", + "ECDSA256", + "ECDSA384", + "ECDSA521" ], + "name": "algorithm", + "in": "body", + "schema_param": true, + "entity_fieldname": "algorithm", + "api_fieldname": "algorithm", + "external_param": true, + "parameter_fieldname": "algorithm", + "required": false, + "enum_reference": "subtenant_identity_provider_algorithm_enum", + "_key": "algorithm" + }, + { "type": "string", - "description": "Color name.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", "in": "path", "required": true, - "enum_reference": "light_theme_color_reference_enum", - "_key": "reference" + "_key": "id" }, { - "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", + "type": "integer", + "format": "int32", + "description": "Validity for the certificate in days.", + "name": "validity", "in": "body", + "schema_param": true, + "entity_fieldname": "validity", + "api_fieldname": "validity", + "external_param": true, + "parameter_fieldname": "validity", "required": false, - "_key": "updated_at" + "_key": "validity" } ], - "method": "put", - "mode": "update", + "method": "post", + "mode": "generate_service_provider_certificate", "responses": [ { - "description": "Color has been set successfully.", + "description": "Successful operation.", + "headers": [ + { + "type": "string", + "description": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "_key": "Content-Location" + } + ], "schema": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "_key": "color" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "name": "object", + "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, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", "required": false, - "_key": "object" + "_key": "description" }, { - "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" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "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" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" - } - }, - "_key": "200" - }, - { - "description": "Error in input data format.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ - { - "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always 'identity-provider'", "enum": [ - "error" + "identity-provider" ], + "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": "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": "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" }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "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": "fields" + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Status of the identity provider.", "enum": [ - "error" + "ACTIVE", + "SUSPENDED" ], - "_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" + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "identity_provider_status_enum", + "_key": "status" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Identity provider type.", "enum": [ - "error" + "NATIVE", + "MBED", + "SAML2", + "OIDC" ], - "_key": "object" - }, - { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "api_fieldname": "type", + "entity_fieldname": "type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "type" }, { "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": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider" + } }, - "_key": "403" + "_key": "200" }, { - "description": "Color not found.", + "description": "Error in input data, for example, invalid certificate validity value.", "schema": { "type": "object", "required": [ @@ -43457,168 +69941,7 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/branding-colors/light/{reference}", - "summary": "Updates light theme branding color.", - "return_type": "light_theme_color", - "return_info": { - "self": true, - "custom": false, - "type": "light_theme_color" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Branding", - "operation_id": "setLightColor", - "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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "readOnly": 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", - "name": "reference", - "in": "path", - "required": false, - "enum_reference": "light_theme_color_reference_enum", - "readOnly": false, - "_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", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "User interface configuration - colors" - ], - "group_id": "Branding", - "_key": "light_theme_color" - }, - { - "swagger_models": [ - "BrandingImage", - "BrandingImageList" - ], - "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```", - "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": "light_theme_image_reference_enum", - "_key": "reference" - } - ], - "method": "post", - "mode": "delete", - "responses": [ - { - "description": "Image reverted successfully.", - "_key": "204" + "_key": "400" }, { "description": "Authentication failure.", @@ -43767,7 +70090,7 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -43840,13 +70163,13 @@ "_key": "404" } ], - "path": "/v3/branding-images/light/{reference}/clear", - "summary": "Revert an image to light theme default.", - "return_type": "light_theme_image", + "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate", + "summary": "Generate a new service provider certificate.", + "return_type": "subtenant_identity_provider", "return_info": { "self": true, "custom": false, - "type": "light_theme_image" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -43854,27 +70177,100 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "is_default" ], - "group_id": "Branding", - "operation_id": "clearLightImage", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "generateAccountSpCertificate", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "generate_service_provider_certificate" }, { - "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 an array of identity providers.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { - "is_primary_key": true, - "_override": true, + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, "type": "string", - "api_fieldname": "reference", - "entity_fieldname": "reference", - "_key": "reference" + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "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": "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": "subtenant_identity_provider_order_enum", + "_key": "order" } ], "method": "get", @@ -43895,10 +70291,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" }, { @@ -43906,82 +70307,353 @@ "description": "A list of entities.", "items": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "properties": [ { - "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, - "enum": [ - "branding_image" + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs 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" + }, + { + "type": "string", + "maxLength": 500, + "description": "Description for the identity provider.", + "_key": "description" + }, + { + "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], + "_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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } ], - "_key": "object" + "description": "Represents SAML2 specific attributes in responses.", + "_key": "saml2_attributes" }, { + "type": "string", + "description": "Status of the identity provider.", "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" + "ACTIVE", + "SUSPENDED" ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "_key": "reference" + "_key": "status" }, { "type": "string", - "format": "uri", - "example": "https://static.mbed.com/123456789.jpg", - "description": "The static link to the image.", - "readOnly": true, - "_key": "static_uri" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "_key": "type" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Last update UTC time RFC3339.", "_key": "updated_at" } ], "foreign_key": { - "group": "Branding", - "entity": "dark_theme_image" + "group": "Accounts", + "entity": "identity_provider" } }, "api_fieldname": "data", @@ -44000,9 +70672,15 @@ "type": "integer", "format": "int32", "example": 50, - "description": "The number of results to return, 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" }, { @@ -44017,13 +70695,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": "identity_provider_order_enum", "_key": "order" }, { @@ -44038,8 +70723,8 @@ ], "pagination": true, "foreign_key": { - "group": "Branding", - "entity": "light_theme_image" + "group": "Accounts", + "entity": "subtenant_identity_provider" } }, "_key": "200" @@ -44189,15 +70874,88 @@ ] }, "_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/branding-images/light", - "summary": "Get metadata of all light theme images.", - "return_type": "paginated_response(light_theme_image)", + "path": "/v3/accounts/{account_id}/identity-providers", + "summary": "Get all identity providers.", + "return_type": "paginated_response(subtenant_identity_provider)", "return_info": { "self": true, "custom": false, - "type": "light_theme_image" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -44205,82 +70963,53 @@ "object", "etag", "type", - "groups", "filter", - "limit", - "after", - "order", "total_count", "has_more", "data" ], "foreign_key_priority": "self", - "group_id": "Branding", - "operation_id": "getAllLightImageData", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "getAllAccountIdentityProviders", "pagination": true, "foreign_key": { - "group": "Branding", - "entity": "light_theme_image" + "group": "Accounts", + "entity": "subtenant_identity_provider" }, "request_content_type": "application/json", "request_body": "json", "_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 an identity provider.\nNote: This endpoint is restricted to administrators.", "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, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", "in": "path", "required": true, - "enum_reference": "light_theme_image_reference_enum", - "_key": "reference" + "_key": "account_id" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" } ], "method": "get", @@ -44290,94 +71019,399 @@ "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "etag", + "id", + "name", + "object", + "type" + ], "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "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", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'identity-provider'", "enum": [ - "branding_image" + "identity-provider" ], "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": "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" + }, + { "type": "string", - "description": "Name of the image.", - "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" + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "identity_provider_status_enum", + "_key": "status" }, { "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" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "type" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Last update UTC time RFC3339.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", "_key": "updated_at" } ], "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_image" + "group": "Accounts", + "entity": "identity_provider" } }, "_key": "200" @@ -44529,7 +71563,7 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -44602,13 +71636,13 @@ "_key": "404" } ], - "path": "/v3/branding-images/light/{reference}", - "summary": "Get metadata of a light theme image.", - "return_type": "light_theme_image", + "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "summary": "Get an identity provider.", + "return_type": "subtenant_identity_provider", "return_info": { "self": true, "custom": false, - "type": "light_theme_image" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -44616,419 +71650,468 @@ "object", "etag", "type", - "groups", "filter", - "static_uri", - "updated_at" + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "is_default" ], - "group_id": "Branding", - "operation_id": "getLightImageData", + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "getAccountIdentityProvider", "pagination": false, "request_content_type": "application/json", "request_body": "json", "_key": "read" }, { - "description": "Upload a new account branding image as form data in the light theme in PNG or JPEG format.", + "description": "Refresh an OIDC IdP's signing keys.\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.", + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", "required": true, - "type": "file", - "entity_fieldname": "image", - "api_fieldname": "image", - "external_param": true, - "parameter_fieldname": "image", - "_key": "image" + "_key": "account_id" }, { - "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", - "name": "reference", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", "in": "path", "required": true, - "enum_reference": "light_theme_image_reference_enum", - "_key": "reference" + "_key": "id" } ], "method": "post", - "mode": "update", + "mode": "refresh_tokens", "responses": [ { - "description": "Image uploaded successfully.", + "description": "Successful operation.", "headers": [ { "type": "string", - "description": "Location of the image metadata.", + "description": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", "_key": "Content-Location" - }, - { - "type": "string", - "description": "Location of the image binary.", - "_key": "Location" } ], - "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", - "name": "reference", - "in": "path", - "required": true, - "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", - "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": "201" - }, - { - "description": "Error in input data format, for example, image is too large.", "schema": { "type": "object", "required": [ - "code", - "message", + "etag", + "id", + "name", "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 the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "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" + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "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": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always 'identity-provider'", "enum": [ - "error" + "identity-provider" ], + "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": "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" + } }, - { - "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" - } - ] + "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": "fields" + "api_fieldname": "oidc_attributes", + "entity_fieldname": "oidc_attributes", + "parameter_fieldname": "oidc_attributes", + "in": "body", + "_key": "oidc_attributes" }, { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Status of the identity provider.", "enum": [ - "error" + "ACTIVE", + "SUSPENDED" ], - "_key": "object" + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "identity_provider_status_enum", + "_key": "status" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "type" }, { "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": "Last update UTC time RFC3339.", + "api_fieldname": "updated_at", + "entity_fieldname": "updated_at", + "_key": "updated_at" } - ] + ], + "foreign_key": { + "group": "Accounts", + "entity": "identity_provider" + } }, - "_key": "403" + "_key": "200" }, { - "description": "Unknown image reference.", + "description": "Not an OIDC IdP or JWKS URI is unspecified.", "schema": { "type": "object", "required": [ @@ -45083,434 +72166,250 @@ "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/branding-images/light/{reference}/upload-multipart", - "summary": "Upload a light theme image.", - "return_type": "light_theme_image", - "return_info": { - "self": true, - "custom": false, - "type": "light_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "static_uri", - "updated_at" - ], - "group_id": "Branding", - "operation_id": "uploadLightImageMultipart", - "additional_operations": [ - { - "operation_id": "uploadLightImage", - "notes": "The multipart request is more generic and better supported by SDKs." - } - ], - "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", - "name": "reference", - "in": "path", - "required": false, - "enum_reference": "light_theme_image_reference_enum", - "readOnly": false, - "_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": "light_theme_image" - }, - { - "swagger_models": [ - "LoginHistory" - ], - "primary_key_field": null, - "methods": [], - "fields": [ - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T17:52:07Z", - "description": "UTC time RFC3339 for this login attempt.", - "api_fieldname": "date", - "readOnly": true, - "required": false, - "_key": "date" - }, - { - "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": "boolean", - "example": true, - "description": "Flag indicating whether login attempt was successful or not.", - "api_fieldname": "success", - "readOnly": true, - "required": false, - "_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", - "readOnly": true, - "required": false, - "_key": "user_agent" - } - ], - "field_renames": [], - "tags": [], - "group_id": "Accounts", - "_key": "login_history" - }, - { - "swagger_models": [ - "LoginProfile" - ], - "primary_key_field": "id", - "methods": [], - "fields": [ - { - "type": "string", - "description": "ID of the identity provider.", - "readOnly": false, - "_override": true, - "api_fieldname": "id", - "required": false, - "_key": "id" - }, - { - "type": "string", - "readOnly": false, - "description": "Name of the identity provider.", - "_override": true, - "api_fieldname": "name", - "required": false, - "_key": "name" - } - ], - "field_renames": [], - "tags": [], - "group_id": "Accounts", - "_key": "login_profile" - }, - { - "swagger_models": [ - "ParentAccountInfo" - ], - "primary_key_field": "id", - "methods": [], - "fields": [ - { - "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", - "readOnly": true, - "required": false, - "_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", - "readOnly": true, - "required": false, - "_key": "admin_name" - }, - { - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the parent account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "readOnly": true, - "required": false, - "_key": "id" - } - ], - "field_renames": [], - "tags": [], - "group_id": "Accounts", - "_key": "parent_account" - }, - { - "swagger_models": [ - "PasswordPolicy" - ], - "primary_key_field": null, - "methods": [], - "fields": [ - { - "type": "integer", - "minimum": 8, - "maximum": 512, - "example": "8", - "description": "Minimum length for the password.", - "api_fieldname": "minimum_length", - "readOnly": true, - "required": false, - "_key": "minimum_length" - } - ], - "field_renames": [], - "tags": [], - "group_id": "Accounts", - "_key": "password_policy" - }, - { - "swagger_models": [ - "FeaturePolicy" - ], - "primary_key_field": null, - "methods": [], - "fields": [ - { - "type": "string", - "example": "GET", - "description": "Comma-separated list of actions, empty string represents all actions.", - "api_fieldname": "action", - "readOnly": true, - "required": false, - "_key": "action" - }, - { - "type": "boolean", - "example": true, - "description": "True or false controlling whether an action is allowed or not.", - "api_fieldname": "allow", - "readOnly": true, - "required": false, - "_key": "allow" - }, - { - "type": "string", - "example": "update-campaigns", - "description": "Feature name corresponding to this policy.", - "api_fieldname": "feature", - "readOnly": true, - "required": false, - "_key": "feature" - }, - { - "type": "boolean", - "example": false, - "description": "Flag indicating whether this feature is inherited or overwritten specifically.", - "api_fieldname": "inherited", - "readOnly": true, - "required": false, - "_key": "inherited" - }, - { - "type": "string", - "example": "/v3/update-campaign", - "description": "Resource that is protected by this policy.", - "api_fieldname": "resource", - "readOnly": true, - "required": false, - "_key": "resource" - } - ], - "field_renames": [], - "tags": [], - "group_id": "Accounts", - "_key": "policy" - }, - { - "swagger_models": [ - "ListOfPreSharedKeysWithoutSecret", - "PreSharedKey", - "PreSharedKeyWithoutSecret" - ], - "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```", - "field_renames": [], - "fields": [ - { - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, - "type": "string", - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "_key": "endpoint_name" - }, - { - "description": "The Id of the pre_shared_key, shadows the endpoint_name", - "type": "string", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "pattern": "^[ -~]{16,64}$", - "example": "my-endpoint-0001", - "name": "endpoint_name", - "in": "body", - "schema_param": true, - "_key": "id" - }, - { - "type": "string", - "pattern": "^(0[xX])?[0-9a-fA-F]{32,64}$", - "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", - "name": "secret_hex", - "in": "body", - "schema_param": true, - "entity_fieldname": "secret_hex", - "api_fieldname": "secret_hex", - "external_param": true, - "parameter_fieldname": "secret_hex", - "required": true, - "_key": "secret_hex" - } - ], - "method": "post", - "mode": "create", - "responses": [ - { - "description": "Successfully created.", - "_key": "201" - }, - { - "description": "Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, INVALID_SECRET_HEX, and MALFORMED_JSON_CONTENT.", - "schema": { - "type": "string" + }, + { + "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. You need to read and accept the PSK license in Device Management Portal.", + "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": "Conflict. The PSK for the endpoint already exists and cannot be overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT.", + "description": "An account or identity provider not found.", "schema": { - "type": "string" + "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" + "_key": "404" } ], - "path": "/v2/device-shared-keys", - "summary": "Upload a PSK to Pelion Device Management.", - "return_type": "pre_shared_key", + "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks", + "summary": "Refresh the OIDC signing keys.", + "return_type": "subtenant_identity_provider", "return_info": { "self": true, "custom": false, - "type": "pre_shared_key" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -45518,537 +72417,919 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "created_at", + "updated_at", + "name", + "description", + "status", + "saml2_attributes", + "oidc_attributes", + "is_default" ], - "group_id": "Security", + "group_id": "Accounts", "parameter_map": { - "endpoint_name": "id" + "identity_provider_id": "id" }, - "operation_id": "uploadPreSharedKey", + "operation_id": "refreshAccountJwks", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "refresh_tokens" }, { - "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": "Update an existing identity provider.\nNote: This endpoint is restricted to administrators.", "field_renames": [], "fields": [ { - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, "type": "string", - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "_key": "endpoint_name" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" }, { - "description": "The Id of the pre_shared_key, shadows the endpoint_name", "type": "string", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "_override": true, + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "in": "query", + "name": "discovery", + "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", + "type": "boolean", + "allowEmptyValue": true, + "entity_fieldname": "discovery", + "api_fieldname": "discovery", + "external_param": true, + "parameter_fieldname": "discovery", + "required": false, + "_key": "discovery" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "name": "endpoint_name", + "parameter_fieldname": "identity_provider_id", "in": "path", "required": true, "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Successfully deleted. Responds even if the endpoint does not have an associated PSK.", - "_key": "204" }, { - "description": "Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME.", - "schema": { - "type": "string" - }, - "_key": "400" + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" }, { - "description": "Authentication failure.", - "_key": "401" - } - ], - "path": "/v2/device-shared-keys/{endpoint_name}", - "summary": "Remove a PSK.", - "return_type": "pre_shared_key", - "return_info": { - "self": true, - "custom": false, - "type": "pre_shared_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Security", - "parameter_map": { - "endpoint_name": "id" - }, - "operation_id": "deletePreSharedKey", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "type": "string", - "description": "An offset token for fetching a specific page. Provided by the server.", - "example": "001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004", - "api_fieldname": "after", - "entity_fieldname": "after", - "name": "after", - "in": "query", + "type": "object", "required": false, - "external_param": true, - "parameter_fieldname": "after", - "_key": "after" + "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" }, { - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, - "type": "string", - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "_key": "endpoint_name" + "type": "object", + "properties": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" }, { - "description": "The Id of the pre_shared_key, shadows the endpoint_name", "type": "string", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" - }, - { - "type": "integer", - "description": "The number of entries per page.", - "example": 50, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "name": "limit", - "in": "query", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", "required": false, - "external_param": true, - "parameter_fieldname": "limit", - "_key": "limit" + "enum_reference": "subtenant_identity_provider_status_enum", + "_key": "status" } ], - "method": "get", - "mode": "list", + "method": "put", + "mode": "update", "responses": [ { - "description": "List of PSKs.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ + "etag", + "id", + "name", "object", - "limit", - "order", - "has_more", - "data" + "type" ], "properties": [ { "type": "string", - "description": "An offset token for current page.", - "example": "001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004", - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" }, { "type": "string", - "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", - "api_fieldname": "continuation_marker", - "entity_fieldname": "continuation_marker", - "_key": "continuation_marker" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { - "type": "array", - "description": "Array of the PSK entries. The array is empty if there are no PSKs.", - "minLength": 0, - "items": { - "type": "object", - "required": [ - "endpoint_name" - ], - "properties": [ - { - "type": "string", - "format": "date-time", - "description": "The date-time (RFC3339) when this PSK was uploaded to Device Management.", - "example": "2017-07-21T17:32:28.012Z", - "_key": "created_at" - }, - { - "type": "string", - "pattern": "^[ -~]{16,64}$", - "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", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, - "_key": "endpoint_name" - } - ], - "foreign_key": { - "group": "Security", - "entity": "pre_shared_key" - } - }, - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "_key": "id" }, { "type": "boolean", - "description": "More results are available.", - "example": true, - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "entity_fieldname": "is_default", + "_key": "is_default" }, { - "type": "integer", - "description": "The value of limit query parameter from the request, or default if not specified.", - "example": 50, - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" }, { "type": "string", - "description": "The type of this API object is a \"list\".", - "example": "list", + "description": "Entity name: always 'identity-provider'", + "enum": [ + "identity-provider" + ], "api_fieldname": "object", "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "entity_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "_key": "saml2_attributes" + }, { "type": "string", - "description": "Record order based on creation time.", - "example": "DESC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "identity_provider_status_enum", + "_key": "status" + }, + { + "type": "string", + "description": "Identity provider type.", + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "type", + "parameter_fieldname": "type", + "in": "body", + "required": true, + "enum_reference": "identity_provider_type_enum", + "_key": "type" + }, + { + "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, "foreign_key": { - "group": "Security", - "entity": "pre_shared_key" + "group": "Accounts", + "entity": "identity_provider" } }, "_key": "200" }, { - "description": "Bad request. Contains the error as a string, either TOKEN_NOT_FOUND or INVALID_LIMIT.", - "_key": "400" - } - ], - "path": "/v2/device-shared-keys", - "summary": "List PSKs.", - "return_type": "paginated_response(pre_shared_key)", - "return_info": { - "self": true, - "custom": false, - "type": "pre_shared_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "order", - "has_more", - "continuation_marker", - "data" - ], - "foreign_key_priority": "self", - "group_id": "Security", - "parameter_map": { - "endpoint_name": "id" - }, - "operation_id": "listPreSharedKeys", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "pre_shared_key" - }, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "type": "string", - "pattern": "^[ -~]{16,64}$", - "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", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "_key": "endpoint_name" - }, - { - "description": "The Id of the pre_shared_key, shadows the endpoint_name", - "type": "string", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "name": "endpoint_name", - "in": "path", - "required": true, - "_key": "id" - } - ], - "method": "get", - "mode": "read", - "responses": [ - { - "description": "Pre-shared key for the device (does not contain secret).", + "description": "Error in input data, for example, missing name.", "schema": { "type": "object", "required": [ - "endpoint_name" + "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": "date-time", - "description": "The date-time (RFC3339) when this PSK was uploaded to Device Management.", - "example": "2017-07-21T17:32:28.012Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_key": "created_at" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "pattern": "^[ -~]{16,64}$", - "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", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, - "api_fieldname": "endpoint_name", - "entity_fieldname": "endpoint_name", - "_key": "endpoint_name" + "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" } - ], - "foreign_key": { - "group": "Security", - "entity": "pre_shared_key" - } - }, - "_key": "200" - }, - { - "description": "Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME.", - "schema": { - "type": "string" + ] }, "_key": "400" }, { - "description": "Authentication failure.", - "_key": "401" - }, - { - "description": "The PSK does not exist.", - "_key": "404" - } - ], - "path": "/v2/device-shared-keys/{endpoint_name}", - "summary": "Get a PSK.", - "return_type": "pre_shared_key", - "return_info": { - "self": true, - "custom": false, - "type": "pre_shared_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at" - ], - "group_id": "Security", - "parameter_map": { - "endpoint_name": "id" - }, - "operation_id": "getPreSharedKey", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "format": "date-time", - "description": "The date-time (RFC3339) when this PSK was uploaded to Device Management.", - "example": "2017-07-21T17:32:28.012Z", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "readOnly": false, - "_override": true, - "type": "string", - "api_fieldname": "endpoint_name", - "pattern": "^[ -~]{16,64}$", - "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", - "required": false, - "_key": "endpoint_name" - }, - { - "description": "The Id of the pre_shared_key, shadows the endpoint_name", - "type": "string", - "getter_custom_method": "pre_shared_key_id_getter", - "setter_custom_method": "pre_shared_key_id_setter", - "_override": true, - "api_fieldname": "id", - "readOnly": false, - "required": false, - "_key": "id" - } - ], - "field_renames": [], - "tags": [ - "PreSharedKeys" - ], - "group_id": "Security", - "_key": "pre_shared_key" - }, - { - "swagger_models": [ - "ServerCredentialsResponseData" - ], - "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```", - "field_renames": [], - "fields": [], - "method": "get", - "mode": "get_bootstrap", - "responses": [ - { - "description": "Bootstrap server credentials fetched successfully.", + "description": "Authentication failure.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "format": "date-time", - "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": "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": "Unique entity ID.", - "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 `server-credentials`.", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "PEM-format X.509 server certificate used to validate the server certificate received during the TLS/DTLS handshake.", - "api_fieldname": "server_certificate", - "entity_fieldname": "server_certificate", - "_key": "server_certificate" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "description": "Server URI that the client connects to.", - "api_fieldname": "server_uri", - "entity_fieldname": "server_uri", - "_key": "server_uri" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "server_credentials" - } + ] }, - "examples": [ - { - "object": "server-credentials", - "id": "015fee4431fd38c98640fbfb00000000", - "etag": "1", - "created_at": "2017-12-11T14:22:20.009Z", - "server_certificate": "-----BEGIN CERTIFICATE-----\\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\\n-----END CERTIFICATE-----", - "server_uri": "coaps://coap.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000", - "_key": "Success" - } - ], - "_key": "200" + "_key": "401" }, { - "description": "Bad request.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -46118,10 +73399,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Invalid access token.", + "description": "An account or identity provider not found.", "schema": { "type": "object", "required": [ @@ -46191,26 +73472,16 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 401, - "type": "invalid_auth", - "message": "Invalid access token.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" - } - ], - "_key": "401" + "_key": "404" } ], - "path": "/v3/server-credentials/bootstrap", - "summary": "Fetch bootstrap server credentials.", - "return_type": "server_credentials", + "path": "/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + "summary": "Update an existing identity provider.", + "return_type": "subtenant_identity_provider", "return_info": { "self": true, "custom": false, - "type": "server_credentials" + "type": "subtenant_identity_provider" }, "x_filter": {}, "x_deprecation": null, @@ -46218,102 +73489,516 @@ "object", "etag", "type", - "groups", "filter", - "id", "created_at", - "server_certificate", - "server_uri" - ], - "group_id": "Security", - "operation_id": "getBootstrapServerCredentials", - "additional_operations": [ - { - "operation_id": "getAllServerCredentials", - "notes": "The information returned by this endpoint can be obtained by calling `get_bootstrap`." - } + "updated_at", + "is_default" ], + "group_id": "Accounts", + "parameter_map": { + "identity_provider_id": "id" + }, + "operation_id": "updateAccountIdentityProvider", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "get_bootstrap" + "_key": "update" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the identity provider belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": false, + "required": true, + "_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", + "maxLength": 500, + "description": "Description for the identity provider.", + "api_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "readOnly": false, + "_key": "description" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "identity_provider_id", + "in": "path", + "required": true, + "readOnly": false, + "_key": "id" + }, + { + "type": "boolean", + "description": "Flag indicating whether this is the global default identity provider.", + "readOnly": true, + "api_fieldname": "is_default", + "required": false, + "_key": "is_default" + }, + { + "type": "string", + "maxLength": 100, + "description": "Name of the identity provider.", + "api_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "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": [ + { + "type": "string", + "description": "URL of the service provider's assertion endpoint. Leave this empty to use the default assertion endpoint.", + "x-nullable": true, + "_key": "assertion_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the identity provider.", + "x-nullable": true, + "_key": "idp_entity_id" + }, + { + "type": "array", + "description": "List of public X509 certificates of the identity provider in PEM format.", + "items": { + "type": "string" + }, + "x-nullable": true, + "_key": "idp_x509_certs" + }, + { + "type": "string", + "description": "URL of the identity provider's SLO endpoint.", + "x-nullable": true, + "_key": "slo_endpoint" + }, + { + "type": "string", + "description": "Entity ID of the service provider.", + "x-nullable": true, + "_key": "sp_entity_id" + }, + { + "type": "string", + "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, + "x-nullable": true, + "_key": "sp_x509_cert" + }, + { + "type": "string", + "description": "URL of the identity provider's SSO endpoint.", + "x-nullable": true, + "_key": "sso_endpoint" + } + ], + "description": "Represents SAML2 specific attributes in responses.", + "api_fieldname": "saml2_attributes", + "parameter_fieldname": "saml2_attributes", + "in": "body", + "required": false, + "readOnly": false, + "_key": "saml2_attributes" + }, + { + "type": "string", + "description": "Status of the identity provider.", + "enum": [ + "ACTIVE", + "SUSPENDED" + ], + "api_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "subtenant_identity_provider_status_enum", + "readOnly": false, + "_key": "status" }, { - "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```", + "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": [ + "Tenant accounts - identity providers" + ], + "group_id": "Accounts", + "_key": "subtenant_identity_provider" + }, + { + "swagger_models": [ + "BrandingColor" + ], + "primary_key_field": "reference", + "methods": [ + { + "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": [], - "method": "get", - "mode": "get_lwm2m", + "fields": [ + { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "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", + "in": "path", + "description": "The name of the branding color.", + "required": true, + "enum_reference": "subtenant_light_theme_color_reference_enum", + "_key": "reference" + } + ], + "method": "delete", + "mode": "delete", "responses": [ { - "description": "LwM2M server credentials fetched successfully.", + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "format": "date-time", - "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": "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": "Unique entity ID.", - "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 `server-credentials`.", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_key": "object" }, { "type": "string", - "description": "PEM-format X.509 server certificate used to validate the server certificate received during the TLS/DTLS handshake.", - "api_fieldname": "server_certificate", - "entity_fieldname": "server_certificate", - "_key": "server_certificate" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "description": "Server URI that the client connects to.", - "api_fieldname": "server_uri", - "entity_fieldname": "server_uri", - "_key": "server_uri" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "foreign_key": { - "group": "Security", - "entity": "server_credentials" - } + ] }, - "examples": [ - { - "object": "server-credentials", - "id": "015fee4431fd38c98640fbfb00000000", - "etag": "1", - "created_at": "2017-12-11T14:22:20.009Z", - "server_certificate": "-----BEGIN CERTIFICATE-----\\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\\n-----END CERTIFICATE-----", - "server_uri": "coaps://mds.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000", - "_key": "Success" - } - ], - "_key": "200" + "_key": "401" }, { - "description": "Bad request.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -46383,10 +74068,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Invalid access token.", + "description": "Color or account not found.", "schema": { "type": "object", "required": [ @@ -46456,26 +74141,16 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 401, - "type": "invalid_auth", - "message": "Invalid access token.", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" - } - ], - "_key": "401" + "_key": "404" } ], - "path": "/v3/server-credentials/lwm2m", - "summary": "Fetch LwM2M server credentials.", - "return_type": "server_credentials", + "path": "/v3/accounts/{account_id}/branding-colors/light/{reference}", + "summary": "Reset branding color to default.", + "return_type": "void", "return_info": { - "self": true, - "custom": false, - "type": "server_credentials" + "self": false, + "custom": true, + "type": "void" }, "x_filter": {}, "x_deprecation": null, @@ -46483,299 +74158,157 @@ "object", "etag", "type", - "groups", - "filter", - "id", - "created_at", - "server_certificate", - "server_uri" - ], - "group_id": "Security", - "operation_id": "getL2M2MServerCredentials", - "additional_operations": [ - { - "operation_id": "getAllServerCredentials", - "notes": "The information returned by this endpoint can be obtained by calling `get_lwm2m`." - } + "filter" ], + "group_id": "Branding", + "operation_id": "resetAccountLightColor", + "spec": { + "return_type": "void" + }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "get_lwm2m" - } - ], - "fields": [ - { - "type": "string", - "format": "date-time", - "description": "Creation UTC time RFC3339.", - "api_fieldname": "created_at", - "readOnly": true, - "required": false, - "_key": "created_at" - }, - { - "type": "string", - "description": "Unique entity ID.", - "api_fieldname": "id", - "readOnly": true, - "required": false, - "_key": "id" - }, - { - "type": "string", - "description": "PEM-format X.509 server certificate used to validate the server certificate received during the TLS/DTLS handshake.", - "api_fieldname": "server_certificate", - "readOnly": true, - "required": false, - "_key": "server_certificate" + "_key": "delete" }, { - "type": "string", - "description": "Server URI that the client connects to.", - "api_fieldname": "server_uri", - "readOnly": true, - "required": false, - "_key": "server_uri" - } - ], - "field_renames": [], - "tags": [ - "Service security - server credentials" - ], - "group_id": "Security", - "_key": "server_credentials" - }, - { - "swagger_models": [ - "ApiKeyInfoReq", - "ApiKeyInfoResp", - "ApiKeyUpdateReq" - ], - "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": "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": [ { - "type": "string", - "example": "01619571e2e90242ac12000600000000", + "name": "account_id", + "in": "path", "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", + "required": true, + "type": "string", "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, "parameter_fieldname": "account_id", - "in": "path", - "required": true, "_key": "account_id" }, { - "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" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", "enum": [ - "ACTIVE", - "INACTIVE" + "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" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "subtenant_api_key_status_enum", - "_key": "status" + "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": "subtenant_light_theme_color_reference_enum", + "_key": "reference" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "read", "responses": [ { - "description": "New entity created.", + "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", - "name": "groups", + "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", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "groups", "required": false, - "_key": "groups" - }, - { - "type": "string", - "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": "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", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "_key": "name" + "_key": "color" }, { "type": "string", - "description": "Entity name: always 'api-key'", + "description": "Entity name: always 'branding_color'", + "readOnly": true, "enum": [ - "api-key" + "branding_color" ], "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", - "parameter_fieldname": "owner", + "name": "object", "in": "body", + "schema_param": true, + "external_param": true, + "parameter_fieldname": "object", "required": false, - "_key": "owner" + "_key": "object" }, { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", "enum": [ - "ACTIVE", - "INACTIVE" + "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" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "api_key_status_enum", - "_key": "status" + "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": "subtenant_dark_theme_color_reference_enum", + "_key": "reference" }, { "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", + "parameter_fieldname": "updated_at", + "in": "body", + "required": false, "_key": "updated_at" } ], - "description": "Represents an API key in Device Management.", "foreign_key": { - "group": "Accounts", - "entity": "api_key" + "group": "Branding", + "entity": "subtenant_dark_theme_color" } }, - "_key": "201" + "_key": "200" }, { - "description": "Error in input data, for example, missing display name.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -46845,10 +74378,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -46918,10 +74451,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "Color or account not found.", "schema": { "type": "object", "required": [ @@ -46965,36 +74498,224 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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/{reference}", + "summary": "Get light theme branding color.", + "return_type": "subtenant_light_theme_color", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_light_theme_color" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "color", + "updated_at" + ], + "group_id": "Branding", + "operation_id": "getAccountLightColor", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "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", + "in": "path", + "required": true, + "enum_reference": "subtenant_light_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 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", + "parameter_fieldname": "color", + "in": "body", + "required": false, + "_key": "color" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always 'branding_color'", + "readOnly": true, "enum": [ - "error" + "branding_color" ], + "api_fieldname": "object", + "entity_fieldname": "object", + "name": "object", + "in": "body", + "schema_param": true, + "external_param": true, + "parameter_fieldname": "object", + "required": false, "_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": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "description": "Color name.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "subtenant_dark_theme_color_reference_enum", + "_key": "reference" }, { "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": "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" } - ] + ], + "foreign_key": { + "group": "Branding", + "entity": "subtenant_dark_theme_color" + } }, - "_key": "403" + "_key": "200" }, { - "description": "An account with the given ID does not exist.", + "description": "Error in input data format.", "schema": { "type": "object", "required": [ @@ -47064,77 +74785,7 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/api-keys", - "summary": "Create a new API key.", - "return_type": "subtenant_api_key", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_api_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "id", - "created_at", - "updated_at", - "key", - "creation_time", - "last_login_time" - ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "createAccountApiKey", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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": "400" }, { "description": "Authentication failure.", @@ -47283,7 +74934,7 @@ "_key": "403" }, { - "description": "An account or API key with the specified ID does not exist.", + "description": "Color or account not found.", "schema": { "type": "object", "required": [ @@ -47356,13 +75007,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/api-keys/{apikey_id}", - "summary": "Delete the API key.", - "return_type": "subtenant_api_key", + "path": "/v3/accounts/{account_id}/branding-colors/light/{reference}", + "summary": "Updates light theme branding color.", + "return_type": "subtenant_light_theme_color", "return_info": { "self": true, "custom": false, - "type": "subtenant_api_key" + "type": "subtenant_light_theme_color" }, "x_filter": {}, "x_deprecation": null, @@ -47370,210 +75021,167 @@ "object", "etag", "type", - "groups", "filter" ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "deleteAccountApiKey", + "group_id": "Branding", + "operation_id": "setAccountLightColor", + "additional_operations": [ + { + "operation_id": "bulkSetAccountLightColors", + "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": "delete" + "_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", + "parameter_fieldname": "color", + "in": "body", + "required": false, + "readOnly": 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", + "name": "reference", + "in": "path", + "required": false, + "enum_reference": "subtenant_light_theme_color_reference_enum", + "readOnly": false, + "_key": "reference" }, { - "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```", + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update time in UTC.", + "readOnly": true, + "api_fieldname": "updated_at", + "parameter_fieldname": "updated_at", + "in": "body", + "required": false, + "_key": "updated_at" + } + ], + "field_renames": [], + "tags": [ + "Tenant user interface configuration - colors" + ], + "group_id": "Branding", + "_key": "subtenant_light_theme_color" + }, + { + "swagger_models": [ + "BrandingImage" + ], + "primary_key_field": "reference", + "methods": [ + { + "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": [ { - "type": "string", - "example": "01619571e2e90242ac12000600000000", + "name": "account_id", + "in": "path", "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", + "required": true, + "type": "string", "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, "parameter_fieldname": "account_id", - "in": "path", - "required": true, "_key": "account_id" }, { + "is_primary_key": true, + "_override": true, "type": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "apikey_id", + "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, - "_key": "id" + "enum_reference": "subtenant_light_theme_image_reference_enum", + "_key": "reference" } ], - "method": "get", - "mode": "read", + "method": "post", + "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", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "groups", - "required": false, - "_key": "groups" - }, - { - "type": "string", - "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": "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", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "_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", - "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" - }, - { - "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": "api_key" - } - }, - "_key": "200" + "description": "Image reverted successfully.", + "_key": "204" }, { "description": "Authentication failure.", @@ -47722,7 +75330,7 @@ "_key": "403" }, { - "description": "An account or API key with the specified ID does not exist.", + "description": "Unknown image reference, or account not found.", "schema": { "type": "object", "required": [ @@ -47795,13 +75403,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/api-keys/{apikey_id}", - "summary": "Get API key details.", - "return_type": "subtenant_api_key", + "path": "/v3/accounts/{account_id}/branding-images/light/{reference}/clear", + "summary": "Revert an image to light theme default.", + "return_type": "subtenant_light_theme_image", "return_info": { "self": true, "custom": false, - "type": "subtenant_api_key" + "type": "subtenant_light_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -47809,261 +75417,185 @@ "object", "etag", "type", - "groups", - "filter", - "created_at", - "updated_at", - "key", - "name", - "owner", - "status", - "creation_time", - "last_login_time" + "filter" ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "getAccountApiKey", + "group_id": "Branding", + "operation_id": "clearAccountLightImage", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete" }, { - "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": "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": [ { - "type": "string", - "example": "01619571e2e90242ac12000600000000", + "name": "account_id", + "in": "path", "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", + "required": true, + "type": "string", "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, "parameter_fieldname": "account_id", - "in": "path", - "required": true, "_key": "account_id" }, { + "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", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "apikey_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" - }, - { - "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" - }, - { - "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": "subtenant_api_key_status_enum", - "_key": "status" + "enum_reference": "subtenant_light_theme_image_reference_enum", + "_key": "reference" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "read", "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", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "groups", - "required": false, - "_key": "groups" - }, - { - "type": "string", - "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": "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", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'api-key'", + "description": "Entity name: always 'branding_image'", + "readOnly": true, "enum": [ - "api-key" + "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", - "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" + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "subtenant_dark_theme_image_reference_enum", + "_key": "reference" }, { "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" + "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" } ], - "description": "Represents an API key in Device Management.", "foreign_key": { - "group": "Accounts", - "entity": "api_key" + "group": "Branding", + "entity": "subtenant_dark_theme_image" } }, "_key": "200" }, { - "description": "Error in input data, for example, missing display name.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -48133,10 +75665,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -48206,10 +75738,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "Unknown image reference, or account not found.", "schema": { "type": "object", "required": [ @@ -48277,12 +75809,230 @@ "example": "validation_error", "_key": "type" } - ] + ] + }, + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/branding-images/light/{reference}", + "summary": "Get metadata of a light theme image.", + "return_type": "subtenant_light_theme_image", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_light_theme_image" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "static_uri", + "updated_at" + ], + "group_id": "Branding", + "operation_id": "getAccountLightImageData", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "The ID of the account.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": true, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "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" + ], + "type": "string", + "description": "Name of the image.", + "is_primary_key": true, + "_override": true, + "api_fieldname": "reference", + "entity_fieldname": "reference", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "subtenant_light_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" + } + ], + "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", + "name": "reference", + "in": "path", + "required": true, + "enum_reference": "subtenant_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", + "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_dark_theme_image" + } }, - "_key": "403" + "_key": "201" }, { - "description": "An account ID or API key with the specified ID does not exist.", + "description": "Error in input data format, for example, image is too large.", "schema": { "type": "object", "required": [ @@ -48352,304 +76102,7 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/api-keys/{apikey_id}", - "summary": "Update API key details.", - "return_type": "subtenant_api_key", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_api_key" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at", - "updated_at", - "key", - "creation_time", - "last_login_time" - ], - "group_id": "Accounts", - "parameter_map": { - "apikey_id": "id" - }, - "operation_id": "updateAccountApiKey", - "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": false, - "required": true, - "_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": "string", - "example": "01619571f7020242ac12000600000000", - "description": "The ID of the API key.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "parameter_fieldname": "apikey_id", - "in": "path", - "required": true, - "readOnly": false, - "_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", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "readOnly": 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", - "parameter_fieldname": "owner", - "in": "body", - "required": false, - "readOnly": false, - "_key": "owner" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "The status of the API key.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "subtenant_api_key_status_enum", - "readOnly": false, - "_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": [ - "Tenant accounts - API keys" - ], - "group_id": "Accounts", - "_key": "subtenant_api_key" - }, - { - "swagger_models": [ - "BrandingColor" - ], - "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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": true, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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": "subtenant_dark_theme_color_reference_enum", - "_key": "reference" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Successful operation.", - "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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "_key": "color" - }, - { - "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, - "_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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "light_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" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" - } - }, - "_key": "200" + "_key": "400" }, { "description": "Authentication failure.", @@ -48798,7 +76251,7 @@ "_key": "403" }, { - "description": "Color or account not found.", + "description": "Unknown image reference.", "schema": { "type": "object", "required": [ @@ -48871,13 +76324,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-colors/dark/{reference}", - "summary": "Reset branding color to default.", - "return_type": "void", + "path": "/v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart", + "summary": "Upload a light theme image.", + "return_type": "subtenant_light_theme_image", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "subtenant_light_theme_image" }, "x_filter": {}, "x_deprecation": null, @@ -48885,23 +76338,118 @@ "object", "etag", "type", - "groups", "filter", - "color", + "static_uri", "updated_at" ], "group_id": "Branding", - "operation_id": "resetAccountDarkColor", - "spec": { - "return_type": "void" - }, + "operation_id": "uploadAccountLightImageMultipart", + "additional_operations": [ + { + "operation_id": "uploadAccountLightImage", + "notes": "The multipart request is more generic and better supported by SDKs." + } + ], "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" + "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", + "name": "reference", + "in": "path", + "required": false, + "enum_reference": "subtenant_light_theme_image_reference_enum", + "readOnly": false, + "_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" }, { - "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```", + "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": [ + "Tenant user interface configuration - images" + ], + "group_id": "Branding", + "_key": "subtenant_light_theme_image" + }, + { + "swagger_models": [ + "ApiKeyInfoRespList", + "GroupCreationInfo", + "GroupSummary", + "GroupSummaryList", + "GroupUpdateInfo", + "UserInfoRespList" + ], + "primary_key_field": "id", + "methods": [ + { + "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": [ { @@ -48912,127 +76460,294 @@ "type": "string", "entity_fieldname": "account_id", "api_fieldname": "account_id", - "external_param": true, + "external_param": false, "parameter_fieldname": "account_id", "_key": "account_id" }, { - "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", + "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": "group_id", "in": "path", + "description": "The ID of the group to retrieve API keys for.", "required": true, - "enum_reference": "subtenant_dark_theme_color_reference_enum", - "_key": "reference" + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "group_id", + "external_param": false, + "parameter_fieldname": "group_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": "subtenant_policy_group_order_enum", + "_key": "order" } ], "method": "get", - "mode": "read", + "mode": "api_keys", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "data", + "has_more", + "limit", + "object", + "total_count" + ], "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", - "parameter_fieldname": "color", - "in": "body", + "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, - "_key": "color" + "external_param": true, + "parameter_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 (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 'branding_color'", - "readOnly": true, + "description": "Entity name: always `list`.", "enum": [ - "branding_color" + "list" ], "api_fieldname": "object", "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, "_key": "object" }, { + "type": "string", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "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" + "ASC", + "DESC" ], - "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": "light_theme_color_reference_enum", - "_key": "reference" + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "policy_group_order_enum", + "_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", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, - "_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" } ], + "pagination": true, "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" + "group": "Accounts", + "entity": "api_key" } }, "_key": "200" @@ -49184,7 +76899,7 @@ "_key": "403" }, { - "description": "Color or account not found.", + "description": "An account or group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -49257,342 +76972,247 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-colors/dark/{reference}", - "summary": "Get dark theme branding color.", - "return_type": "subtenant_dark_theme_color", + "path": "/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys", + "summary": "Get API keys in a group.", + "return_type": "paginated_response(subtenant_api_key)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "subtenant_dark_theme_color" + "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", "type", - "groups", "filter", - "color", - "updated_at" + "total_count", + "has_more", + "data" ], - "group_id": "Branding", - "operation_id": "getAccountDarkColor", - "pagination": false, + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "getApiKeysOfAccountGroup", + "foreign_key": { + "entity": "subtenant_api_key" + }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "api_keys" }, { - "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": "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": [ { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "type": "string", - "entity_fieldname": "account_id", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "account_id", - "external_param": true, + "entity_fieldname": "account_id", "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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", "in": "path", "required": true, - "enum_reference": "subtenant_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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "_key": "color" - }, - { - "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, - "_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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "light_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" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_light_theme_color" - } - }, - "_key": "200" + "_key": "account_id" }, { - "description": "Error in input data format.", - "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" + "type": "object", + "properties": [ + { + "type": "array", + "description": "An array of API key IDs.", + "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.", + "items": { + "type": "string" + }, + "_key": "users" + } + ], + "description": "Represents arrays of user and API key IDs.", + "name": "members", + "in": "body", + "schema_param": true, + "entity_fieldname": "members", + "api_fieldname": "members", + "external_param": true, + "parameter_fieldname": "members", + "required": false, + "_key": "members" }, { - "description": "Authentication failure.", + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" + } + ], + "method": "post", + "mode": "create", + "responses": [ + { + "description": "New entity created.", "schema": { "type": "object", "required": [ - "code", - "message", + "account_id", + "apikey_count", + "etag", + "id", + "name", "object", - "request_id", - "type" + "user_count" ], "properties": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "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": "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": "int32", + "example": 0, + "description": "The number of applications in this group.", + "api_fieldname": "application_count", + "entity_fieldname": "application_count", + "_key": "application_count" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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": "Entity name, always `error`.", + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "group_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always `group`.", "enum": [ - "error" + "group" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_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" + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "entity_fieldname": "user_count", + "_key": "user_count" } - ] + ], + "description": "This object contains basic information about groups.", + "foreign_key": { + "group": "Accounts", + "entity": "policy_group" + } }, - "_key": "401" + "_key": "201" }, { - "description": "Forbidden.", + "description": "Error in input data, for example, invalid group name.", "schema": { "type": "object", "required": [ @@ -49662,10 +77282,10 @@ } ] }, - "_key": "403" + "_key": "400" }, { - "description": "Color or account not found.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -49735,182 +77355,10 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/branding-colors/dark/{reference}", - "summary": "Updates a dark theme branding color.", - "return_type": "subtenant_dark_theme_color", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_dark_theme_color" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Branding", - "operation_id": "setAccountDarkColor", - "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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "readOnly": 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", - "name": "reference", - "in": "path", - "required": false, - "enum_reference": "subtenant_dark_theme_color_reference_enum", - "readOnly": false, - "_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", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "Tenant user interface configuration - colors" - ], - "group_id": "Branding", - "_key": "subtenant_dark_theme_color" - }, - { - "swagger_models": [ - "BrandingImage" - ], - "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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": true, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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": "subtenant_dark_theme_image_reference_enum", - "_key": "reference" - } - ], - "method": "post", - "mode": "delete", - "responses": [ - { - "description": "Image reverted successfully.", - "_key": "204" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -49980,10 +77428,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "An account with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -50053,10 +77501,10 @@ } ] }, - "_key": "403" + "_key": "404" }, { - "description": "Unknown image reference, or account not found.", + "description": "A group with that name already exists.", "schema": { "type": "object", "required": [ @@ -50126,16 +77574,16 @@ } ] }, - "_key": "404" + "_key": "409" } ], - "path": "/v3/accounts/{account_id}/branding-images/dark/{reference}/clear", - "summary": "Revert an image to dark theme default.", - "return_type": "subtenant_dark_theme_image", + "path": "/v3/accounts/{account_id}/policy-groups", + "summary": "Create a new group.", + "return_type": "subtenant_policy_group", "return_info": { "self": true, "custom": false, - "type": "subtenant_dark_theme_image" + "type": "subtenant_policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -50143,183 +77591,59 @@ "object", "etag", "type", - "groups", - "filter" - ], - "group_id": "Branding", - "operation_id": "clearAccountDarkImage", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": true, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_dark_theme_image_reference_enum", - "_key": "reference" - } + "filter", + "id", + "created_at", + "updated_at", + "user_count", + "application_count", + "apikey_count" ], - "method": "get", - "mode": "read", - "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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "light_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", - "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" + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "createAccountGroup", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "name": "group_id", + "in": "path", + "description": "The ID of the group to delete.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "group_id", + "external_param": false, + "parameter_fieldname": "group_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" }, { "description": "Authentication failure.", @@ -50395,7 +77719,7 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Forbidden, or Administrators group cannot be removed.", "schema": { "type": "object", "required": [ @@ -50468,7 +77792,7 @@ "_key": "403" }, { - "description": "Unknown image reference, or account not found.", + "description": "An account or group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -50541,13 +77865,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-images/dark/{reference}", - "summary": "Get metadata of a dark theme image.", - "return_type": "subtenant_dark_theme_image", + "path": "/v3/accounts/{account_id}/policy-groups/{group_id}", + "summary": "Delete a group.", + "return_type": "subtenant_policy_group", "return_info": { "self": true, "custom": false, - "type": "subtenant_dark_theme_image" + "type": "subtenant_policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -50555,20 +77879,20 @@ "object", "etag", "type", - "groups", - "filter", - "static_uri", - "updated_at" + "filter" ], - "group_id": "Branding", - "operation_id": "getAccountDarkImageData", + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "deleteAccountGroup", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "delete" }, { - "description": "Upload a new account dark theme branding image as form data in PNG or JPEG format.", + "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": [ { @@ -50579,258 +77903,269 @@ "type": "string", "entity_fieldname": "account_id", "api_fieldname": "account_id", - "external_param": true, + "external_param": false, "parameter_fieldname": "account_id", "_key": "account_id" }, { - "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", + "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": "image", - "_key": "image" + "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. Acceptable values: ASC, DESC. Default: ASC.", "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" + "ASC", + "DESC" ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_dark_theme_image_reference_enum", - "_key": "reference" + "api_fieldname": "order", + "entity_fieldname": "order", + "name": "order", + "in": "query", + "required": false, + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "subtenant_policy_group_order_enum", + "_key": "order" } ], - "method": "post", - "mode": "update", + "method": "get", + "mode": "list", "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" - } - ], - "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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "light_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", - "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": "201" - }, - { - "description": "Error in input data format, for example, image is too large.", + "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": [ + "account_id", + "apikey_count", + "etag", + "id", "name", - "message" + "object", + "user_count" ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "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.", + "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", - "description": "Name of the field which caused the error.", + "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" + } }, - "_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": "policy_group_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": "subtenant_policy_group" + } }, - "_key": "400" + "_key": "200" }, { "description": "Authentication failure.", @@ -50979,7 +78314,7 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "An account with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -51052,259 +78387,198 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart", - "summary": "Upload a dark theme image.", - "return_type": "subtenant_dark_theme_image", + "path": "/v3/accounts/{account_id}/policy-groups", + "summary": "Get policy groups.", + "return_type": "paginated_response(subtenant_policy_group)", "return_info": { - "self": true, - "custom": false, - "type": "subtenant_dark_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "static_uri", - "updated_at" - ], - "group_id": "Branding", - "operation_id": "uploadAccountDarkImageMultipart", - "additional_operations": [ - { - "operation_id": "uploadAccountDarkImage", - "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" + "self": true, + "custom": false, + "type": "subtenant_policy_group" + }, + "x_filter": { + "name": [ + "eq" + ] + }, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "total_count", + "has_more", + "data", + "name__eq" ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "name": "reference", - "in": "path", - "required": false, - "enum_reference": "subtenant_dark_theme_image_reference_enum", - "readOnly": false, - "_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" + "foreign_key_priority": "self", + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "getAllAccountGroups", + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "subtenant_policy_group" + }, + "request_content_type": "application/json", + "request_body": "json", + "_key": "list" }, { - "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": [ - "Tenant user interface configuration - images" - ], - "group_id": "Branding", - "_key": "subtenant_dark_theme_image" - }, - { - "swagger_models": [ - "BrandingColor" - ], - "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": "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": [ { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "type": "string", - "entity_fieldname": "account_id", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "account_id", - "external_param": true, + "entity_fieldname": "account_id", "parameter_fieldname": "account_id", + "in": "path", + "required": true, "_key": "account_id" }, { - "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", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "group_id", "in": "path", "required": true, - "enum_reference": "subtenant_light_theme_color_reference_enum", - "_key": "reference" + "_key": "id" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "read", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "account_id", + "apikey_count", + "etag", + "id", + "name", + "object", + "user_count" + ], "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", - "parameter_fieldname": "color", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "integer", + "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", + "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": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "group_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", "in": "body", - "required": false, - "_key": "color" + "required": true, + "_key": "name" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, + "description": "Entity name: always `group`.", "enum": [ - "branding_color" + "group" ], "api_fieldname": "object", "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, "_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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_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, + "description": "Last update UTC time RFC3339.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, "_key": "updated_at" + }, + { + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "entity_fieldname": "user_count", + "_key": "user_count" } ], + "description": "This object contains basic information about groups.", "foreign_key": { - "group": "Branding", - "entity": "subtenant_dark_theme_color" + "group": "Accounts", + "entity": "policy_group" } }, "_key": "200" @@ -51456,7 +78730,7 @@ "_key": "403" }, { - "description": "Color or account not found.", + "description": "An account or group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -51529,13 +78803,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-colors/light/{reference}", - "summary": "Reset branding color to default.", - "return_type": "void", + "path": "/v3/accounts/{account_id}/policy-groups/{group_id}", + "summary": "Get policy group.", + "return_type": "subtenant_policy_group", "return_info": { - "self": false, - "custom": true, - "type": "void" + "self": true, + "custom": false, + "type": "subtenant_policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -51543,157 +78817,265 @@ "object", "etag", "type", - "groups", "filter", - "color", - "updated_at" + "created_at", + "updated_at", + "name", + "user_count", + "application_count", + "apikey_count" ], - "group_id": "Branding", - "operation_id": "resetAccountLightColor", - "spec": { - "return_type": "void" + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" }, + "operation_id": "getAccountGroupSummary", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" }, { - "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": "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": [ { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "type": "string", - "entity_fieldname": "account_id", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "account_id", - "external_param": true, + "entity_fieldname": "account_id", "parameter_fieldname": "account_id", + "in": "path", + "required": true, "_key": "account_id" }, { - "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", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "group_id", "in": "path", "required": true, - "enum_reference": "subtenant_light_theme_color_reference_enum", - "_key": "reference" + "_key": "id" + }, + { + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "_key": "name" } ], - "method": "get", - "mode": "read", + "method": "put", + "mode": "update", "responses": [ { "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "account_id", + "apikey_count", + "etag", + "id", + "name", + "object", + "user_count" + ], "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", - "parameter_fieldname": "color", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" + }, + { + "type": "integer", + "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", + "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": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "group_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", "in": "body", - "required": false, - "_key": "color" + "required": true, + "_key": "name" }, { "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, + "description": "Entity name: always `group`.", "enum": [ - "branding_color" + "group" ], "api_fieldname": "object", "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, "_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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_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, + "description": "Last update UTC time RFC3339.", "api_fieldname": "updated_at", "entity_fieldname": "updated_at", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, "_key": "updated_at" + }, + { + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "entity_fieldname": "user_count", + "_key": "user_count" } ], + "description": "This object contains basic information about groups.", "foreign_key": { - "group": "Branding", - "entity": "subtenant_dark_theme_color" + "group": "Accounts", + "entity": "policy_group" } }, - "_key": "200" + "_key": "200" + }, + { + "description": "Error in input data, for example, the group name is too long.", + "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.", @@ -51842,7 +79224,7 @@ "_key": "403" }, { - "description": "Color or account not found.", + "description": "A group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -51915,13 +79297,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-colors/light/{reference}", - "summary": "Get light theme branding color.", - "return_type": "subtenant_light_theme_color", + "path": "/v3/accounts/{account_id}/policy-groups/{group_id}", + "summary": "Update the group name.", + "return_type": "subtenant_policy_group", "return_info": { "self": true, "custom": false, - "type": "subtenant_light_theme_color" + "type": "subtenant_policy_group" }, "x_filter": {}, "x_deprecation": null, @@ -51929,20 +79311,25 @@ "object", "etag", "type", - "groups", "filter", - "color", - "updated_at" + "created_at", + "updated_at", + "user_count", + "application_count", + "apikey_count" ], - "group_id": "Branding", - "operation_id": "getAccountLightColor", + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "updateAccountGroupName", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "read" + "_key": "update" }, { - "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": "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": [ { @@ -51953,619 +79340,577 @@ "type": "string", "entity_fieldname": "account_id", "api_fieldname": "account_id", - "external_param": true, + "external_param": false, "parameter_fieldname": "account_id", "_key": "account_id" }, { "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", + "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, - "_key": "color" + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" }, { - "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", + "name": "group_id", "in": "path", + "description": "The ID of the group to retrieve users for.", "required": true, - "enum_reference": "subtenant_light_theme_color_reference_enum", - "_key": "reference" + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "group_id", + "external_param": false, + "parameter_fieldname": "group_id", + "_key": "id" }, { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", + "required": false, "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", + "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, - "_key": "updated_at" + "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": "subtenant_policy_group_order_enum", + "_key": "order" } ], - "method": "put", - "mode": "update", + "method": "get", + "mode": "users", "responses": [ { - "description": "Color 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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "_key": "color" - }, - { - "type": "string", - "description": "Entity name: always 'branding_color'", - "readOnly": true, - "enum": [ - "branding_color" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "name": "object", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "object", - "required": false, - "_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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_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" - } - ], - "foreign_key": { - "group": "Branding", - "entity": "subtenant_dark_theme_color" - } - }, - "_key": "200" - }, - { - "description": "Error in input data format.", + "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", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "_key": "address" + }, + { + "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": "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", + "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", - "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": "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", - "description": "Message describing the error condition.", - "_key": "message" + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "_key": "phone_number" }, { "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": [ + "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", - "description": "Message describing the error condition.", - "_key": "message" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" }, { + "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "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" - }, - { - "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": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "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", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "Color or 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" + "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" - }, - { - "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/{reference}", - "summary": "Updates light theme branding color.", - "return_type": "subtenant_light_theme_color", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_light_theme_color" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Branding", - "operation_id": "setAccountLightColor", - "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", - "parameter_fieldname": "color", - "in": "body", - "required": false, - "readOnly": 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", - "name": "reference", - "in": "path", - "required": false, - "enum_reference": "subtenant_light_theme_color_reference_enum", - "readOnly": false, - "_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", - "parameter_fieldname": "updated_at", - "in": "body", - "required": false, - "_key": "updated_at" - } - ], - "field_renames": [], - "tags": [ - "Tenant user interface configuration - colors" - ], - "group_id": "Branding", - "_key": "subtenant_light_theme_color" - }, - { - "swagger_models": [ - "BrandingImage" - ], - "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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": true, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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": "subtenant_light_theme_image_reference_enum", - "_key": "reference" - } - ], - "method": "post", - "mode": "delete", - "responses": [ - { - "description": "Image reverted successfully.", - "_key": "204" + { + "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": "policy_group_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.", @@ -52714,7 +80059,7 @@ "_key": "403" }, { - "description": "Unknown image reference, or account not found.", + "description": "An account or group with that ID does not exist.", "schema": { "type": "object", "required": [ @@ -52787,200 +80132,502 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-images/light/{reference}/clear", - "summary": "Revert an image to light theme default.", - "return_type": "subtenant_light_theme_image", + "path": "/v3/accounts/{account_id}/policy-groups/{group_id}/users", + "summary": "Get users in a policy group.", + "return_type": "paginated_response(subtenant_user)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "subtenant_light_theme_image" + "type": "subtenant_user" + }, + "x_filter": { + "status": [ + "eq", + "in", + "nin" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", - "filter" + "filter", + "total_count", + "has_more", + "data", + "status__eq", + "status__in", + "status__nin" ], - "group_id": "Branding", - "operation_id": "clearAccountLightImage", - "pagination": false, + "group_id": "Accounts", + "parameter_map": { + "group_id": "id" + }, + "operation_id": "getUsersOfAccountGroup", + "foreign_key": { + "entity": "subtenant_user" + }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "users" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": false, + "required": true, + "_key": "account_id" + }, + { + "type": "integer", + "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", + "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": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "group_id", + "in": "path", + "required": true, + "readOnly": false, + "_key": "id" + }, + { + "type": "string", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", + "api_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "readOnly": false, + "_key": "name" + }, + { + "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" }, { - "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```", + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "api_fieldname": "user_count", + "readOnly": true, + "required": false, + "_key": "user_count" + } + ], + "field_renames": [], + "tags": [ + "Tenant accounts - policy groups" + ], + "group_id": "Accounts", + "_key": "subtenant_policy_group" + }, + { + "swagger_models": [ + "DeveloperCertificateResponseData", + "TrustedCertificateReq", + "TrustedCertificateResp", + "TrustedCertificateUpdateReq" + ], + "primary_key_field": "id", + "methods": [ + { + "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": [ { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, "type": "string", - "entity_fieldname": "account_id", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "account_id", - "external_param": true, + "entity_fieldname": "account_id", "parameter_fieldname": "account_id", + "in": "path", + "required": true, "_key": "account_id" }, { + "type": "string", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "entity_fieldname": "certificate", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_key": "certificate" + }, + { + "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", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "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", + "parameter_fieldname": "enrollment_mode", + "in": "body", + "required": false, + "_key": "enrollment_mode" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "entity_fieldname": "is_developer_certificate", + "_key": "is_developer_certificate" + }, + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", "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" + "lwm2m", + "bootstrap" ], + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "subtenant_trusted_certificate_service_enum", + "_key": "service" + }, + { "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_light_theme_image_reference_enum", - "_key": "reference" + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "subtenant_trusted_certificate_status_enum", + "_key": "status" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "Successful operation.", + "description": "New entity created.", "schema": { "type": "object", + "required": [ + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", + "name", + "object", + "service", + "subject", + "validity" + ], "properties": [ { "type": "string", - "description": "Entity name: always 'branding_image'", - "readOnly": true, + "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", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_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", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_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": "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", + "in": "body", + "required": false, + "_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", + "parameter_fieldname": "cert_id", + "in": "path", + "required": true, + "_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", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'trusted-cert'", "enum": [ - "branding_image" + "trusted-cert" ], "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": [ - "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" + "lwm2m", + "bootstrap" ], + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_service_enum", + "_key": "service" + }, + { "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_dark_theme_image_reference_enum", - "_key": "reference" + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_status_enum", + "_key": "status" }, { "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" + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" }, { "type": "string", "format": "date-time", "example": "2018-02-14T15:24:14Z", - "description": "Last update time in UTC.", - "readOnly": true, + "description": "Last update UTC time RFC3339.", "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": "Branding", - "entity": "subtenant_dark_theme_image" + "group": "Security", + "entity": "developer_certificate" } }, - "_key": "200" + "_key": "201" }, { - "description": "Authentication failure.", + "description": "Invalid certificate data, certificate validation failed, certificate already expired or certificate uses unsupported, or weak cipher.", "schema": { "type": "object", "required": [ @@ -53050,10 +80697,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -53123,10 +80770,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Unknown image reference, or account not found.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -53196,229 +80843,10 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/branding-images/light/{reference}", - "summary": "Get metadata of a light theme image.", - "return_type": "subtenant_light_theme_image", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_light_theme_image" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "static_uri", - "updated_at" - ], - "group_id": "Branding", - "operation_id": "getAccountLightImageData", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - }, - { - "description": "Upload a new account branding image as form data in PNG or JPEG format.", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": true, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "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" - ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "entity_fieldname": "reference", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_light_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" - } - ], - "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", - "name": "reference", - "in": "path", - "required": true, - "enum_reference": "subtenant_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", - "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_dark_theme_image" - } - }, - "_key": "201" + "_key": "403" }, { - "description": "Error in input data format, for example, image is too large.", + "description": "An account with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -53488,7 +80916,90 @@ } ] }, - "_key": "400" + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/trusted-certificates", + "summary": "Upload new trusted certificate.", + "return_type": "subtenant_trusted_certificate", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_trusted_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "signature", + "id", + "created_at", + "updated_at", + "owner_id", + "issuer", + "subject", + "validity", + "device_execution_mode", + "certificate_fingerprint", + "valid" + ], + "group_id": "Security", + "operation_id": "addAccountCertificate", + "notes": "Signature is not used by the SDK as it is a deprecated field.", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" + }, + { + "name": "cert_id", + "in": "path", + "description": "The ID of the trusted certificate to delete.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "cert_id", + "external_param": false, + "parameter_fieldname": "cert_id", + "_key": "id" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "entity_fieldname": "is_developer_certificate", + "_key": "is_developer_certificate" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" }, { "description": "Authentication failure.", @@ -53564,7 +81075,7 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -53637,7 +81148,7 @@ "_key": "403" }, { - "description": "Unknown image reference.", + "description": "An account or certificate with the given ID not found.", "schema": { "type": "object", "required": [ @@ -53710,13 +81221,13 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart", - "summary": "Upload a light theme image.", - "return_type": "subtenant_light_theme_image", + "path": "/v3/accounts/{account_id}/trusted-certificates/{cert_id}", + "summary": "Delete a trusted certificate by ID.", + "return_type": "subtenant_trusted_certificate", "return_info": { "self": true, "custom": false, - "type": "subtenant_light_theme_image" + "type": "subtenant_trusted_certificate" }, "x_filter": {}, "x_deprecation": null, @@ -53724,165 +81235,32 @@ "object", "etag", "type", - "groups", "filter", - "static_uri", - "updated_at" - ], - "group_id": "Branding", - "operation_id": "uploadAccountLightImageMultipart", - "additional_operations": [ - { - "operation_id": "uploadAccountLightImage", - "notes": "The multipart request is more generic and better supported by SDKs." - } - ], - "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" + "signature" ], - "type": "string", - "description": "Name of the image.", - "is_primary_key": true, - "_override": true, - "api_fieldname": "reference", - "name": "reference", - "in": "path", - "required": false, - "enum_reference": "subtenant_light_theme_image_reference_enum", - "readOnly": false, - "_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": [ - "Tenant user interface configuration - images" - ], - "group_id": "Branding", - "_key": "subtenant_light_theme_image" - }, - { - "swagger_models": [ - "DeveloperCertificateResponseData", - "TrustedCertificateReq", - "TrustedCertificateResp", - "TrustedCertificateUpdateReq" - ], - "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```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "parameter_fieldname": "account_id", - "in": "path", - "required": true, - "_key": "account_id" - }, - { - "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_key": "certificate" - }, + "group_id": "Security", + "operation_id": "deleteAccountCertificate", + "parameter_map": { + "cert_id": "id" + }, + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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```", + "field_renames": [], + "fields": [ { "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", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "_key": "enrollment_mode" + "description": "ID that uniquely identifies the developer certificate.", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "developerCertificateId", + "in": "path", + "required": true, + "_key": "id" }, { "description": "Whether or not this certificate is a developer certificate.", @@ -53894,104 +81272,26 @@ "api_fieldname": "is_developer_certificate", "entity_fieldname": "is_developer_certificate", "_key": "is_developer_certificate" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": false, - "enum_reference": "subtenant_trusted_certificate_service_enum", - "_key": "service" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "subtenant_trusted_certificate_status_enum", - "_key": "status" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "get_developer_certificate_info", "responses": [ { - "description": "New entity created.", + "description": "Developer certificate returned successfully.", "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}", + "description": "Account to which the developer certificate belongs.", "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", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_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", @@ -53999,40 +81299,28 @@ }, { "type": "string", - "maxLength": 500, + "description": "Description for the developer certificate.", "x-nullable": true, - "example": "Certificate created by me.", - "description": "Human readable description of this certificate.", "api_fieldname": "description", "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, "_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": "string", + "description": "PEM-format X.509 developer certificate.", + "api_fieldname": "developer_certificate", + "entity_fieldname": "developer_certificate", + "_key": "developer_certificate" }, { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "_key": "enrollment_mode" + "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", - "example": "1", "description": "API resource entity version.", "api_fieldname": "etag", "entity_fieldname": "etag", @@ -54040,133 +81328,57 @@ }, { "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", + "description": "ID that uniquely identifies the developer certificate.", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "cert_id", - "in": "path", - "required": true, "_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.", + "description": "Name of the developer certificate.", "api_fieldname": "name", "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, "_key": "name" }, { "type": "string", - "description": "Entity name: always 'trusted-cert'", - "enum": [ - "trusted-cert" - ], + "description": "Entity name: always `trusted-cert`.", "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" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_service_enum", - "_key": "service" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_status_enum", - "_key": "status" - }, - { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" - }, - { - "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": "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": "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": "Represents a trusted certificate in responses.", "foreign_key": { "group": "Security", "entity": "developer_certificate" } }, - "_key": "201" + "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" }, { - "description": "Invalid certificate data, certificate validation failed, certificate already expired or certificate uses unsupported, or weak cipher.", + "description": "Bad request.", "schema": { "type": "object", "required": [ @@ -54239,7 +81451,7 @@ "_key": "400" }, { - "description": "Authentication failure.", + "description": "Invalid access token.", "schema": { "type": "object", "required": [ @@ -54309,10 +81521,20 @@ } ] }, + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], "_key": "401" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Developer certificate not found with given ID.", "schema": { "type": "object", "required": [ @@ -54382,164 +81604,329 @@ } ] }, - "_key": "403" + "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": false, + "custom": false, + "type": "developer_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "signature", + "created_at", + "account_id", + "name", + "description", + "developer_certificate", + "developer_private_key", + "security_file_content" + ], + "group_id": "Security", + "operation_id": "getDeveloperCertificate", + "unaggregated": true, + "parameter_map": { + "developerCertificateId": "id" + }, + "foreign_key": { + "entity": "developer_certificate", + "group": "Security" + }, + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "get_developer_certificate_info" + }, + { + "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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" }, { - "description": "An account with the given ID does not exist.", + "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" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "entity_fieldname": "is_developer_certificate", + "_key": "is_developer_certificate" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "code", - "message", + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", + "name", "object", - "request_id", - "type" + "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", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_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", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, { "type": "integer", "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "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", + "parameter_fieldname": "enrollment_mode", + "in": "body", + "required": false, + "_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", + "parameter_fieldname": "cert_id", + "in": "path", + "required": true, + "_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", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "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" + "type": "string", + "description": "Entity name: always 'trusted-cert'", + "enum": [ + "trusted-cert" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_key": "object" }, { + "x-nullable": true, "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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": "Entity name, always `error`.", + "description": "Service name where the certificate is used.", "enum": [ - "error" + "lwm2m", + "bootstrap" ], - "_key": "object" + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_service_enum", + "_key": "service" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_status_enum", + "_key": "status" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" + }, + { + "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": "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" + } }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/trusted-certificates", - "summary": "Upload new trusted certificate.", - "return_type": "subtenant_trusted_certificate", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_trusted_certificate" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "signature", - "id", - "created_at", - "updated_at", - "owner_id", - "issuer", - "subject", - "validity", - "device_execution_mode", - "certificate_fingerprint", - "valid" - ], - "group_id": "Security", - "operation_id": "addAccountCertificate", - "notes": "Signature is not used by the SDK as it is a deprecated field.", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "name": "cert_id", - "in": "path", - "description": "The ID of the trusted certificate to delete.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "cert_id", - "external_param": false, - "parameter_fieldname": "cert_id", - "_key": "id" - }, - { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", - "_override": true, - "api_fieldname": "is_developer_certificate", - "entity_fieldname": "is_developer_certificate", - "_key": "is_developer_certificate" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Deleted successfully.", - "_key": "204" + "_key": "200" }, { "description": "Authentication failure.", @@ -54615,7 +82002,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": [ @@ -54688,7 +82075,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": [ @@ -54762,7 +82149,7 @@ } ], "path": "/v3/accounts/{account_id}/trusted-certificates/{cert_id}", - "summary": "Delete trusted certificate by ID.", + "summary": "Get a trusted certificate.", "return_type": "subtenant_trusted_certificate", "return_info": { "self": true, @@ -54775,30 +82162,99 @@ "object", "etag", "type", - "groups", "filter", - "signature" + "signature", + "created_at", + "updated_at", + "name", + "description", + "owner_id", + "certificate", + "service", + "issuer", + "subject", + "validity", + "status", + "device_execution_mode", + "enrollment_mode", + "certificate_fingerprint", + "valid" ], "group_id": "Security", - "operation_id": "deleteAccountCertificate", + "operation_id": "getAccountCertificate", "parameter_map": { "cert_id": "id" }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_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```", + "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": [ { "type": "string", - "description": "ID that uniquely identifies the developer certificate.", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "type": "string", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "entity_fieldname": "certificate", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_key": "certificate" + }, + { + "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", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "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", + "parameter_fieldname": "enrollment_mode", + "in": "body", + "required": false, + "_key": "enrollment_mode" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "developerCertificateId", + "parameter_fieldname": "cert_id", "in": "path", "required": true, "_key": "id" @@ -54813,26 +82269,104 @@ "api_fieldname": "is_developer_certificate", "entity_fieldname": "is_developer_certificate", "_key": "is_developer_certificate" + }, + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "subtenant_trusted_certificate_service_enum", + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "subtenant_trusted_certificate_status_enum", + "_key": "status" } ], - "method": "get", - "mode": "get_developer_certificate_info", + "method": "put", + "mode": "update", "responses": [ { - "description": "Developer certificate returned successfully.", + "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", + "name", + "object", + "service", + "subject", + "validity" + ], "properties": [ { "type": "string", - "description": "Account to which the developer certificate belongs.", + "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", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_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", @@ -54840,86 +82374,253 @@ }, { "type": "string", - "description": "Description for the developer certificate.", + "maxLength": 500, "x-nullable": true, + "example": "Certificate created by me.", + "description": "Human readable description of this certificate.", "api_fieldname": "description", "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, "_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": "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", + "in": "body", + "required": false, + "_key": "enrollment_mode" + }, { "type": "string", - "description": "PEM-format X.509 developer certificate.", - "api_fieldname": "developer_certificate", - "entity_fieldname": "developer_certificate", - "_key": "developer_certificate" + "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", + "parameter_fieldname": "cert_id", + "in": "path", + "required": true, + "_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", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "description": "Entity name: always 'trusted-cert'", + "enum": [ + "trusted-cert" + ], + "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": "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": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_service_enum", + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_status_enum", + "_key": "status" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" + }, + { + "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": "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" + } + }, + "_key": "200" + }, + { + "description": "Invalid certificate data, certificate validation failed, certificate already expired or certificate uses unsupported, or weak cipher.", + "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", - "_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": [ @@ -54989,10 +82690,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Invalid access token.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -55062,20 +82763,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": "An account or certificate with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -55119,144 +82810,518 @@ }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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}/trusted-certificates/{cert_id}", + "summary": "Update trusted certificate.", + "return_type": "subtenant_trusted_certificate", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_trusted_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "signature", + "created_at", + "updated_at", + "owner_id", + "issuer", + "subject", + "validity", + "device_execution_mode", + "certificate_fingerprint", + "valid" + ], + "group_id": "Security", + "operation_id": "updateAccountCertificate", + "parameter_map": { + "cert_id": "id" + }, + "notes": "Signature is not used by the SDK as it is a deprecated field.", + "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": false, + "required": true, + "_key": "account_id" + }, + { + "type": "string", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "parameter_fieldname": "certificate", + "in": "body", + "required": true, + "readOnly": false, + "_key": "certificate" + }, + { + "type": "string", + "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", + "description": "A SHA-256 fingerprint of the certificate.", + "api_fieldname": "certificate_fingerprint", + "readOnly": true, + "required": false, + "_key": "certificate_fingerprint" + }, + { + "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", + "maxLength": 500, + "x-nullable": true, + "example": "Certificate created by me.", + "description": "Human readable description of this certificate.", + "api_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "readOnly": false, + "_key": "description" + }, + { + "type": "integer", + "format": "int32", + "example": 1, + "description": "Device execution mode where 1 means a developer certificate.", + "api_fieldname": "device_execution_mode", + "readOnly": true, + "required": false, + "_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", + "parameter_fieldname": "enrollment_mode", + "in": "body", + "required": false, + "readOnly": false, + "_key": "enrollment_mode" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "cert_id", + "in": "path", + "required": true, + "readOnly": false, + "_key": "id" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "required": false, + "_key": "is_developer_certificate" + }, + { + "type": "string", + "example": "CN=issuer", + "description": "Issuer of the certificate.", + "api_fieldname": "issuer", + "readOnly": true, + "required": false, + "_key": "issuer" + }, + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": true, + "readOnly": false, + "_key": "name" + }, + { + "x-nullable": true, + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the owner.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner_id", + "readOnly": true, + "required": false, + "_key": "owner_id" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": true, + "enum_reference": "subtenant_trusted_certificate_service_enum", + "readOnly": false, + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "subtenant_trusted_certificate_status_enum", + "readOnly": false, + "_key": "status" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "readOnly": true, + "required": false, + "_key": "subject" + }, + { + "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": "boolean", + "example": true, + "description": "This read-only flag indicates whether the certificate is valid or not.", + "readOnly": true, + "api_fieldname": "valid", + "required": false, + "_key": "valid" + }, + { + "type": "string", + "format": "date-time", + "example": "2038-02-14T15:24:14Z", + "description": "Expiration time in UTC formatted as RFC3339.", + "api_fieldname": "validity", + "readOnly": true, + "required": false, + "_key": "validity" + } + ], + "field_renames": [], + "tags": [ + "Tenant security and identity - certificates", + "Security and identity - developer class certificates" + ], + "group_id": "Security", + "_key": "subtenant_trusted_certificate" + }, + { + "swagger_models": [ + "GroupSummaryList", + "UserInfoReq", + "UserInfoResp", + "UserUpdateReq" + ], + "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.\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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "name": "action", + "in": "query", + "description": "Create or invite user.", + "required": false, + "type": "string", + "default": "create", + "entity_fieldname": "action", + "api_fieldname": "action", + "external_param": true, + "parameter_fieldname": "action", + "_key": "action" + }, + { + "type": "string", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "api_fieldname": "address", + "entity_fieldname": "address", + "parameter_fieldname": "address", + "in": "body", + "required": false, + "_key": "address" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "user@arm.com", + "description": "The email address.", + "api_fieldname": "email", + "entity_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": false, + "_key": "email" + }, + { + "type": "string", + "maxLength": 100, + "example": "User Doe", + "x-nullable": true, + "description": "The full name of the user.", + "api_fieldname": "full_name", + "entity_fieldname": "full_name", + "parameter_fieldname": "full_name", + "in": "body", + "required": false, + "_key": "full_name" + }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has accepted General Terms and Conditions.", + "api_fieldname": "is_gtc_accepted", + "entity_fieldname": "is_gtc_accepted", + "parameter_fieldname": "is_gtc_accepted", + "in": "body", + "required": false, + "_key": "is_gtc_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has consented to receive marketing information.", + "api_fieldname": "is_marketing_accepted", + "entity_fieldname": "is_marketing_accepted", + "parameter_fieldname": "is_marketing_accepted", + "in": "body", + "required": false, + "_key": "is_marketing_accepted" + }, + { + "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", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "example": "01619571f3c00242ac12000600000000", + "description": "ID of the identity provider.", + "readOnly": false, + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "Pelion", + "readOnly": false, + "description": "Name of the identity provider.", + "_override": true, + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "description": "Identity provider type.", + "example": "NATIVE", + "readOnly": true, + "enum": [ + "NATIVE", + "MBED", + "SAML2", + "OIDC" + ], + "api_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } - ] - }, - "examples": [ - { - "object": "error", - "code": 404, - "type": "not_found", - "message": "Not Found. Not found: 016006724ff53ade90ed948d03c00001", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" + ], + "description": "Represents a user login profile in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "login_profile" } - ], - "_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": false, - "custom": false, - "type": "developer_certificate" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "signature", - "created_at", - "account_id", - "name", - "description", - "developer_certificate", - "developer_private_key", - "security_file_content" - ], - "group_id": "Security", - "operation_id": "getDeveloperCertificate", - "unaggregated": true, - "parameter_map": { - "developerCertificateId": "id" - }, - "foreign_key": { - "entity": "developer_certificate", - "group": "Security" - }, - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ + }, + "api_fieldname": "login_profiles", + "entity_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "_key": "login_profiles" + }, { "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "parameter_fieldname": "account_id", - "in": "path", - "required": true, - "_key": "account_id" + "example": "PZf9eEUH43DAPE9ULINFeuj", + "description": "The password when creating a new user. It will be generated when not present in the request.", + "x-nullable": true, + "api_fieldname": "password", + "entity_fieldname": "password", + "parameter_fieldname": "password", + "in": "body", + "required": false, + "_key": "password" }, { "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" + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "parameter_fieldname": "phone_number", + "in": "body", + "required": false, + "_key": "phone_number" }, { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", - "_override": true, - "api_fieldname": "is_developer_certificate", - "entity_fieldname": "is_developer_certificate", - "_key": "is_developer_certificate" + "pattern": "[\\w\\-,._@+=]{4,30}", + "type": "string", + "example": "admin", + "description": "A username.", + "x-nullable": true, + "api_fieldname": "username", + "entity_fieldname": "username", + "parameter_fieldname": "username", + "in": "body", + "required": false, + "_key": "username" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "Successful operation.", + "description": "New entity created.", "schema": { "type": "object", "required": [ "account_id", - "certificate", - "certificate_fingerprint", + "email", "etag", "id", - "issuer", - "name", "object", - "service", - "subject", - "validity" + "status" ], "properties": [ { @@ -55269,23 +83334,102 @@ "_key": "account_id" }, { - "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_key": "certificate" + "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" + } + }, + "api_fieldname": "active_sessions", + "entity_fieldname": "active_sessions", + "_key": "active_sessions" }, { "type": "string", - "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", - "description": "A SHA-256 fingerprint of the certificate.", - "api_fieldname": "certificate_fingerprint", - "entity_fieldname": "certificate_fingerprint", - "_key": "certificate_fingerprint" + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "api_fieldname": "address", + "entity_fieldname": "address", + "parameter_fieldname": "address", + "in": "body", + "required": false, + "_key": "address" }, { "type": "string", @@ -55297,37 +83441,44 @@ "_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", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" + "type": "integer", + "format": "int64", + "example": 1518630727683, + "description": "A timestamp of the user creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "entity_fieldname": "creation_time", + "_key": "creation_time" }, { - "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": "object", + "x-nullable": true, + "description": "User's account-specific custom properties. The value is a string.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "custom_fields", + "entity_fieldname": "custom_fields", + "_key": "custom_fields" }, { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "user@arm.com", + "description": "The email address.", + "api_fieldname": "email", + "entity_fieldname": "email", + "parameter_fieldname": "email", "in": "body", "required": false, - "_key": "enrollment_mode" + "_key": "email" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether the user's email address has been verified or not.", + "api_fieldname": "email_verified", + "entity_fieldname": "email_verified", + "_key": "email_verified" }, { "type": "string", @@ -55339,77 +83490,262 @@ }, { "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", + "maxLength": 100, + "example": "User Doe", + "x-nullable": true, + "description": "The full name of the user.", + "api_fieldname": "full_name", + "entity_fieldname": "full_name", + "parameter_fieldname": "full_name", + "in": "body", + "required": false, + "_key": "full_name" + }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the user.", "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "cert_id", + "parameter_fieldname": "user_id", "in": "path", "required": true, "_key": "id" }, { - "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "api_fieldname": "issuer", - "entity_fieldname": "issuer", - "_key": "issuer" + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has accepted General Terms and Conditions.", + "api_fieldname": "is_gtc_accepted", + "entity_fieldname": "is_gtc_accepted", + "parameter_fieldname": "is_gtc_accepted", + "in": "body", + "required": false, + "_key": "is_gtc_accepted" }, { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has consented to receive marketing information.", + "api_fieldname": "is_marketing_accepted", + "entity_fieldname": "is_marketing_accepted", + "parameter_fieldname": "is_marketing_accepted", + "in": "body", + "required": false, + "_key": "is_marketing_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", + "api_fieldname": "is_totp_enabled", + "entity_fieldname": "is_totp_enabled", + "parameter_fieldname": "is_totp_enabled", + "in": "body", + "required": false, + "_key": "is_totp_enabled" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest login of the user, in milliseconds.", + "api_fieldname": "last_login_time", + "entity_fieldname": "last_login_time", + "_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" + } + }, + "api_fieldname": "login_history", + "entity_fieldname": "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" + } + }, + "api_fieldname": "login_profiles", + "entity_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", "in": "body", "required": false, - "_key": "name" + "_key": "login_profiles" }, { "type": "string", - "description": "Entity name: always 'trusted-cert'", + "description": "Entity name: always `user`.", "enum": [ - "trusted-cert" + "user" ], "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" + "example": "PZf9eEUH43DAPE9ULINFeuj", + "description": "The password when creating a new user. It will be generated when not present in the request.", + "x-nullable": true, + "api_fieldname": "password", + "entity_fieldname": "password", + "parameter_fieldname": "password", + "in": "body", + "required": false, + "_key": "password" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest change of the user password, in milliseconds.", + "api_fieldname": "password_changed_time", + "entity_fieldname": "password_changed_time", + "_key": "password_changed_time" }, { "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "parameter_fieldname": "phone_number", "in": "body", "required": false, - "enum_reference": "trusted_certificate_service_enum", - "_key": "service" + "_key": "phone_number" }, { "type": "string", "example": "ACTIVE", - "description": "Status of the certificate.", + "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" ], "api_fieldname": "status", @@ -55417,16 +83753,18 @@ "parameter_fieldname": "status", "in": "body", "required": false, - "enum_reference": "trusted_certificate_status_enum", "_key": "status" }, { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" + "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" + }, + "api_fieldname": "totp_scratch_codes", + "entity_fieldname": "totp_scratch_codes", + "_key": "totp_scratch_codes" }, { "type": "string", @@ -55438,34 +83776,29 @@ "_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" - }, - { + "pattern": "[\\w\\-,._@+=]{4,30}", "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" + "example": "admin", + "description": "A username.", + "x-nullable": true, + "api_fieldname": "username", + "entity_fieldname": "username", + "parameter_fieldname": "username", + "in": "body", + "required": false, + "_key": "username" } ], - "description": "Represents a trusted certificate in responses.", + "description": "Represents a user in Device Management.", "foreign_key": { - "group": "Security", - "entity": "developer_certificate" + "group": "Accounts", + "entity": "user" } }, - "_key": "200" + "_key": "201" }, { - "description": "Authentication failure.", + "description": "Error in input data, for example, an invalid email address.", "schema": { "type": "object", "required": [ @@ -55535,10 +83868,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -55608,10 +83941,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Account or certificate with the given ID not found.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -55681,398 +84014,83 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/trusted-certificates/{cert_id}", - "summary": "Get trusted certificate by ID.", - "return_type": "subtenant_trusted_certificate", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_trusted_certificate" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "signature", - "created_at", - "updated_at", - "name", - "description", - "owner_id", - "certificate", - "service", - "issuer", - "subject", - "validity", - "status", - "device_execution_mode", - "enrollment_mode", - "certificate_fingerprint", - "valid" - ], - "group_id": "Security", - "operation_id": "getAccountCertificate", - "parameter_map": { - "cert_id": "id" - }, - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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 ```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "parameter_fieldname": "account_id", - "in": "path", - "required": true, - "_key": "account_id" - }, - { - "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_key": "certificate" - }, - { - "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", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "_key": "enrollment_mode" - }, - { - "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" - }, - { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", - "_override": true, - "api_fieldname": "is_developer_certificate", - "entity_fieldname": "is_developer_certificate", - "_key": "is_developer_certificate" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": false, - "enum_reference": "subtenant_trusted_certificate_service_enum", - "_key": "service" + "_key": "403" }, { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "subtenant_trusted_certificate_status_enum", - "_key": "status" - } - ], - "method": "put", - "mode": "update", - "responses": [ - { - "description": "Successful operation.", + "description": "An account with the specified ID does not exist.", "schema": { "type": "object", "required": [ - "account_id", - "certificate", - "certificate_fingerprint", - "etag", - "id", - "issuer", - "name", + "code", + "message", "object", - "service", - "subject", - "validity" + "request_id", + "type" ], "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", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_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", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_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", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "_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", - "parameter_fieldname": "cert_id", - "in": "path", - "required": true, - "_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", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" - }, - { - "type": "string", - "description": "Entity name: always 'trusted-cert'", - "enum": [ - "trusted-cert" - ], - "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" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_service_enum", - "_key": "service" + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_status_enum", - "_key": "status" + "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": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "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": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { - "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", + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "description": "Represents a trusted certificate in responses.", - "foreign_key": { - "group": "Security", - "entity": "developer_certificate" - } + ] }, - "_key": "200" + "_key": "404" }, { - "description": "Invalid certificate data, certificate validation failed, certificate already expired or certificate uses unsupported, or weak cipher.", + "description": "A user with the given username or email already exists.", "schema": { "type": "object", "required": [ @@ -56142,10 +84160,86 @@ } ] }, - "_key": "400" + "_key": "409" + } + ], + "path": "/v3/accounts/{account_id}/users", + "summary": "Create a new user.", + "return_type": "subtenant_user", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_user" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "id", + "created_at", + "updated_at", + "status", + "email_verified", + "creation_time", + "last_login_time", + "password_changed_time", + "login_history", + "is_totp_enabled", + "totp_scratch_codes", + "custom_fields", + "active_sessions" + ], + "group_id": "Accounts", + "parameter_map": { + "user_id": "id" + }, + "operation_id": "createAccountUser", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" }, { - "description": "Authentication failure.", + "name": "user_id", + "in": "path", + "description": "The ID of the user to delete.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "user_id", + "external_param": false, + "parameter_fieldname": "user_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Bad request, for example, trying to delete an active user.", "schema": { "type": "object", "required": [ @@ -56215,10 +84309,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -56288,10 +84382,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "An account or certificate with the given ID does not exist.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -56361,820 +84455,355 @@ } ] }, - "_key": "404" - } - ], - "path": "/v3/accounts/{account_id}/trusted-certificates/{cert_id}", - "summary": "Update trusted certificate.", - "return_type": "subtenant_trusted_certificate", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_trusted_certificate" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "signature", - "created_at", - "updated_at", - "owner_id", - "issuer", - "subject", - "validity", - "device_execution_mode", - "certificate_fingerprint", - "valid" - ], - "group_id": "Security", - "operation_id": "updateAccountCertificate", - "parameter_map": { - "cert_id": "id" - }, - "notes": "Signature is not used by the SDK as it is a deprecated field.", - "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": false, - "required": true, - "_key": "account_id" - }, - { - "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "parameter_fieldname": "certificate", - "in": "body", - "required": true, - "readOnly": false, - "_key": "certificate" - }, - { - "type": "string", - "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", - "description": "A SHA-256 fingerprint of the certificate.", - "api_fieldname": "certificate_fingerprint", - "readOnly": true, - "required": false, - "_key": "certificate_fingerprint" - }, - { - "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", - "maxLength": 500, - "x-nullable": true, - "example": "Certificate created by me.", - "description": "Human readable description of this certificate.", - "api_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "readOnly": false, - "_key": "description" - }, - { - "type": "integer", - "format": "int32", - "example": 1, - "description": "Device execution mode where 1 means a developer certificate.", - "api_fieldname": "device_execution_mode", - "readOnly": true, - "required": false, - "_key": "device_execution_mode" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "readOnly": false, - "_key": "enrollment_mode" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "parameter_fieldname": "cert_id", - "in": "path", - "required": true, - "readOnly": false, - "_key": "id" - }, - { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", - "_override": true, - "api_fieldname": "is_developer_certificate", - "required": false, - "_key": "is_developer_certificate" - }, - { - "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "api_fieldname": "issuer", - "readOnly": true, - "required": false, - "_key": "issuer" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": true, - "readOnly": false, - "_key": "name" - }, - { - "x-nullable": true, - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the owner.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner_id", - "readOnly": true, - "required": false, - "_key": "owner_id" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": true, - "enum_reference": "subtenant_trusted_certificate_service_enum", - "readOnly": false, - "_key": "service" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "subtenant_trusted_certificate_status_enum", - "readOnly": false, - "_key": "status" - }, - { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "readOnly": true, - "required": false, - "_key": "subject" - }, - { - "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": "boolean", - "example": true, - "description": "This read-only flag indicates whether the certificate is valid or not.", - "readOnly": true, - "api_fieldname": "valid", - "required": false, - "_key": "valid" - }, - { - "type": "string", - "format": "date-time", - "example": "2038-02-14T15:24:14Z", - "description": "Expiration time in UTC formatted as RFC3339.", - "api_fieldname": "validity", - "readOnly": true, - "required": false, - "_key": "validity" - } - ], - "field_renames": [], - "tags": [ - "Tenant device security - certificates", - "Device security - developer class certificates" - ], - "group_id": "Security", - "_key": "subtenant_trusted_certificate" - }, - { - "swagger_models": [ - "UserInfoReq", - "UserInfoResp", - "UserUpdateReq" - ], - "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```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "parameter_fieldname": "account_id", - "in": "path", - "required": true, - "_key": "account_id" - }, - { - "name": "action", - "in": "query", - "description": "Create or invite user.", - "required": false, - "type": "string", - "default": "create", - "entity_fieldname": "action", - "api_fieldname": "action", - "external_param": true, - "parameter_fieldname": "action", - "_key": "action" - }, - { - "type": "string", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "api_fieldname": "address", - "entity_fieldname": "address", - "parameter_fieldname": "address", - "in": "body", - "required": false, - "_key": "address" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "user@arm.com", - "description": "The email address.", - "api_fieldname": "email", - "entity_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": false, - "_key": "email" - }, - { - "type": "string", - "maxLength": 100, - "example": "User Doe", - "x-nullable": true, - "description": "The full name of the user.", - "api_fieldname": "full_name", - "entity_fieldname": "full_name", - "parameter_fieldname": "full_name", - "in": "body", - "required": false, - "_key": "full_name" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has accepted General Terms and Conditions.", - "api_fieldname": "is_gtc_accepted", - "entity_fieldname": "is_gtc_accepted", - "parameter_fieldname": "is_gtc_accepted", - "in": "body", - "required": false, - "_key": "is_gtc_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has consented to receive marketing information.", - "api_fieldname": "is_marketing_accepted", - "entity_fieldname": "is_marketing_accepted", - "parameter_fieldname": "is_marketing_accepted", - "in": "body", - "required": false, - "_key": "is_marketing_accepted" + "_key": "403" }, { - "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": { + "description": "An account or user with the specified ID does not exist.", + "schema": { "type": "object", "required": [ - "id" + "code", + "message", + "object", + "request_id", + "type" ], "properties": [ { - "type": "string", - "description": "ID of the identity provider.", - "readOnly": false, - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "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", - "readOnly": false, - "description": "Name of the identity provider.", - "_override": true, - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Identity provider type.", - "readOnly": true, + "description": "Entity name, always `error`.", "enum": [ - "NATIVE", - "MBED", - "SAML2", - "OIDC" + "error" ], - "api_fieldname": "type", - "entity_fieldname": "type", + "_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": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } + ] }, - "api_fieldname": "login_profiles", - "entity_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "_key": "login_profiles" + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/users/{user_id}", + "summary": "Delete a user.", + "return_type": "subtenant_user", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_user" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Accounts", + "parameter_map": { + "user_id": "id" + }, + "operation_id": "deleteAccountUser", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "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": [ + { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, + "type": "string", + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" }, { "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, - "api_fieldname": "password", - "entity_fieldname": "password", - "parameter_fieldname": "password", - "in": "body", + "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, - "_key": "password" + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" }, { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, "type": "string", - "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", - "x-nullable": true, - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "parameter_fieldname": "phone_number", - "in": "body", + "entity_fieldname": "id", + "api_fieldname": "user_id", + "external_param": false, + "parameter_fieldname": "user_id", + "_key": "id" + }, + { + "name": "include", + "in": "query", + "description": "Comma-separated additional data to return. Currently supported: total_count.", "required": false, - "_key": "phone_number" + "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" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "api_fieldname": "username", - "entity_fieldname": "username", - "parameter_fieldname": "username", - "in": "body", + "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, - "_key": "username" + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "subtenant_user_order_enum", + "_key": "order" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "policy_groups", "responses": [ { - "description": "New entity created.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "account_id", - "email", - "etag", - "id", + "data", + "has_more", + "limit", "object", - "status" + "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" + "api_fieldname": "after", + "entity_fieldname": "after", + "name": "after", + "in": "query", + "required": false, + "external_param": true, + "parameter_fieldname": "after", + "_key": "after" }, { "type": "array", - "description": "List of active user sessions.", + "description": "A list of entities.", "items": { "type": "object", "required": [ "account_id", - "ip_address", - "login_time", + "apikey_count", + "etag", + "id", + "name", "object", - "reference_token", - "user_agent" + "user_count" ], "properties": [ { "type": "string", "example": "01619571e2e90242ac12000600000000", - "description": "The UUID of the account.", + "description": "The ID of the account this group belongs to.", "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", "_key": "account_id" }, { - "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": "integer", + "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": "string", - "example": "rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk", - "description": "The reference token.", - "api_fieldname": "reference_token", - "entity_fieldname": "reference_token", - "_key": "reference_token" + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" }, - { - "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" - } - }, - "api_fieldname": "active_sessions", - "entity_fieldname": "active_sessions", - "_key": "active_sessions" - }, - { - "type": "string", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "api_fieldname": "address", - "entity_fieldname": "address", - "parameter_fieldname": "address", - "in": "body", - "required": false, - "_key": "address" - }, - { - "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": "A timestamp of the user creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "entity_fieldname": "creation_time", - "_key": "creation_time" - }, - { - "type": "object", - "x-nullable": true, - "description": "User's account-specific custom properties. The value is a string.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "custom_fields", - "entity_fieldname": "custom_fields", - "_key": "custom_fields" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "user@arm.com", - "description": "The email address.", - "api_fieldname": "email", - "entity_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": false, - "_key": "email" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether the user's email address has been verified or not.", - "api_fieldname": "email_verified", - "entity_fieldname": "email_verified", - "_key": "email_verified" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "maxLength": 100, - "example": "User Doe", - "x-nullable": true, - "description": "The full name of the user.", - "api_fieldname": "full_name", - "entity_fieldname": "full_name", - "parameter_fieldname": "full_name", - "in": "body", - "required": false, - "_key": "full_name" - }, - { - "type": "array", - "description": "A list of group IDs this user belongs to. Can be updated by the Account Admin only.", - "items": { - "type": "string" - }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "groups", - "required": false, - "x-nullable": true, - "_key": "groups" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "user_id", - "in": "path", - "required": true, - "_key": "id" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has accepted General Terms and Conditions.", - "api_fieldname": "is_gtc_accepted", - "entity_fieldname": "is_gtc_accepted", - "parameter_fieldname": "is_gtc_accepted", - "in": "body", - "required": false, - "_key": "is_gtc_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has consented to receive marketing information.", - "api_fieldname": "is_marketing_accepted", - "entity_fieldname": "is_marketing_accepted", - "parameter_fieldname": "is_marketing_accepted", - "in": "body", - "required": false, - "_key": "is_marketing_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", - "api_fieldname": "is_totp_enabled", - "entity_fieldname": "is_totp_enabled", - "parameter_fieldname": "is_totp_enabled", - "in": "body", - "required": false, - "_key": "is_totp_enabled" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest login of the user, in milliseconds.", - "api_fieldname": "last_login_time", - "entity_fieldname": "last_login_time", - "_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" + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_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": "boolean", - "example": true, - "description": "Flag indicating whether login attempt was successful or not.", - "api_fieldname": "success", - "entity_fieldname": "success", - "_key": "success" + "example": "1", + "description": "API resource entity version.", + "_key": "etag" }, { "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" - } - }, - "api_fieldname": "login_history", - "entity_fieldname": "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", - "description": "ID of the identity provider.", - "readOnly": false, - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", + "pattern": "[a-f0-9]{32}", "_key": "id" }, { "type": "string", - "readOnly": false, - "description": "Name of the identity provider.", - "_override": true, - "api_fieldname": "name", - "entity_fieldname": "name", + "maxLength": 100, + "example": "Administrators", + "description": "The name of the group.", "_key": "name" }, { "type": "string", - "description": "Identity provider type.", - "readOnly": true, + "description": "Entity name: always `group`.", "enum": [ - "NATIVE", - "MBED", - "SAML2", - "OIDC" + "group" ], - "api_fieldname": "type", - "entity_fieldname": "type", - "_key": "type" + "_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": "Represents a user login profile in Device Management.", + "description": "This object contains basic information about groups.", "foreign_key": { "group": "Accounts", - "entity": "login_profile" + "entity": "subtenant_policy_group" } }, - "api_fieldname": "login_profiles", - "entity_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", + "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, - "_key": "login_profiles" + "default": 50, + "external_param": true, + "parameter_fieldname": "limit", + "_key": "limit" }, { "type": "string", - "description": "Entity name: always `user`.", + "description": "Entity name: always `list`.", "enum": [ - "user" + "list" ], "api_fieldname": "object", "entity_fieldname": "object", @@ -57182,100 +84811,42 @@ }, { "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, - "api_fieldname": "password", - "entity_fieldname": "password", - "parameter_fieldname": "password", - "in": "body", - "required": false, - "_key": "password" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest change of the user password, in milliseconds.", - "api_fieldname": "password_changed_time", - "entity_fieldname": "password_changed_time", - "_key": "password_changed_time" - }, - { - "type": "string", - "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", - "x-nullable": true, - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "parameter_fieldname": "phone_number", - "in": "body", - "required": false, - "_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.", + "description": "Record order based on creation. Acceptable values: ASC, DESC. Default: ASC.", "enum": [ - "ENROLLING", - "INVITED", - "ACTIVE", - "RESET", - "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, - "_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" - }, - "api_fieldname": "totp_scratch_codes", - "entity_fieldname": "totp_scratch_codes", - "_key": "totp_scratch_codes" - }, - { - "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" + "default": "ASC", + "external_param": true, + "parameter_fieldname": "order", + "enum_reference": "user_order_enum", + "_key": "order" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", - "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "api_fieldname": "username", - "entity_fieldname": "username", - "parameter_fieldname": "username", - "in": "body", - "required": false, - "_key": "username" + "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 a user in Device Management.", + "pagination": true, "foreign_key": { "group": "Accounts", - "entity": "user" + "entity": "subtenant_policy_group" } }, - "_key": "201" + "_key": "200" }, { - "description": "Error in input data, for example, an invalid email address.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -57345,10 +84916,10 @@ } ] }, - "_key": "400" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -57418,10 +84989,10 @@ } ] }, - "_key": "401" + "_key": "403" }, { - "description": "Forbidden.", + "description": "An account or user with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -57491,303 +85062,558 @@ } ] }, - "_key": "403" + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/users/{user_id}/groups", + "summary": "Get policy groups for a user.", + "return_type": "paginated_response(subtenant_policy_group)", + "return_info": { + "self": false, + "custom": false, + "type": "subtenant_policy_group" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "total_count", + "has_more", + "data" + ], + "group_id": "Accounts", + "parameter_map": { + "user_id": "id" + }, + "operation_id": "getGroupsOfAccountUser", + "foreign_key": { + "entity": "subtenant_policy_group" + }, + "pagination": true, + "request_content_type": "application/json", + "request_body": "json", + "_key": "policy_groups" + }, + { + "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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" }, { - "description": "An account with the specified ID does not exist.", + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the user.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "user_id", + "in": "path", + "required": true, + "_key": "id" + } + ], + "method": "get", + "mode": "read", + "responses": [ + { + "description": "Successful operation.", "schema": { "type": "object", "required": [ - "code", - "message", + "account_id", + "email", + "etag", + "id", "object", - "request_id", - "type" + "status" ], "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.", + "description": "List of active user sessions.", "items": { "type": "object", "required": [ - "name", - "message" + "account_id", + "ip_address", + "login_time", + "object", + "reference_token", + "user_agent" ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "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", - "description": "Name of the field which caused the error.", - "_key": "name" + "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": "fields" + "api_fieldname": "active_sessions", + "entity_fieldname": "active_sessions", + "_key": "active_sessions" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "api_fieldname": "address", + "entity_fieldname": "address", + "parameter_fieldname": "address", + "in": "body", + "required": false, + "_key": "address" }, { "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "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": "A timestamp of the user creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "entity_fieldname": "creation_time", + "_key": "creation_time" + }, + { + "type": "object", + "x-nullable": true, + "description": "User's account-specific custom properties. The value is a string.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "custom_fields", + "entity_fieldname": "custom_fields", + "_key": "custom_fields" }, { + "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "user@arm.com", + "description": "The email address.", + "api_fieldname": "email", + "entity_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": false, + "_key": "email" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether the user's email address has been verified or not.", + "api_fieldname": "email_verified", + "entity_fieldname": "email_verified", + "_key": "email_verified" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "404" - }, - { - "description": "A user with the given username or email already exists.", - "schema": { - "type": "object", - "required": [ - "code", - "message", - "object", - "request_id", - "type" - ], - "properties": [ + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "maxLength": 100, + "example": "User Doe", + "x-nullable": true, + "description": "The full name of the user.", + "api_fieldname": "full_name", + "entity_fieldname": "full_name", + "parameter_fieldname": "full_name", + "in": "body", + "required": false, + "_key": "full_name" + }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the user.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "user_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has accepted General Terms and Conditions.", + "api_fieldname": "is_gtc_accepted", + "entity_fieldname": "is_gtc_accepted", + "parameter_fieldname": "is_gtc_accepted", + "in": "body", + "required": false, + "_key": "is_gtc_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has consented to receive marketing information.", + "api_fieldname": "is_marketing_accepted", + "entity_fieldname": "is_marketing_accepted", + "parameter_fieldname": "is_marketing_accepted", + "in": "body", + "required": false, + "_key": "is_marketing_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", + "api_fieldname": "is_totp_enabled", + "entity_fieldname": "is_totp_enabled", + "parameter_fieldname": "is_totp_enabled", + "in": "body", + "required": false, + "_key": "is_totp_enabled" + }, { "type": "integer", - "format": "int32", - "description": "HTTP response code", - "example": 400, - "_key": "code" + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest login of the user, in milliseconds.", + "api_fieldname": "last_login_time", + "entity_fieldname": "last_login_time", + "_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" + } + }, + "api_fieldname": "login_history", + "entity_fieldname": "login_history", + "_key": "login_history" }, { "type": "array", - "description": "Request fields which failed validation.", + "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": [ - "name", - "message" + "id" ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "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", - "description": "Name of the field which caused the error.", + "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": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "api_fieldname": "login_profiles", + "entity_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "_key": "login_profiles" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always `user`.", "enum": [ - "error" + "user" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_key": "object" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "PZf9eEUH43DAPE9ULINFeuj", + "description": "The password when creating a new user. It will be generated when not present in the request.", + "x-nullable": true, + "api_fieldname": "password", + "entity_fieldname": "password", + "parameter_fieldname": "password", + "in": "body", + "required": false, + "_key": "password" }, - { - "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "409" - } - ], - "path": "/v3/accounts/{account_id}/users", - "summary": "Create a new user.", - "return_type": "subtenant_user", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_user" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "id", - "created_at", - "updated_at", - "status", - "email_verified", - "creation_time", - "last_login_time", - "password_changed_time", - "login_history", - "is_totp_enabled", - "totp_scratch_codes", - "custom_fields", - "active_sessions" - ], - "group_id": "Accounts", - "parameter_map": { - "user_id": "id" - }, - "operation_id": "createAccountUser", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "name": "user_id", - "in": "path", - "description": "The ID of the user to delete.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "user_id", - "external_param": false, - "parameter_fieldname": "user_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Deleted successfully.", - "_key": "204" - }, - { - "description": "Bad request, for example, trying to delete an active user.", - "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" + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest change of the user password, in milliseconds.", + "api_fieldname": "password_changed_time", + "entity_fieldname": "password_changed_time", + "_key": "password_changed_time" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "parameter_fieldname": "phone_number", + "in": "body", + "required": false, + "_key": "phone_number" }, { "type": "string", - "description": "Entity name, always `error`.", + "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": [ - "error" + "ENROLLING", + "INVITED", + "ACTIVE", + "RESET", + "INACTIVE" ], - "_key": "object" + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "_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" + }, + "api_fieldname": "totp_scratch_codes", + "entity_fieldname": "totp_scratch_codes", + "_key": "totp_scratch_codes" }, { "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" }, { + "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "example": "admin", + "description": "A username.", + "x-nullable": true, + "api_fieldname": "username", + "entity_fieldname": "username", + "parameter_fieldname": "username", + "in": "body", + "required": false, + "_key": "username" } - ] + ], + "description": "Represents a user in Device Management.", + "foreign_key": { + "group": "Accounts", + "entity": "user" + } }, - "_key": "400" + "_key": "200" }, { "description": "Authentication failure.", @@ -58010,7 +85836,7 @@ } ], "path": "/v3/accounts/{account_id}/users/{user_id}", - "summary": "Delete a user.", + "summary": "Details of the user.", "return_type": "subtenant_user", "return_info": { "self": true, @@ -58023,21 +85849,42 @@ "object", "etag", "type", + "filter", + "created_at", + "updated_at", + "status", + "username", + "password", + "full_name", + "email", + "address", + "phone_number", "groups", - "filter" + "is_gtc_accepted", + "is_marketing_accepted", + "email_verified", + "creation_time", + "last_login_time", + "password_changed_time", + "login_history", + "is_totp_enabled", + "login_profiles", + "totp_scratch_codes", + "custom_fields", + "active_sessions" ], "group_id": "Accounts", "parameter_map": { "user_id": "id" }, - "operation_id": "deleteAccountUser", + "operation_id": "getAccountUser", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "read" }, { - "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": "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": [ { @@ -58052,6 +85899,44 @@ "required": true, "_key": "account_id" }, + { + "type": "string", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "api_fieldname": "address", + "entity_fieldname": "address", + "parameter_fieldname": "address", + "in": "body", + "required": false, + "_key": "address" + }, + { + "type": "string", + "maxLength": 100, + "example": "User Doe", + "x-nullable": true, + "description": "The full name of the user.", + "api_fieldname": "full_name", + "entity_fieldname": "full_name", + "parameter_fieldname": "full_name", + "in": "body", + "required": false, + "_key": "full_name" + }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, { "type": "string", "example": "01619571e2e89242ac12000600000000", @@ -58063,10 +85948,137 @@ "in": "path", "required": true, "_key": "id" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has accepted General Terms and Conditions.", + "api_fieldname": "is_gtc_accepted", + "entity_fieldname": "is_gtc_accepted", + "parameter_fieldname": "is_gtc_accepted", + "in": "body", + "required": false, + "_key": "is_gtc_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has consented to receive marketing information.", + "api_fieldname": "is_marketing_accepted", + "entity_fieldname": "is_marketing_accepted", + "parameter_fieldname": "is_marketing_accepted", + "in": "body", + "required": false, + "_key": "is_marketing_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", + "api_fieldname": "is_totp_enabled", + "entity_fieldname": "is_totp_enabled", + "parameter_fieldname": "is_totp_enabled", + "in": "body", + "required": false, + "_key": "is_totp_enabled" + }, + { + "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" + } + }, + "api_fieldname": "login_profiles", + "entity_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "_key": "login_profiles" + }, + { + "type": "string", + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "api_fieldname": "phone_number", + "entity_fieldname": "phone_number", + "parameter_fieldname": "phone_number", + "in": "body", + "required": false, + "_key": "phone_number" + }, + { + "pattern": "[\\w\\-,._@+=]{4,30}", + "type": "string", + "example": "admin", + "description": "A username.", + "x-nullable": true, + "api_fieldname": "username", + "entity_fieldname": "username", + "parameter_fieldname": "username", + "in": "body", + "required": false, + "_key": "username" } ], - "method": "get", - "mode": "read", + "method": "put", + "mode": "update", "responses": [ { "description": "Successful operation.", @@ -58113,6 +86125,15 @@ "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", @@ -58251,19 +86272,15 @@ }, { "type": "array", - "description": "A list of group IDs this user belongs to. Can be updated by the Account Admin only.", + "description": "A list of IDs of the groups this user belongs to.", "items": { "type": "string" }, "api_fieldname": "groups", "entity_fieldname": "groups", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, "parameter_fieldname": "groups", + "in": "body", "required": false, - "x-nullable": true, "_key": "groups" }, { @@ -58389,6 +86406,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, @@ -58398,6 +86425,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -58408,6 +86436,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -58416,7 +86445,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -58537,6 +86566,79 @@ }, "_key": "200" }, + { + "description": "Error in input data, for example, an invalid email address.", + "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": { @@ -58684,7 +86786,7 @@ "_key": "403" }, { - "description": "An account or user with the specified ID does not exist.", + "description": "An account or user with the given ID does not exist.", "schema": { "type": "object", "required": [ @@ -58755,10 +86857,83 @@ ] }, "_key": "404" + }, + { + "description": "A user with the given username or email 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": [ + "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/{account_id}/users/{user_id}", - "summary": "Details of the user.", + "summary": "Update user details.", "return_type": "subtenant_user", "return_info": { "self": true, @@ -58771,26 +86946,18 @@ "object", "etag", "type", - "groups", "filter", + "email", + "two_factor_auth_enabled", + "status", "created_at", "updated_at", - "status", - "username", "password", - "full_name", - "email", - "address", - "phone_number", - "is_gtc_accepted", - "is_marketing_accepted", "email_verified", "creation_time", "last_login_time", "password_changed_time", "login_history", - "is_totp_enabled", - "login_profiles", "totp_scratch_codes", "custom_fields", "active_sessions" @@ -58798,1099 +86965,1092 @@ "group_id": "Accounts", "parameter_map": { "user_id": "id" - }, - "operation_id": "getAccountUser", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "parameter_fieldname": "account_id", - "in": "path", - "required": true, - "_key": "account_id" - }, - { - "type": "string", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "api_fieldname": "address", - "entity_fieldname": "address", - "parameter_fieldname": "address", - "in": "body", - "required": false, - "_key": "address" - }, - { - "type": "string", - "maxLength": 100, - "example": "User Doe", - "x-nullable": true, - "description": "The full name of the user.", - "api_fieldname": "full_name", - "entity_fieldname": "full_name", - "parameter_fieldname": "full_name", - "in": "body", - "required": false, - "_key": "full_name" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "user_id", - "in": "path", - "required": true, - "_key": "id" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has accepted General Terms and Conditions.", - "api_fieldname": "is_gtc_accepted", - "entity_fieldname": "is_gtc_accepted", - "parameter_fieldname": "is_gtc_accepted", - "in": "body", - "required": false, - "_key": "is_gtc_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has consented to receive marketing information.", - "api_fieldname": "is_marketing_accepted", - "entity_fieldname": "is_marketing_accepted", - "parameter_fieldname": "is_marketing_accepted", - "in": "body", - "required": false, - "_key": "is_marketing_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", - "api_fieldname": "is_totp_enabled", - "entity_fieldname": "is_totp_enabled", - "parameter_fieldname": "is_totp_enabled", - "in": "body", - "required": false, - "_key": "is_totp_enabled" - }, - { - "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": "type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "api_fieldname": "login_profiles", - "entity_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "_key": "login_profiles" - }, + }, + "operation_id": "updateAccountUser", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "update" + }, + { + "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": [ { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, "type": "string", - "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", - "x-nullable": true, - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "parameter_fieldname": "phone_number", - "in": "body", - "required": false, - "_key": "phone_number" + "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, + "parameter_fieldname": "account_id", + "_key": "account_id" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "api_fieldname": "username", - "entity_fieldname": "username", - "parameter_fieldname": "username", - "in": "body", - "required": false, - "_key": "username" + "entity_fieldname": "id", + "api_fieldname": "user_id", + "external_param": false, + "parameter_fieldname": "user_id", + "_key": "id" } ], - "method": "put", - "mode": "update", + "method": "post", + "mode": "validate_email", "responses": [ { - "description": "Successful operation.", + "description": "Email validation successfully requested.", + "_key": "204" + }, + { + "description": "Authentication failure.", "schema": { "type": "object", "required": [ - "account_id", - "email", - "etag", - "id", + "code", + "message", "object", - "status" + "request_id", + "type" ], "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": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "type": "array", - "description": "List of active user sessions.", + "description": "Request fields which failed validation.", "items": { "type": "object", "required": [ - "account_id", - "ip_address", - "login_time", - "object", - "reference_token", - "user_agent" + "name", + "message" ], "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", - "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" + "description": "Message describing the error condition.", + "_key": "message" }, { "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": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents an active user session.", - "foreign_key": { - "group": "Accounts", - "entity": "active_session" - } - }, - "api_fieldname": "active_sessions", - "entity_fieldname": "active_sessions", - "_key": "active_sessions" - }, - { - "type": "string", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "api_fieldname": "address", - "entity_fieldname": "address", - "parameter_fieldname": "address", - "in": "body", - "required": false, - "_key": "address" - }, - { - "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": "A timestamp of the user creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "entity_fieldname": "creation_time", - "_key": "creation_time" - }, - { - "type": "object", - "x-nullable": true, - "description": "User's account-specific custom properties. The value is a string.", - "additionalProperties": { - "type": "string" + ] }, - "api_fieldname": "custom_fields", - "entity_fieldname": "custom_fields", - "_key": "custom_fields" + "_key": "fields" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "example": "user@arm.com", - "description": "The email address.", - "api_fieldname": "email", - "entity_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": false, - "_key": "email" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether the user's email address has been verified or not.", - "api_fieldname": "email_verified", - "entity_fieldname": "email_verified", - "_key": "email_verified" + "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", - "maxLength": 100, - "example": "User Doe", - "x-nullable": true, - "description": "The full name of the user.", - "api_fieldname": "full_name", - "entity_fieldname": "full_name", - "parameter_fieldname": "full_name", - "in": "body", - "required": false, - "_key": "full_name" - }, - { - "type": "array", - "description": "A list of group IDs this user belongs to. Can be updated by the Account Admin only.", - "items": { - "type": "string" - }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "groups", - "required": false, - "x-nullable": true, - "_key": "groups" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "user_id", - "in": "path", - "required": true, - "_key": "id" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has accepted General Terms and Conditions.", - "api_fieldname": "is_gtc_accepted", - "entity_fieldname": "is_gtc_accepted", - "parameter_fieldname": "is_gtc_accepted", - "in": "body", - "required": false, - "_key": "is_gtc_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has consented to receive marketing information.", - "api_fieldname": "is_marketing_accepted", - "entity_fieldname": "is_marketing_accepted", - "parameter_fieldname": "is_marketing_accepted", - "in": "body", - "required": false, - "_key": "is_marketing_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", - "api_fieldname": "is_totp_enabled", - "entity_fieldname": "is_totp_enabled", - "parameter_fieldname": "is_totp_enabled", - "in": "body", - "required": false, - "_key": "is_totp_enabled" - }, + "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": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest login of the user, in milliseconds.", - "api_fieldname": "last_login_time", - "entity_fieldname": "last_login_time", - "_key": "last_login_time" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { "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.", + "description": "Request fields which failed validation.", "items": { "type": "object", "required": [ - "date", - "ip_address", - "success", - "user_agent" + "name", + "message" ], "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" + "description": "Message describing the error condition.", + "_key": "message" }, { "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": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents an entry in login history.", - "foreign_key": { - "group": "Accounts", - "entity": "login_history" - } + ] }, - "api_fieldname": "login_history", - "entity_fieldname": "login_history", - "_key": "login_history" + "_key": "fields" }, { - "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": "type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "api_fieldname": "login_profiles", - "entity_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "_key": "login_profiles" + "type": "string", + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "description": "Entity name: always `user`.", + "description": "Entity name, always `error`.", "enum": [ - "user" + "error" ], - "api_fieldname": "object", - "entity_fieldname": "object", "_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, - "api_fieldname": "password", - "entity_fieldname": "password", - "parameter_fieldname": "password", - "in": "body", - "required": false, - "_key": "password" + "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": "An account or user with the specified ID does not exist.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], + "properties": [ { "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest change of the user password, in milliseconds.", - "api_fieldname": "password_changed_time", - "entity_fieldname": "password_changed_time", - "_key": "password_changed_time" + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "type": "string", - "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", - "x-nullable": true, - "api_fieldname": "phone_number", - "entity_fieldname": "phone_number", - "parameter_fieldname": "phone_number", - "in": "body", - "required": false, - "_key": "phone_number" + "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": "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" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "_key": "status" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { - "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" - }, - "api_fieldname": "totp_scratch_codes", - "entity_fieldname": "totp_scratch_codes", - "_key": "totp_scratch_codes" + "type": "string", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_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" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "api_fieldname": "username", - "entity_fieldname": "username", - "parameter_fieldname": "username", - "in": "body", - "required": false, - "_key": "username" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } + ] + }, + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/users/{user_id}/validate-email", + "summary": "Validate the user email.", + "return_type": "subtenant_user", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_user" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Accounts", + "parameter_map": { + "user_id": "id" + }, + "operation_id": "validateAccountUserEmail", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "validate_email" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": false, + "required": true, + "_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" ], - "description": "Represents a user in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "user" - } + "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" + } + }, + "api_fieldname": "active_sessions", + "readOnly": true, + "required": false, + "_key": "active_sessions" + }, + { + "type": "string", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "api_fieldname": "address", + "parameter_fieldname": "address", + "in": "body", + "required": false, + "readOnly": false, + "_key": "address" + }, + { + "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": "A timestamp of the user creation in the storage, in milliseconds.", + "api_fieldname": "creation_time", + "readOnly": true, + "required": false, + "_key": "creation_time" + }, + { + "type": "object", + "x-nullable": true, + "description": "User's account-specific custom properties. The value is a string.", + "additionalProperties": { + "type": "string" + }, + "api_fieldname": "custom_fields", + "readOnly": true, + "required": false, + "_key": "custom_fields" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "user@arm.com", + "description": "The email address.", + "api_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": true, + "readOnly": false, + "_key": "email" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether the user's email address has been verified or not.", + "api_fieldname": "email_verified", + "readOnly": true, + "required": false, + "_key": "email_verified" + }, + { + "type": "string", + "maxLength": 100, + "example": "User Doe", + "x-nullable": true, + "description": "The full name of the user.", + "api_fieldname": "full_name", + "parameter_fieldname": "full_name", + "in": "body", + "required": false, + "readOnly": false, + "_key": "full_name" + }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "readOnly": false, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the user.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "user_id", + "in": "path", + "required": true, + "readOnly": false, + "_key": "id" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has accepted General Terms and Conditions.", + "api_fieldname": "is_gtc_accepted", + "parameter_fieldname": "is_gtc_accepted", + "in": "body", + "required": false, + "readOnly": false, + "_key": "is_gtc_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating that the user has consented to receive marketing information.", + "api_fieldname": "is_marketing_accepted", + "parameter_fieldname": "is_marketing_accepted", + "in": "body", + "required": false, + "readOnly": false, + "_key": "is_marketing_accepted" + }, + { + "type": "boolean", + "example": true, + "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", + "api_fieldname": "is_totp_enabled", + "parameter_fieldname": "is_totp_enabled", + "in": "body", + "required": false, + "readOnly": false, + "_key": "is_totp_enabled" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest login of the user, in milliseconds.", + "api_fieldname": "last_login_time", + "readOnly": true, + "required": false, + "_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" + } + }, + "api_fieldname": "login_history", + "readOnly": true, + "required": false, + "_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" + } + }, + "api_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "readOnly": false, + "_key": "login_profiles" + }, + { + "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, + "api_fieldname": "password", + "parameter_fieldname": "password", + "in": "body", + "required": false, + "readOnly": false, + "_key": "password" + }, + { + "type": "integer", + "format": "int64", + "example": 1518630727688, + "description": "A timestamp of the latest change of the user password, in milliseconds.", + "api_fieldname": "password_changed_time", + "readOnly": true, + "required": false, + "_key": "password_changed_time" + }, + { + "type": "string", + "maxLength": 100, + "example": "+44 (1223) 400 400", + "description": "Phone number.", + "x-nullable": true, + "api_fieldname": "phone_number", + "parameter_fieldname": "phone_number", + "in": "body", + "required": false, + "readOnly": false, + "_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" + ], + "api_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "readOnly": false, + "enum_reference": "subtenant_user_status_enum", + "_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" + }, + "api_fieldname": "totp_scratch_codes", + "readOnly": true, + "required": false, + "_key": "totp_scratch_codes" + }, + { + "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" + }, + { + "pattern": "[\\w\\-,._@+=]{4,30}", + "type": "string", + "example": "admin", + "description": "A username.", + "x-nullable": true, + "api_fieldname": "username", + "parameter_fieldname": "username", + "in": "body", + "required": false, + "readOnly": false, + "_key": "username" + } + ], + "field_renames": [], + "tags": [ + "Tenant accounts - users" + ], + "group_id": "Accounts", + "_key": "subtenant_user" + }, + { + "swagger_models": [ + "UserInvitationReq", + "UserInvitationResp" + ], + "primary_key_field": "id", + "methods": [ + { + "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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the user is invited to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "friend@arm.com", + "description": "Email address of the invited user.", + "api_fieldname": "email", + "entity_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": true, + "_key": "email" + }, + { + "type": "array", + "description": "A list of IDs of the groups the user is invited to.", + "items": { + "type": "string" }, - "_key": "200" + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" }, { - "description": "Error in input data, for example, an invalid email address.", - "schema": { + "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": [ - "code", - "message", - "object", - "request_id", - "type" + "id" ], "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" + "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", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "example": "01619571f3c00242ac12000600000000", + "description": "ID of the identity provider.", + "readOnly": false, + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "Pelion", + "readOnly": false, + "description": "Name of the identity provider.", + "_override": true, + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", + "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": "400" + "api_fieldname": "login_profiles", + "entity_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "_key": "login_profiles" }, { - "description": "Authentication failure.", + "type": "integer", + "format": "int32", + "maximum": 100, + "minimum": 1, + "default": 30, + "description": "Specifies how many days the invitation will be valid for.", + "name": "valid_for_days", + "in": "body", + "schema_param": true, + "entity_fieldname": "valid_for_days", + "api_fieldname": "valid_for_days", + "external_param": true, + "parameter_fieldname": "valid_for_days", + "required": false, + "_key": "valid_for_days" + } + ], + "method": "post", + "mode": "create", + "responses": [ + { + "description": "New entity created.", "schema": { "type": "object", "required": [ - "code", - "message", + "account_id", + "email", + "etag", + "id", "object", - "request_id", - "type" + "user_id" ], "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 the user is invited to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "_key": "account_id" }, { "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "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" }, { + "pattern": "^(?=.{3,254}$).+\\@.+", "type": "string", - "description": "Entity name, always `error`.", - "enum": [ - "error" - ], - "_key": "object" + "example": "friend@arm.com", + "description": "Email address of the invited user.", + "api_fieldname": "email", + "entity_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": true, + "_key": "email" }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "example": "1", + "description": "API resource entity version.", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" }, { "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" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Invitation expiration as UTC time RFC3339.", + "api_fieldname": "expiration", + "entity_fieldname": "expiration", + "_key": "expiration" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of IDs of the groups the user is invited 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" - }, - { - "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" + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" }, { "type": "string", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" - } - ] - }, - "_key": "403" - }, - { - "description": "An account or user 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" + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the invitation.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "invitation_id", + "in": "path", + "required": true, + "_key": "id" }, { "type": "array", - "description": "Request fields which failed validation.", + "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": [ - "name", - "message" + "id" ], "properties": [ { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "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", - "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": "A user with the given username or email 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": [ + "example": "01619571f3c00242ac12000600000000", + "description": "ID of the identity provider.", + "readOnly": false, + "_override": true, + "api_fieldname": "id", + "entity_fieldname": "id", + "_key": "id" + }, { "type": "string", - "description": "Message describing the error condition.", - "_key": "message" + "example": "Pelion", + "readOnly": false, + "description": "Name of the identity provider.", + "_override": true, + "api_fieldname": "name", + "entity_fieldname": "name", + "_key": "name" }, { "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "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": "fields" - }, - { - "type": "string", - "description": "A human readable informative explanation", - "example": "Validation error", - "_key": "message" + "api_fieldname": "login_profiles", + "entity_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "_key": "login_profiles" }, { "type": "string", - "description": "Entity name, always `error`.", + "description": "Entity name: always 'user-invitation'", "enum": [ - "error" + "user-invitation" ], + "api_fieldname": "object", + "entity_fieldname": "object", "_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" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the invited user.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "user_id", + "entity_fieldname": "user_id", + "_key": "user_id" } - ] + ], + "description": "Represents an user invitation in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "user_invitation" + } }, - "_key": "409" - } - ], - "path": "/v3/accounts/{account_id}/users/{user_id}", - "summary": "Update user details.", - "return_type": "subtenant_user", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_user" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "email", - "two_factor_auth_enabled", - "status", - "created_at", - "updated_at", - "password", - "email_verified", - "creation_time", - "last_login_time", - "password_changed_time", - "login_history", - "totp_scratch_codes", - "custom_fields", - "active_sessions" - ], - "group_id": "Accounts", - "parameter_map": { - "user_id": "id" - }, - "operation_id": "updateAccountUser", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "name": "user_id", - "in": "path", - "description": "The ID of the user.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "user_id", - "external_param": false, - "parameter_fieldname": "user_id", - "_key": "id" - } - ], - "method": "post", - "mode": "validate_email", - "responses": [ - { - "description": "Email validation successfully requested.", - "_key": "204" + "_key": "201" }, { - "description": "Authentication failure.", + "description": "Error in input data, for example, invalid email address.", "schema": { "type": "object", "required": [ @@ -59960,10 +88120,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -60033,10 +88193,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "An account or user with the specified ID does not exist.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -60106,584 +88266,356 @@ } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/accounts/{account_id}/users/{user_id}/validate-email", - "summary": "Validate the user email.", - "return_type": "subtenant_user", + "path": "/v3/accounts/{account_id}/user-invitations", + "summary": "Create a user invitation.", + "return_type": "subtenant_user_invitation", "return_info": { "self": true, "custom": false, - "type": "subtenant_user" + "type": "subtenant_user_invitation" }, "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", - "etag", - "type", - "groups", - "filter" - ], - "group_id": "Accounts", - "parameter_map": { - "user_id": "id" - }, - "operation_id": "validateAccountUserEmail", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "validate_email" - } - ], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "readOnly": false, - "required": true, - "_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", - "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" - } - }, - "api_fieldname": "active_sessions", - "readOnly": true, - "required": false, - "_key": "active_sessions" - }, - { - "type": "string", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "api_fieldname": "address", - "parameter_fieldname": "address", - "in": "body", - "required": false, - "readOnly": false, - "_key": "address" - }, - { - "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": "A timestamp of the user creation in the storage, in milliseconds.", - "api_fieldname": "creation_time", - "readOnly": true, - "required": false, - "_key": "creation_time" - }, - { - "type": "object", - "x-nullable": true, - "description": "User's account-specific custom properties. The value is a string.", - "additionalProperties": { - "type": "string" - }, - "api_fieldname": "custom_fields", - "readOnly": true, - "required": false, - "_key": "custom_fields" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "user@arm.com", - "description": "The email address.", - "api_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": true, - "readOnly": false, - "_key": "email" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether the user's email address has been verified or not.", - "api_fieldname": "email_verified", - "readOnly": true, - "required": false, - "_key": "email_verified" - }, - { - "type": "string", - "maxLength": 100, - "example": "User Doe", - "x-nullable": true, - "description": "The full name of the user.", - "api_fieldname": "full_name", - "parameter_fieldname": "full_name", - "in": "body", - "required": false, - "readOnly": false, - "_key": "full_name" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "parameter_fieldname": "user_id", - "in": "path", - "required": true, - "readOnly": false, - "_key": "id" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has accepted General Terms and Conditions.", - "api_fieldname": "is_gtc_accepted", - "parameter_fieldname": "is_gtc_accepted", - "in": "body", - "required": false, - "readOnly": false, - "_key": "is_gtc_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating that the user has consented to receive marketing information.", - "api_fieldname": "is_marketing_accepted", - "parameter_fieldname": "is_marketing_accepted", - "in": "body", - "required": false, - "readOnly": false, - "_key": "is_marketing_accepted" - }, - { - "type": "boolean", - "example": true, - "description": "A flag indicating whether two-factor authentication (TOTP) has been enabled.", - "api_fieldname": "is_totp_enabled", - "parameter_fieldname": "is_totp_enabled", - "in": "body", - "required": false, - "readOnly": false, - "_key": "is_totp_enabled" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest login of the user, in milliseconds.", - "api_fieldname": "last_login_time", - "readOnly": true, - "required": false, - "_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" - } - }, - "api_fieldname": "login_history", - "readOnly": true, - "required": false, - "_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", - "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": "type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "api_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "readOnly": false, - "_key": "login_profiles" - }, - { - "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, - "api_fieldname": "password", - "parameter_fieldname": "password", - "in": "body", - "required": false, - "readOnly": false, - "_key": "password" - }, - { - "type": "integer", - "format": "int64", - "example": 1518630727688, - "description": "A timestamp of the latest change of the user password, in milliseconds.", - "api_fieldname": "password_changed_time", - "readOnly": true, - "required": false, - "_key": "password_changed_time" - }, - { - "type": "string", - "maxLength": 100, - "example": "+44 (1223) 400 400", - "description": "Phone number.", - "x-nullable": true, - "api_fieldname": "phone_number", - "parameter_fieldname": "phone_number", - "in": "body", - "required": false, - "readOnly": false, - "_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" + "etag", + "type", + "filter", + "id", + "created_at", + "updated_at", + "user_id", + "expiration" ], - "api_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "readOnly": false, - "enum_reference": "subtenant_user_status_enum", - "_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" + "group_id": "Accounts", + "parameter_map": { + "invitation_id": "id" }, - "api_fieldname": "totp_scratch_codes", - "readOnly": true, - "required": false, - "_key": "totp_scratch_codes" - }, - { - "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" + "operation_id": "createAccountInvitation", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", - "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "api_fieldname": "username", - "parameter_fieldname": "username", - "in": "body", - "required": false, - "readOnly": false, - "_key": "username" - } - ], - "field_renames": [], - "tags": [ - "Tenant accounts - users" - ], - "group_id": "Accounts", - "_key": "subtenant_user" - }, - { - "swagger_models": [ - "UserInvitationReq", - "UserInvitationResp" - ], - "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": "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": [ { + "name": "account_id", + "in": "path", + "description": "Account ID.", + "required": true, "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account the user is invited to.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", "entity_fieldname": "account_id", + "api_fieldname": "account_id", + "external_param": false, "parameter_fieldname": "account_id", - "in": "path", - "required": true, "_key": "account_id" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "friend@arm.com", - "description": "Email address of the invited user.", - "api_fieldname": "email", - "entity_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", + "name": "invitation_id", + "in": "path", + "description": "The ID of the invitation to delete.", "required": true, - "_key": "email" + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "invitation_id", + "external_param": false, + "parameter_fieldname": "invitation_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" }, { - "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": { + "description": "Authentication failure.", + "schema": { "type": "object", "required": [ - "id" + "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": "ID of the identity provider.", - "readOnly": false, - "_override": true, - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "readOnly": false, - "description": "Name of the identity provider.", - "_override": true, - "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, { "type": "string", - "description": "Identity provider type.", - "readOnly": true, + "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": [ - "NATIVE", - "MBED", - "SAML2", - "OIDC" + "error" ], - "api_fieldname": "type", - "entity_fieldname": "type", + "_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": "An account or invitation with the specified ID does not exist.", + "schema": { + "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } + "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" + } + ] }, - "api_fieldname": "login_profiles", - "entity_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "_key": "login_profiles" + "_key": "404" + } + ], + "path": "/v3/accounts/{account_id}/user-invitations/{invitation_id}", + "summary": "Delete a user invitation.", + "return_type": "subtenant_user_invitation", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_user_invitation" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Accounts", + "parameter_map": { + "invitation_id": "id" + }, + "operation_id": "deleteAccountInvitation", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "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": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the user is invited to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "entity_fieldname": "account_id", + "parameter_fieldname": "account_id", + "in": "path", + "required": true, + "_key": "account_id" }, { - "type": "integer", - "format": "int32", - "maximum": 100, - "minimum": 1, - "default": 30, - "description": "Specifies how many days the invitation will be valid for.", - "name": "valid_for_days", - "in": "body", - "schema_param": true, - "entity_fieldname": "valid_for_days", - "api_fieldname": "valid_for_days", - "external_param": true, - "parameter_fieldname": "valid_for_days", - "required": false, - "_key": "valid_for_days" + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the invitation.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "invitation_id", + "in": "path", + "required": true, + "_key": "id" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "read", "responses": [ { - "description": "New entity created.", + "description": "Successful operation.", "schema": { "type": "object", "required": [ @@ -60744,17 +88676,14 @@ }, { "type": "array", - "description": "A list of IDs of the groups this user has been invited to.", + "description": "A list of IDs of the groups the user is invited to.", "items": { "type": "string" }, "api_fieldname": "groups", "entity_fieldname": "groups", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, "parameter_fieldname": "groups", + "in": "body", "required": false, "_key": "groups" }, @@ -60782,6 +88711,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, @@ -60791,6 +88730,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -60801,6 +88741,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -60809,7 +88750,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -60830,41 +88771,114 @@ "type": "string", "description": "Entity name: always 'user-invitation'", "enum": [ - "user-invitation" + "user-invitation" + ], + "api_fieldname": "object", + "entity_fieldname": "object", + "_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" + }, + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the invited user.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "user_id", + "entity_fieldname": "user_id", + "_key": "user_id" + } + ], + "description": "Represents an user invitation in responses.", + "foreign_key": { + "group": "Accounts", + "entity": "user_invitation" + } + }, + "_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" ], - "api_fieldname": "object", - "entity_fieldname": "object", "_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", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the invited user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "user_id", - "entity_fieldname": "user_id", - "_key": "user_id" + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "description": "Represents an user invitation in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "user_invitation" - } + ] }, - "_key": "201" + "_key": "401" }, { - "description": "Error in input data, for example, invalid email address.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -60934,10 +88948,10 @@ } ] }, - "_key": "400" + "_key": "403" }, { - "description": "Authentication failure.", + "description": "An account or invitation with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -60995,22 +89009,540 @@ }, { "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "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}/user-invitations/{invitation_id}", + "summary": "Details of a user invitation.", + "return_type": "subtenant_user_invitation", + "return_info": { + "self": true, + "custom": false, + "type": "subtenant_user_invitation" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "created_at", + "updated_at", + "email", + "user_id", + "groups", + "expiration", + "login_profiles" + ], + "group_id": "Accounts", + "parameter_map": { + "invitation_id": "id" + }, + "operation_id": "getAccountInvitation", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "read" + } + ], + "fields": [ + { + "type": "string", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account the user is invited to.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "account_id", + "readOnly": false, + "required": true, + "_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" + }, + { + "pattern": "^(?=.{3,254}$).+\\@.+", + "type": "string", + "example": "friend@arm.com", + "description": "Email address of the invited user.", + "api_fieldname": "email", + "parameter_fieldname": "email", + "in": "body", + "required": true, + "readOnly": false, + "_key": "email" + }, + { + "type": "string", + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Invitation expiration as UTC time RFC3339.", + "api_fieldname": "expiration", + "readOnly": true, + "required": false, + "_key": "expiration" + }, + { + "type": "array", + "description": "A list of IDs of the groups the user is invited to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "readOnly": false, + "_key": "groups" + }, + { + "type": "string", + "example": "01619571e2e89242ac12000600000000", + "description": "The ID of the invitation.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "parameter_fieldname": "invitation_id", + "in": "path", + "required": true, + "readOnly": false, + "_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" + } + }, + "api_fieldname": "login_profiles", + "parameter_fieldname": "login_profiles", + "in": "body", + "required": false, + "readOnly": false, + "_key": "login_profiles" + }, + { + "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", + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the invited user.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "user_id", + "readOnly": true, + "required": false, + "_key": "user_id" + } + ], + "field_renames": [], + "tags": [ + "Tenant accounts - user invitations" + ], + "group_id": "Accounts", + "_key": "subtenant_user_invitation" + }, + { + "swagger_models": [ + "DeveloperCertificateResponseData", + "TrustedCertificateReq", + "TrustedCertificateResp", + "TrustedCertificateRespList", + "TrustedCertificateUpdateReq" + ], + "primary_key_field": "id", + "methods": [ + { + "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": [ + { + "type": "string", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "entity_fieldname": "certificate", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_key": "certificate" + }, + { + "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", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "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", + "parameter_fieldname": "enrollment_mode", + "in": "body", + "required": false, + "_key": "enrollment_mode" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "entity_fieldname": "is_developer_certificate", + "_key": "is_developer_certificate" + }, + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_service_enum", + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_status_enum", + "_key": "status" + } + ], + "method": "post", + "mode": "create", + "responses": [ + { + "description": "New entity created.", + "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": "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", + "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'", + "enum": [ + "trusted-cert" + ], + "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" + ], + "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" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" + }, + { + "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": "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", - "description": "Error type used to categorise the error.", - "example": "validation_error", - "_key": "type" + "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": "401" + "_key": "201" }, { - "description": "Forbidden.", + "description": "Invalid certificate data, or missing or invalid parameters.", "schema": { "type": "object", "required": [ @@ -61080,76 +89612,7 @@ } ] }, - "_key": "403" - } - ], - "path": "/v3/accounts/{account_id}/user-invitations", - "summary": "Create a user invitation.", - "return_type": "subtenant_user_invitation", - "return_info": { - "self": true, - "custom": false, - "type": "subtenant_user_invitation" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "id", - "created_at", - "updated_at", - "user_id", - "expiration" - ], - "group_id": "Accounts", - "parameter_map": { - "invitation_id": "id" - }, - "operation_id": "createAccountInvitation", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "account_id", - "in": "path", - "description": "Account ID.", - "required": true, - "type": "string", - "entity_fieldname": "account_id", - "api_fieldname": "account_id", - "external_param": false, - "parameter_fieldname": "account_id", - "_key": "account_id" - }, - { - "name": "invitation_id", - "in": "path", - "description": "The ID of the invitation to delete.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "invitation_id", - "external_param": false, - "parameter_fieldname": "invitation_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Deleted successfully.", - "_key": "204" + "_key": "400" }, { "description": "Authentication failure.", @@ -61225,7 +89688,7 @@ "_key": "401" }, { - "description": "Forbidden.", + "description": "Forbidden, only available for administrators of commercial accounts.", "schema": { "type": "object", "required": [ @@ -61298,7 +89761,7 @@ "_key": "403" }, { - "description": "An account or invitation with the specified ID does not exist.", + "description": "Certificate with the given name or subject already exists.", "schema": { "type": "object", "required": [ @@ -61368,16 +89831,16 @@ } ] }, - "_key": "404" + "_key": "409" } ], - "path": "/v3/accounts/{account_id}/user-invitations/{invitation_id}", - "summary": "Delete a user invitation.", - "return_type": "subtenant_user_invitation", + "path": "/v3/trusted-certificates", + "summary": "Upload a new trusted certificate.", + "return_type": "trusted_certificate", "return_info": { "self": true, "custom": false, - "type": "subtenant_user_invitation" + "type": "trusted_certificate" }, "x_filter": {}, "x_deprecation": null, @@ -61385,231 +89848,62 @@ "object", "etag", "type", - "groups", - "filter" + "filter", + "signature", + "id", + "created_at", + "updated_at", + "account_id", + "owner_id", + "issuer", + "subject", + "validity", + "device_execution_mode", + "certificate_fingerprint", + "valid" ], - "group_id": "Accounts", - "parameter_map": { - "invitation_id": "id" - }, - "operation_id": "deleteAccountInvitation", + "group_id": "Security", + "operation_id": "addCertificate", + "notes": "Signature is not used by the SDK as it is a deprecated field.", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "create" }, { - "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": "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": [ { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account the user is invited to.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "entity_fieldname": "account_id", - "parameter_fieldname": "account_id", + "name": "cert_id", "in": "path", + "description": "The ID of the trusted certificate to delete.", "required": true, - "_key": "account_id" - }, - { "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the invitation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "invitation_id", - "in": "path", - "required": true, + "api_fieldname": "cert_id", + "external_param": false, + "parameter_fieldname": "cert_id", "_key": "id" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "entity_fieldname": "is_developer_certificate", + "_key": "is_developer_certificate" } ], - "method": "get", - "mode": "read", + "method": "delete", + "mode": "delete", "responses": [ { - "description": "Successful operation.", - "schema": { - "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}", - "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" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "friend@arm.com", - "description": "Email address of the invited user.", - "api_fieldname": "email", - "entity_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": true, - "_key": "email" - }, - { - "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Invitation expiration as UTC time RFC3339.", - "api_fieldname": "expiration", - "entity_fieldname": "expiration", - "_key": "expiration" - }, - { - "type": "array", - "description": "A list of IDs of the groups this user has been invited to.", - "items": { - "type": "string" - }, - "api_fieldname": "groups", - "entity_fieldname": "groups", - "name": "groups", - "in": "body", - "schema_param": true, - "external_param": true, - "parameter_fieldname": "groups", - "required": false, - "_key": "groups" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the invitation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "parameter_fieldname": "invitation_id", - "in": "path", - "required": true, - "_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": "type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "api_fieldname": "login_profiles", - "entity_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "_key": "login_profiles" - }, - { - "type": "string", - "description": "Entity name: always 'user-invitation'", - "enum": [ - "user-invitation" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_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" - }, - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the invited user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "user_id", - "entity_fieldname": "user_id", - "_key": "user_id" - } - ], - "description": "Represents an user invitation in responses.", - "foreign_key": { - "group": "Accounts", - "entity": "user_invitation" - } - }, - "_key": "200" + "description": "Deleted successfully.", + "_key": "204" }, { "description": "Authentication failure.", @@ -61758,7 +90052,7 @@ "_key": "403" }, { - "description": "An account or invitation with the specified ID does not exist.", + "description": "A certificate not found.", "schema": { "type": "object", "required": [ @@ -61831,227 +90125,46 @@ "_key": "404" } ], - "path": "/v3/accounts/{account_id}/user-invitations/{invitation_id}", - "summary": "Details of a user invitation.", - "return_type": "subtenant_user_invitation", + "path": "/v3/trusted-certificates/{cert_id}", + "summary": "Delete a trusted certificate by ID.", + "return_type": "trusted_certificate", "return_info": { "self": true, "custom": false, - "type": "subtenant_user_invitation" + "type": "trusted_certificate" }, "x_filter": {}, "x_deprecation": null, "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "created_at", - "updated_at", - "email", - "user_id", - "expiration", - "login_profiles" - ], - "group_id": "Accounts", - "parameter_map": { - "invitation_id": "id" - }, - "operation_id": "getAccountInvitation", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - } - ], - "fields": [ - { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the account the user is invited to.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "account_id", - "readOnly": false, - "required": true, - "_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" - }, - { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "friend@arm.com", - "description": "Email address of the invited user.", - "api_fieldname": "email", - "parameter_fieldname": "email", - "in": "body", - "required": true, - "readOnly": false, - "_key": "email" - }, - { - "type": "string", - "format": "date-time", - "example": "2018-02-14T15:24:14Z", - "description": "Invitation expiration as UTC time RFC3339.", - "api_fieldname": "expiration", - "readOnly": true, - "required": false, - "_key": "expiration" - }, - { - "type": "string", - "example": "01619571e2e89242ac12000600000000", - "description": "The ID of the invitation.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "parameter_fieldname": "invitation_id", - "in": "path", - "required": true, - "readOnly": false, - "_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": "type", - "_key": "type" - } - ], - "description": "Represents a user login profile in Device Management.", - "foreign_key": { - "group": "Accounts", - "entity": "login_profile" - } - }, - "api_fieldname": "login_profiles", - "parameter_fieldname": "login_profiles", - "in": "body", - "required": false, - "readOnly": false, - "_key": "login_profiles" - }, - { - "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" + "object", + "etag", + "type", + "filter", + "signature" + ], + "group_id": "Security", + "operation_id": "deleteCertificate", + "parameter_map": { + "cert_id": "id" + }, + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" }, { - "type": "string", - "example": "01619571e2e90242ac12000600000000", - "description": "The ID of the invited user.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "user_id", - "readOnly": true, - "required": false, - "_key": "user_id" - } - ], - "field_renames": [], - "tags": [ - "Tenant accounts - user invitations" - ], - "group_id": "Accounts", - "_key": "subtenant_user_invitation" - }, - { - "swagger_models": [ - "DeveloperCertificateResponseData", - "TrustedCertificateReq", - "TrustedCertificateResp", - "TrustedCertificateRespList", - "TrustedCertificateUpdateReq" - ], - "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": "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": [ { "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_key": "certificate" - }, - { - "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", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "_key": "enrollment_mode" + "description": "ID that uniquely identifies the developer certificate.", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "developerCertificateId", + "in": "path", + "required": true, + "_key": "id" }, { "description": "Whether or not this certificate is a developer certificate.", @@ -62063,101 +90176,26 @@ "api_fieldname": "is_developer_certificate", "entity_fieldname": "is_developer_certificate", "_key": "is_developer_certificate" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_service_enum", - "_key": "service" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_status_enum", - "_key": "status" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "get_developer_certificate_info", "responses": [ { - "description": "New entity created.", + "description": "Developer certificate returned successfully.", "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}", + "description": "Account to which the developer certificate belongs.", "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", @@ -62165,34 +90203,28 @@ }, { "type": "string", - "maxLength": 500, + "description": "Description for the developer certificate.", "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": "string", + "description": "PEM-format X.509 developer certificate.", + "api_fieldname": "developer_certificate", + "entity_fieldname": "developer_certificate", + "_key": "developer_certificate" }, { - "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", + "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", - "example": "1", "description": "API resource entity version.", "api_fieldname": "etag", "entity_fieldname": "etag", @@ -62200,119 +90232,213 @@ }, { "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", + "description": "ID that uniquely identifies the developer certificate.", "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.", + "description": "Name of the developer certificate.", "api_fieldname": "name", "entity_fieldname": "name", "_key": "name" }, { "type": "string", - "description": "Entity name: always 'trusted-cert'", - "enum": [ - "trusted-cert" - ], + "description": "Entity name: always `trusted-cert`.", "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" + "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" + }, + { + "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": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "_key": "service" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, { "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", + "description": "Entity name, always `error`.", "enum": [ - "ACTIVE", - "INACTIVE" + "error" ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "_key": "object" }, { "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { "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": "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": "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": "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": "2038-02-14T15:24:14Z", - "description": "Expiration time in UTC formatted as RFC3339.", - "api_fieldname": "validity", - "entity_fieldname": "validity", - "_key": "validity" + "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": "Represents a trusted certificate in responses.", - "foreign_key": { - "group": "Security", - "entity": "developer_certificate" - } + ] }, - "_key": "201" + "examples": [ + { + "object": "error", + "code": 401, + "type": "invalid_auth", + "message": "Invalid access token.", + "request_id": "015fee4431fd38c98640fbfb00000000", + "_key": "Authentication Error" + } + ], + "_key": "401" }, { - "description": "Invalid certificate data, or missing or invalid parameters.", + "description": "Developer certificate not found with given ID.", "schema": { "type": "object", "required": [ @@ -62382,83 +90508,386 @@ } ] }, - "_key": "400" + "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": false, + "custom": false, + "type": "developer_certificate" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "signature", + "created_at", + "account_id", + "name", + "description", + "developer_certificate", + "developer_private_key", + "security_file_content" + ], + "group_id": "Security", + "operation_id": "getDeveloperCertificate", + "unaggregated": true, + "parameter_map": { + "developerCertificateId": "id" + }, + "foreign_key": { + "entity": "developer_certificate", + "group": "Security" + }, + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "get_developer_certificate_info" + }, + { + "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 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": "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" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "entity_fieldname": "is_developer_certificate", + "_key": "is_developer_certificate" }, { - "description": "Authentication failure.", + "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": "trusted_certificate_order_enum", + "_key": "order" + } + ], + "method": "get", + "mode": "list", + "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", + "_key": "after" }, { "type": "array", - "description": "Request fields which failed validation.", + "description": "A list of entities.", "items": { "type": "object", "required": [ + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", "name", - "message" + "object", + "service", + "subject", + "validity" ], "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": "string", - "description": "Name of the field which caused the error.", + "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", + "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": "trusted_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": "trusted_certificate" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden, only available for admins of commercial accounts.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -62528,10 +90957,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Certificate with the given name or subject already exists.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -62601,60 +91030,102 @@ } ] }, - "_key": "409" + "_key": "403" } ], "path": "/v3/trusted-certificates", - "summary": "Upload a new trusted certificate.", - "return_type": "trusted_certificate", + "summary": "Get all trusted certificates.", + "return_type": "paginated_response(trusted_certificate)", "return_info": { "self": true, "custom": false, "type": "trusted_certificate" }, - "x_filter": {}, + "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_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", "signature", - "id", - "created_at", - "updated_at", - "account_id", - "owner_id", - "issuer", - "subject", - "validity", - "device_execution_mode", - "certificate_fingerprint", - "valid" + "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" ], + "foreign_key_priority": "self", "group_id": "Security", - "operation_id": "addCertificate", - "notes": "Signature is not used by the SDK as it is a deprecated field.", - "pagination": false, + "operation_id": "getAllCertificates", + "pagination": true, + "foreign_key": { + "group": "Security", + "entity": "trusted_certificate" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "create" + "_key": "list" }, { - "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": "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": [ { - "name": "cert_id", - "in": "path", - "description": "The ID of the trusted certificate to delete.", - "required": true, "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", "entity_fieldname": "id", - "api_fieldname": "cert_id", - "external_param": false, "parameter_fieldname": "cert_id", + "in": "path", + "required": true, "_key": "id" }, { @@ -62669,12 +91140,214 @@ "_key": "is_developer_certificate" } ], - "method": "delete", - "mode": "delete", + "method": "get", + "mode": "read", "responses": [ { - "description": "Deleted successfully.", - "_key": "204" + "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": "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", + "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'", + "enum": [ + "trusted-cert" + ], + "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" + ], + "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" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" + }, + { + "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": "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" + } + }, + "_key": "200" }, { "description": "Authentication failure.", @@ -62823,7 +91496,7 @@ "_key": "403" }, { - "description": "Certificate not found.", + "description": "A certificate not found.", "schema": { "type": "object", "required": [ @@ -62897,7 +91570,7 @@ } ], "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Delete a trusted certificate by ID.", + "summary": "Get a trusted certificate.", "return_type": "trusted_certificate", "return_info": { "self": true, @@ -62910,30 +91583,88 @@ "object", "etag", "type", - "groups", "filter", - "signature" + "signature", + "created_at", + "updated_at", + "name", + "description", + "account_id", + "owner_id", + "certificate", + "service", + "issuer", + "subject", + "validity", + "status", + "device_execution_mode", + "enrollment_mode", + "certificate_fingerprint", + "valid" ], "group_id": "Security", - "operation_id": "deleteCertificate", + "operation_id": "getCertificate", "parameter_map": { "cert_id": "id" }, "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_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```", + "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": [ { "type": "string", - "description": "ID that uniquely identifies the developer certificate.", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "entity_fieldname": "certificate", + "parameter_fieldname": "certificate", + "in": "body", + "required": false, + "_key": "certificate" + }, + { + "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", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "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", + "parameter_fieldname": "enrollment_mode", + "in": "body", + "required": false, + "_key": "enrollment_mode" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", - "parameter_fieldname": "developerCertificateId", + "parameter_fieldname": "cert_id", "in": "path", "required": true, "_key": "id" @@ -62948,26 +91679,101 @@ "api_fieldname": "is_developer_certificate", "entity_fieldname": "is_developer_certificate", "_key": "is_developer_certificate" + }, + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "entity_fieldname": "service", + "parameter_fieldname": "service", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_service_enum", + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "entity_fieldname": "status", + "parameter_fieldname": "status", + "in": "body", + "required": false, + "enum_reference": "trusted_certificate_status_enum", + "_key": "status" } ], - "method": "get", - "mode": "get_developer_certificate_info", + "method": "put", + "mode": "update", "responses": [ { - "description": "Developer certificate returned successfully.", + "description": "Successful operation.", "schema": { "type": "object", + "required": [ + "account_id", + "certificate", + "certificate_fingerprint", + "etag", + "id", + "issuer", + "name", + "object", + "service", + "subject", + "validity" + ], "properties": [ { "type": "string", - "description": "Account to which the developer certificate belongs.", + "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", @@ -62975,28 +91781,40 @@ }, { "type": "string", - "description": "Description for the developer certificate.", + "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": "string", - "description": "PEM-format X.509 developer certificate.", - "api_fieldname": "developer_certificate", - "entity_fieldname": "developer_certificate", - "_key": "developer_certificate" + "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": "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": "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", + "example": "1", "description": "API resource entity version.", "api_fieldname": "etag", "entity_fieldname": "etag", @@ -63004,57 +91822,119 @@ }, { "type": "string", - "description": "ID that uniquely identifies the developer certificate.", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", "api_fieldname": "id", "entity_fieldname": "id", "_key": "id" }, { "type": "string", - "description": "Name of the developer certificate.", + "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 'trusted-cert'", + "enum": [ + "trusted-cert" + ], "api_fieldname": "object", "entity_fieldname": "object", "_key": "object" }, { + "x-nullable": true, "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" + "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" + ], + "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" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "entity_fieldname": "subject", + "_key": "subject" + }, + { + "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": "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" } }, - "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" }, { - "description": "Bad request.", + "description": "Invalid certificate data, or missing or invalid parameters.", "schema": { "type": "object", "required": [ @@ -63127,7 +92007,7 @@ "_key": "400" }, { - "description": "Invalid access token.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -63197,20 +92077,156 @@ } ] }, - "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.", + "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": "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" + }, + { + "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": "Certificate with the given name or subject already exists.", "schema": { "type": "object", "required": [ @@ -63280,26 +92296,16 @@ } ] }, - "examples": [ - { - "object": "error", - "code": 404, - "type": "not_found", - "message": "Not Found. Not found: 016006724ff53ade90ed948d03c00001", - "request_id": "015fee4431fd38c98640fbfb00000000", - "_key": "Authentication Error" - } - ], - "_key": "404" + "_key": "409" } ], - "path": "/v3/developer-certificates/{developerCertificateId}", - "summary": "Fetch an existing developer certificate to connect to the bootstrap server.", - "return_type": "developer_certificate", + "path": "/v3/trusted-certificates/{cert_id}", + "summary": "Update trusted certificate.", + "return_type": "trusted_certificate", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "developer_certificate" + "type": "trusted_certificate" }, "x_filter": {}, "x_deprecation": null, @@ -63307,354 +92313,426 @@ "object", "etag", "type", - "groups", "filter", "signature", "created_at", + "updated_at", "account_id", - "name", - "description", - "developer_certificate", - "developer_private_key", - "security_file_content" + "owner_id", + "issuer", + "subject", + "validity", + "device_execution_mode", + "certificate_fingerprint", + "valid" ], "group_id": "Security", - "operation_id": "getDeveloperCertificate", - "unaggregated": true, + "operation_id": "updateCertificate", "parameter_map": { - "developerCertificateId": "id" - }, - "foreign_key": { - "entity": "developer_certificate", - "group": "Security" + "cert_id": "id" }, + "notes": "Signature is not used by the SDK as it is a deprecated field.", "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "get_developer_certificate_info" + "_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", + "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", + "description": "X509.v3 trusted certificate in PEM format.", + "api_fieldname": "certificate", + "readOnly": false, + "required": true, + "_key": "certificate" + }, + { + "type": "string", + "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", + "description": "A SHA-256 fingerprint of the certificate.", + "api_fieldname": "certificate_fingerprint", + "readOnly": true, + "required": false, + "_key": "certificate_fingerprint" + }, + { + "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", + "maxLength": 500, + "x-nullable": true, + "example": "Certificate created by me.", + "description": "Human readable description of this certificate.", + "api_fieldname": "description", + "readOnly": false, + "required": false, + "_key": "description" + }, + { + "type": "integer", + "format": "int32", + "example": 1, + "description": "Device execution mode where 1 means a developer certificate.", + "api_fieldname": "device_execution_mode", + "readOnly": true, + "required": false, + "_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", + "readOnly": false, + "required": false, + "_key": "enrollment_mode" + }, + { + "type": "string", + "example": "01619571d01d0242ac12000600000000", + "description": "Entity ID.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "id", + "readOnly": false, + "required": true, + "_key": "id" + }, + { + "description": "Whether or not this certificate is a developer certificate.", + "example": true, + "type": "boolean", + "readOnly": true, + "getter_custom_method": "is_developer_certificate_getter", + "_override": true, + "api_fieldname": "is_developer_certificate", + "required": false, + "_key": "is_developer_certificate" + }, + { + "type": "string", + "example": "CN=issuer", + "description": "Issuer of the certificate.", + "api_fieldname": "issuer", + "readOnly": true, + "required": false, + "_key": "issuer" + }, + { + "type": "string", + "maxLength": 100, + "example": "My certificate", + "description": "Certificate name.", + "api_fieldname": "name", + "readOnly": false, + "required": true, + "_key": "name" + }, + { + "x-nullable": true, + "type": "string", + "example": "01619571dad80242ac12000600000000", + "description": "The ID of the owner.", + "pattern": "[a-f0-9]{32}", + "api_fieldname": "owner_id", + "readOnly": true, + "required": false, + "_key": "owner_id" + }, + { + "type": "string", + "description": "Service name where the certificate is used.", + "enum": [ + "lwm2m", + "bootstrap" + ], + "api_fieldname": "service", + "readOnly": false, + "required": true, + "enum_reference": "trusted_certificate_service_enum", + "_key": "service" + }, + { + "type": "string", + "example": "ACTIVE", + "description": "Status of the certificate.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "api_fieldname": "status", + "readOnly": false, + "required": false, + "enum_reference": "trusted_certificate_status_enum", + "_key": "status" + }, + { + "type": "string", + "example": "CN=subject", + "description": "Subject of the certificate.", + "api_fieldname": "subject", + "readOnly": true, + "required": false, + "_key": "subject" + }, + { + "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": "boolean", + "example": true, + "description": "This read-only flag indicates whether the certificate is valid or not.", + "readOnly": true, + "api_fieldname": "valid", + "required": false, + "_key": "valid" }, { - "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```", + "type": "string", + "format": "date-time", + "example": "2038-02-14T15:24:14Z", + "description": "Expiration time in UTC formatted as RFC3339.", + "api_fieldname": "validity", + "readOnly": true, + "required": false, + "_key": "validity" + } + ], + "field_renames": [], + "tags": [ + "Security and identity - certificates", + "Security and identity - developer class certificates" + ], + "group_id": "Security", + "_key": "trusted_certificate" + }, + { + "swagger_models": [ + "CampaignDeviceMetadataPage", + "UpdateCampaign", + "UpdateCampaignPage", + "UpdateCampaignPostRequest", + "UpdateCampaignPutRequest" + ], + "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/016e83ddc649000000000001001000b8/archive \\\n-H 'Authorization: Bearer '\n```\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" - }, - { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", + "description": "Helper for creating the device filter string.", + "detail": "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.", + "type": "filter", + "foundation_reference": "devices.device.list", + "getter_custom_method": "device_filter_helper_getter", + "setter_custom_method": "device_filter_helper_setter", "_override": true, - "api_fieldname": "is_developer_certificate", - "entity_fieldname": "is_developer_certificate", - "_key": "is_developer_certificate" - }, - { - "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": "device_filter_helper", + "entity_fieldname": "device_filter_helper", + "_key": "device_filter_helper" }, { + "description": "The campaign ID.", + "in": "path", + "name": "campaign_id", + "required": true, "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" + "pattern": "[A-Fa-f0-9]{32}", + "entity_fieldname": "id", + "api_fieldname": "campaign_id", + "external_param": false, + "parameter_fieldname": "campaign_id", + "_key": "id" } ], - "method": "get", - "mode": "list", + "method": "post", + "mode": "archive", "responses": [ { - "description": "Successful operation.", + "description": "The campaign has been archived.", + "_key": "202" + }, + { + "description": "Unable to change the phase of the campaign.", "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": [ - "account_id", - "certificate", - "certificate_fingerprint", - "etag", - "id", - "issuer", "name", - "object", - "service", - "subject", - "validity" + "message" ], "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": "If true, signature is not required. Default value false.", - "_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" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", + "description": "Name of the field which caused the error.", "_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" - }, + } + ] + }, + "_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", - "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" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "format": "date-time", - "example": "2038-02-14T15:24:14Z", - "description": "Expiration time in UTC formatted as RFC3339.", - "_key": "validity" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "description": "Represents a trusted certificate in responses.", - "foreign_key": { - "group": "Security", - "entity": "trusted_certificate" - } + ] }, - "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 (2-1000), 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": "Security", - "entity": "trusted_certificate" - } + ] }, - "_key": "200" + "_key": "401" }, { - "description": "Authentication failure.", + "description": "Cannot find the campaign.", "schema": { "type": "object", "required": [ @@ -63724,10 +92802,10 @@ } ] }, - "_key": "401" + "_key": "404" }, { - "description": "Forbidden.", + "description": "Cannot archive the campaign while in the current phase.", "schema": { "type": "object", "required": [ @@ -63797,318 +92875,411 @@ } ] }, - "_key": "403" + "_key": "409" } ], - "path": "/v3/trusted-certificates", - "summary": "Get all trusted certificates.", - "return_type": "paginated_response(trusted_certificate)", + "path": "/v3/update-campaigns/{campaign_id}/archive", + "summary": "Archive a campaign.", + "return_type": "update_campaign", "return_info": { "self": true, "custom": false, - "type": "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": "update_campaign" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", - "signature", - "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" + "state" ], - "foreign_key_priority": "self", - "group_id": "Security", - "operation_id": "getAllCertificates", - "pagination": true, - "foreign_key": { - "group": "Security", - "entity": "trusted_certificate" + "group_id": "Device_Update", + "parameter_map": { + "campaign_id": "id" }, + "operation_id": "Update_Campaign_archive", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "archive" }, { - "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": "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": [ { - "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" + "type": "boolean", + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false", + "api_fieldname": "approval_required", + "entity_fieldname": "approval_required", + "parameter_fieldname": "approval_required", + "in": "body", + "required": false, + "_key": "approval_required" }, { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false", + "api_fieldname": "autostop", + "entity_fieldname": "autostop", + "parameter_fieldname": "autostop", + "in": "body", + "required": false, + "_key": "autostop" + }, + { + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00", + "api_fieldname": "autostop_success_percent", + "entity_fieldname": "autostop_success_percent", + "parameter_fieldname": "autostop_success_percent", + "in": "body", + "required": false, + "_key": "autostop_success_percent" + }, + { + "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`.", + "type": "string", + "enum": [ + "one-shot", + "continuous" + ], + "default": "one-shot", + "api_fieldname": "campaign_strategy", + "entity_fieldname": "campaign_strategy", + "parameter_fieldname": "campaign_strategy", + "in": "body", + "required": false, + "enum_reference": "update_campaign_strategy_enum", + "_key": "campaign_strategy" + }, + { + "description": "An optional description of the campaign.", + "type": "string", + "maxLength": 2000, + "example": "This campaign updates Class XX devices to version 1.34", + "api_fieldname": "description", + "entity_fieldname": "description", + "parameter_fieldname": "description", + "in": "body", + "required": false, + "_key": "description" + }, + { + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", + "type": "string", + "example": "state__eq=registered", + "api_fieldname": "device_filter", + "entity_fieldname": "device_filter", + "parameter_fieldname": "device_filter", + "in": "body", + "required": false, + "_key": "device_filter" + }, + { + "description": "Helper for creating the device filter string.", + "detail": "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.", + "type": "filter", + "foundation_reference": "devices.device.list", + "getter_custom_method": "device_filter_helper_getter", + "setter_custom_method": "device_filter_helper_setter", "_override": true, - "api_fieldname": "is_developer_certificate", - "entity_fieldname": "is_developer_certificate", - "_key": "is_developer_certificate" + "api_fieldname": "device_filter_helper", + "entity_fieldname": "device_filter_helper", + "_key": "device_filter_helper" + }, + { + "description": "The campaign name.", + "type": "string", + "maxLength": 128, + "example": "campaign", + "api_fieldname": "name", + "entity_fieldname": "name", + "parameter_fieldname": "name", + "in": "body", + "required": false, + "_key": "name" + }, + { + "description": "The ID of the manifest that will be sent to the device as part of the campaign.", + "type": "string", + "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": "get", - "mode": "read", + "method": "post", + "mode": "create", "responses": [ { - "description": "Successful operation.", - "schema": { - "type": "object", - "required": [ - "account_id", - "certificate", - "certificate_fingerprint", - "etag", - "id", - "issuer", - "name", - "object", - "service", - "subject", - "validity" - ], - "properties": [ - { + "description": "Update campaign created.", + "schema": [ + { + "group": "Device_Update", + "entity": "update_campaign", + "_key": "foreign_key" + }, + { + "created_at": { "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" + "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" }, - { + "etag": { "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "_key": "certificate" + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" }, - { + "updated_at": { "type": "string", - "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", - "description": "A SHA-256 fingerprint of the certificate.", - "api_fieldname": "certificate_fingerprint", - "entity_fieldname": "certificate_fingerprint", - "_key": "certificate_fingerprint" + "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" }, - { + "campaign_strategy": { + "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`.", "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" + "enum": [ + "one-shot", + "continuous" + ], + "default": "one-shot", + "api_fieldname": "campaign_strategy", + "entity_fieldname": "campaign_strategy" }, - { + "object": { + "description": "Entity name: always 'update-campaign'.", "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" + "example": "update-campaign", + "api_fieldname": "object", + "entity_fieldname": "object" }, - { - "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" + "active_at": { + "description": "The time the campaign entered the active state.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "active_at", + "entity_fieldname": "active_at" }, - { + "approval_required": { "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" + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false", + "api_fieldname": "approval_required", + "entity_fieldname": "approval_required" }, - { + "archived_at": { + "description": "The time the campaign was archived.", "type": "string", - "example": "1", - "description": "API resource entity version.", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "archived_at", + "entity_fieldname": "archived_at" }, - { + "autostop": { + "type": "boolean", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false", + "api_fieldname": "autostop", + "entity_fieldname": "autostop" + }, + "autostop_success_percent": { + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00", + "api_fieldname": "autostop_success_percent", + "entity_fieldname": "autostop_success_percent" + }, + "autostop_reason": { + "description": "Text description of why a campaign failed to start or why a campaign stopped.", "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "entity_fieldname": "id", - "_key": "id" + "example": "Insufficient billing credit.", + "api_fieldname": "autostop_reason", + "entity_fieldname": "autostop_reason" }, - { + "description": { + "description": "An optional description of the campaign.", "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "api_fieldname": "issuer", - "entity_fieldname": "issuer", - "_key": "issuer" + "maxLength": 2000, + "example": "This campaign updates Class XX devices to version 1.34", + "api_fieldname": "description", + "entity_fieldname": "description" }, - { + "device_filter": { + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", + "example": "state__eq=registered", + "api_fieldname": "device_filter", + "entity_fieldname": "device_filter" + }, + "finished": { + "description": "The time the campaign finished.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "finished", + "entity_fieldname": "finished" + }, + "id": { + "description": "The campaign ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", + "api_fieldname": "id", + "entity_fieldname": "id" + }, + "name": { + "description": "The campaign name.", + "type": "string", + "maxLength": 128, + "example": "campaign", "api_fieldname": "name", - "entity_fieldname": "name", - "_key": "name" + "entity_fieldname": "name" }, - { + "root_manifest_id": { + "description": "The ID of the manifest that will be sent to the device as part of the campaign.", "type": "string", - "description": "Entity name: always 'trusted-cert'", - "enum": [ - "trusted-cert" - ], - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "example": "016e83dce36a00000000000100100102", + "api_fieldname": "root_manifest_id", + "entity_fieldname": "root_manifest_id" }, - { - "x-nullable": true, + "root_manifest_url": { + "description": "The URL for the manifest that will be sent to the device as part of the campaign.", "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" + "example": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", + "api_fieldname": "root_manifest_url", + "entity_fieldname": "root_manifest_url" }, - { + "starting_at": { + "description": "The time the campaign will be started.", "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "_key": "service" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "starting_at", + "entity_fieldname": "starting_at" }, - { + "started_at": { + "description": "The time the campaign was started.", "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "_key": "status" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "started_at", + "entity_fieldname": "started_at" }, - { + "stopping_at": { + "description": "The time the campaign will be stopped.", "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopping_at", + "entity_fieldname": "stopping_at" }, - { + "stopped_at": { + "description": "The time the campaign was stopped.", "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" + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopped_at", + "entity_fieldname": "stopped_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" + "phase": { + "description": "The phase of the campaign.", + "type": "string", + "enum": [ + "draft", + "awaiting_approval", + "timed", + "starting", + "active", + "stopping", + "stopped", + "deleted", + "archived" + ], + "api_fieldname": "phase", + "entity_fieldname": "phase" }, - { + "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": "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" + "example": "2017-05-22T12:37:55.576563Z", + "x-nullable": true, + "api_fieldname": "when", + "entity_fieldname": "when" + }, + "_key": "properties" } - }, - "_key": "200" + ], + "_key": "201" }, { - "description": "Authentication failure.", + "description": "Validation error: The data used to create the campaign did not validate.\n", "schema": { "type": "object", "required": [ @@ -64178,10 +93349,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ @@ -64251,10 +93422,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Certificate not found.", + "description": "Conflict, a campaign with the same name already exists", "schema": { "type": "object", "required": [ @@ -64324,16 +93495,16 @@ } ] }, - "_key": "404" + "_key": "409" } ], - "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Get trusted certificate by ID.", - "return_type": "trusted_certificate", + "path": "/v3/update-campaigns", + "summary": "Create a campaign", + "return_type": "update_campaign", "return_info": { "self": true, "custom": false, - "type": "trusted_certificate" + "type": "update_campaign" }, "x_filter": {}, "x_deprecation": null, @@ -64341,420 +93512,71 @@ "object", "etag", "type", - "groups", "filter", - "signature", + "state", "created_at", "updated_at", - "name", - "description", - "account_id", - "owner_id", - "certificate", - "service", - "issuer", - "subject", - "validity", - "status", - "device_execution_mode", - "enrollment_mode", - "certificate_fingerprint", - "valid" + "active_at", + "archived_at", + "autostop_reason", + "finished", + "id", + "root_manifest_url", + "starting_at", + "started_at", + "stopping_at", + "stopped_at", + "phase" ], - "group_id": "Security", - "operation_id": "getCertificate", + "group_id": "Device_Update", "parameter_map": { - "cert_id": "id" - }, - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "type": "string", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "entity_fieldname": "certificate", - "parameter_fieldname": "certificate", - "in": "body", - "required": false, - "_key": "certificate" - }, - { - "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", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "entity_fieldname": "enrollment_mode", - "parameter_fieldname": "enrollment_mode", - "in": "body", - "required": false, - "_key": "enrollment_mode" - }, - { - "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" - }, - { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", - "_override": true, - "api_fieldname": "is_developer_certificate", - "entity_fieldname": "is_developer_certificate", - "_key": "is_developer_certificate" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", - "required": false, - "_key": "name" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "entity_fieldname": "service", - "parameter_fieldname": "service", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_service_enum", - "_key": "service" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "entity_fieldname": "status", - "parameter_fieldname": "status", - "in": "body", - "required": false, - "enum_reference": "trusted_certificate_status_enum", - "_key": "status" - } - ], - "method": "put", - "mode": "update", - "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'", - "enum": [ - "trusted-cert" - ], - "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" - ], - "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" - }, - { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "entity_fieldname": "subject", - "_key": "subject" - }, - { - "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": "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" - } - }, - "_key": "200" - }, - { - "description": "Invalid certificate data, or missing or invalid parameters.", - "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" + "campaign_id": "id" + }, + "operation_id": "Update_Campaign_create", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_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/1123457f9012ab567890120000789012 \\\n-H 'Authorization: Bearer '\n```\n", + "field_renames": [], + "fields": [ + { + "description": "Helper for creating the device filter string.", + "detail": "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.", + "type": "filter", + "foundation_reference": "devices.device.list", + "getter_custom_method": "device_filter_helper_getter", + "setter_custom_method": "device_filter_helper_setter", + "_override": true, + "api_fieldname": "device_filter_helper", + "entity_fieldname": "device_filter_helper", + "_key": "device_filter_helper" }, { - "description": "Authentication failure.", + "description": "The campaign ID.", + "in": "path", + "name": "campaign_id", + "required": true, + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "entity_fieldname": "id", + "api_fieldname": "campaign_id", + "external_param": false, + "parameter_fieldname": "campaign_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Update campaign deleted.", + "_key": "204" + }, + { + "description": "Validation error: The data used to update the campaign did not validate.\n", "schema": { "type": "object", "required": [ @@ -64824,10 +93646,10 @@ } ] }, - "_key": "401" + "_key": "400" }, { - "description": "Forbidden.", + "description": "Not authenticated.", "schema": { "type": "object", "required": [ @@ -64897,10 +93719,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "Certificate not found.", + "description": "Update campaign can't be found.", "schema": { "type": "object", "required": [ @@ -64973,7 +93795,7 @@ "_key": "404" }, { - "description": "Certificate with the given name or subject already exists.", + "description": "Conflict - Cannot delete the campaign while in the current phase.", "schema": { "type": "object", "required": [ @@ -65046,13 +93868,13 @@ "_key": "409" } ], - "path": "/v3/trusted-certificates/{cert_id}", - "summary": "Update trusted certificate.", - "return_type": "trusted_certificate", + "path": "/v3/update-campaigns/{campaign_id}", + "summary": "Delete a campaign", + "return_type": "update_campaign", "return_info": { "self": true, "custom": false, - "type": "trusted_certificate" + "type": "update_campaign" }, "x_filter": {}, "x_deprecation": null, @@ -65060,240 +93882,36 @@ "object", "etag", "type", - "groups", "filter", - "signature", - "created_at", - "updated_at", - "account_id", - "owner_id", - "issuer", - "subject", - "validity", - "device_execution_mode", - "certificate_fingerprint", - "valid" + "state" ], - "group_id": "Security", - "operation_id": "updateCertificate", + "group_id": "Device_Update", "parameter_map": { - "cert_id": "id" + "campaign_id": "id" }, - "notes": "Signature is not used by the SDK as it is a deprecated field.", + "operation_id": "Update_Campaign_destroy", "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", - "example": "-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----", - "description": "X509.v3 trusted certificate in PEM format.", - "api_fieldname": "certificate", - "readOnly": false, - "required": true, - "_key": "certificate" - }, - { - "type": "string", - "example": "a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1", - "description": "A SHA-256 fingerprint of the certificate.", - "api_fieldname": "certificate_fingerprint", - "readOnly": true, - "required": false, - "_key": "certificate_fingerprint" - }, - { - "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", - "maxLength": 500, - "x-nullable": true, - "example": "Certificate created by me.", - "description": "Human readable description of this certificate.", - "api_fieldname": "description", - "readOnly": false, - "required": false, - "_key": "description" - }, - { - "type": "integer", - "format": "int32", - "example": 1, - "description": "Device execution mode where 1 means a developer certificate.", - "api_fieldname": "device_execution_mode", - "readOnly": true, - "required": false, - "_key": "device_execution_mode" - }, - { - "type": "boolean", - "example": false, - "description": "If true, signature is not required. Default value false.", - "api_fieldname": "enrollment_mode", - "readOnly": false, - "required": false, - "_key": "enrollment_mode" - }, - { - "type": "string", - "example": "01619571d01d0242ac12000600000000", - "description": "Entity ID.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "id", - "readOnly": false, - "required": true, - "_key": "id" - }, - { - "description": "Whether or not this certificate is a developer certificate.", - "example": true, - "type": "boolean", - "readOnly": true, - "getter_custom_method": "is_developer_certificate_getter", - "_override": true, - "api_fieldname": "is_developer_certificate", - "required": false, - "_key": "is_developer_certificate" - }, - { - "type": "string", - "example": "CN=issuer", - "description": "Issuer of the certificate.", - "api_fieldname": "issuer", - "readOnly": true, - "required": false, - "_key": "issuer" - }, - { - "type": "string", - "maxLength": 100, - "example": "My certificate", - "description": "Certificate name.", - "api_fieldname": "name", - "readOnly": false, - "required": true, - "_key": "name" - }, - { - "x-nullable": true, - "type": "string", - "example": "01619571dad80242ac12000600000000", - "description": "The ID of the owner.", - "pattern": "[a-f0-9]{32}", - "api_fieldname": "owner_id", - "readOnly": true, - "required": false, - "_key": "owner_id" - }, - { - "type": "string", - "description": "Service name where the certificate is used.", - "enum": [ - "lwm2m", - "bootstrap" - ], - "api_fieldname": "service", - "readOnly": false, - "required": true, - "enum_reference": "trusted_certificate_service_enum", - "_key": "service" - }, - { - "type": "string", - "example": "ACTIVE", - "description": "Status of the certificate.", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "api_fieldname": "status", - "readOnly": false, - "required": false, - "enum_reference": "trusted_certificate_status_enum", - "_key": "status" - }, - { - "type": "string", - "example": "CN=subject", - "description": "Subject of the certificate.", - "api_fieldname": "subject", - "readOnly": true, - "required": false, - "_key": "subject" - }, - { - "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": "boolean", - "example": true, - "description": "This read-only flag indicates whether the certificate is valid or not.", - "readOnly": true, - "api_fieldname": "valid", - "required": false, - "_key": "valid" + "_key": "delete" }, { - "type": "string", - "format": "date-time", - "example": "2038-02-14T15:24:14Z", - "description": "Expiration time in UTC formatted as RFC3339.", - "api_fieldname": "validity", - "readOnly": true, - "required": false, - "_key": "validity" - } - ], - "field_renames": [], - "tags": [ - "Device security - certificates", - "Device security - developer class certificates" - ], - "group_id": "Security", - "_key": "trusted_certificate" - }, - { - "swagger_models": [ - "CampaignDeviceMetadataPage", - "UpdateCampaign", - "UpdateCampaignPage", - "UpdateCampaignPostRequest", - "UpdateCampaignPutRequest" - ], - "primary_key_field": "id", - "methods": [ - { - "description": "This command will archive a campaign.", + "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": [ + { + "type": "string", + "description": "The ID of the item after which to retrieve the next page.", + "example": "null", + "api_fieldname": "after", + "entity_fieldname": "after", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", + "required": false, + "_key": "after" + }, { "description": "Helper for creating the device filter string.", "detail": "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.", @@ -65307,49 +93925,276 @@ "_key": "device_filter_helper" }, { - "description": "The campaign ID", + "description": "The campaign ID.", "in": "path", "name": "campaign_id", "required": true, "type": "string", + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, "parameter_fieldname": "campaign_id", "_key": "id" + }, + { + "description": "A 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", + "enum": [ + "ASC", + "DESC" + ], + "description": "ASC or DESC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", + "required": false, + "enum_reference": "update_campaign_order_enum", + "_key": "order" } ], - "method": "post", - "mode": "archive", + "method": "get", + "mode": "device_metadata", "responses": [ { - "description": "The campaign has been archived.", - "_key": "202" - }, - { - "description": "Unable to change the phase of the campaign.", - "_key": "400" + "description": "Request successful.", + "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", + "description": "A list of entities.", + "items": { + "type": "object", + "properties": [ + { + "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" + }, + { + "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" + }, + { + "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" + }, + { + "type": "string", + "maxLength": 2000, + "description": "Description.", + "example": "a description", + "api_fieldname": "description", + "entity_fieldname": "description", + "_key": "description" + }, + { + "type": "string", + "description": "The device ID.", + "example": "015c2fec9bba0000000000010010036f", + "api_fieldname": "device_id", + "entity_fieldname": "device_id", + "_key": "device_id" + }, + { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag", + "_key": "etag" + }, + { + "type": "string", + "description": "The metadata record ID.", + "pattern": "[A-Fa-f0-9]{32}", + "example": "015c3029f6f7000000000001001000c3", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "campaign_device_metadata_id", + "in": "path", + "required": true, + "_key": "id" + }, + { + "type": "string", + "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" + }, + { + "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" + } + ], + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_device_metadata" + } + }, + "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": "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 entity name: always 'list'.", + "example": "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_device_metadata" + } + }, + "_key": "200" }, { - "description": "Not authenticated.", + "description": "Unauthorized", "_key": "401" - }, - { - "description": "Cannot find the campaign.", - "_key": "404" - }, - { - "description": "Cannot archive the campaign while in the current phase.", - "_key": "409" } ], - "path": "/v3/update-campaigns/{campaign_id}/archive", - "summary": "Archive a campaign.", - "return_type": "update_campaign", + "path": "/v3/update-campaigns/{campaign_id}/campaign-device-metadata", + "summary": "List all campaign device metadata", + "return_type": "paginated_response(campaign_device_metadata)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "update_campaign" + "type": "campaign_device_metadata" }, "x_filter": {}, "x_deprecation": null, @@ -65357,46 +94202,42 @@ "object", "etag", "type", - "groups", "filter", - "state" + "state", + "has_more", + "data", + "total_count" ], "group_id": "Device_Update", "parameter_map": { "campaign_id": "id" }, - "operation_id": "Update_Campaign_archive", - "pagination": false, + "operation_id": "Update_Campaign_Metadata_list", + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "campaign_device_metadata" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "archive" + "_key": "device_metadata" }, { - "description": "Create an update campaign.", + "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": [ { - "description": "An optional description of the campaign", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "parameter_fieldname": "description", - "in": "body", - "required": false, - "_key": "description" - }, - { - "description": "The filter for the devices the campaign is targeting at", "type": "string", - "example": "id__eq=00000000000000000000000000000000", - "api_fieldname": "device_filter", - "entity_fieldname": "device_filter", - "parameter_fieldname": "device_filter", - "in": "body", + "example": null, + "api_fieldname": "after", + "entity_fieldname": "after", + "description": "The ID of the item after which to retrieve the next page.", + "in": "query", + "name": "after", + "external_param": true, + "parameter_fieldname": "after", "required": false, - "_key": "device_filter" + "_key": "after" }, { "description": "Helper for creating the device filter string.", @@ -65411,296 +94252,315 @@ "_key": "device_filter_helper" }, { - "description": "The campaign name", + "description": "A comma-separated list of data fields to return. Currently supported: total_count.", + "in": "query", + "name": "include", "type": "string", - "maxLength": 128, - "example": "campaign", - "api_fieldname": "name", - "entity_fieldname": "name", - "parameter_fieldname": "name", - "in": "body", + "entity_fieldname": "include", + "api_fieldname": "include", + "external_param": true, + "parameter_fieldname": "include", "required": false, - "_key": "name" + "_key": "include" }, { - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "root_manifest_id", - "entity_fieldname": "root_manifest_id", - "parameter_fieldname": "root_manifest_id", - "in": "body", + "type": "integer", + "api_fieldname": "limit", + "entity_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.", + "in": "query", + "name": "limit", + "minimum": 2, + "maximum": 1000, + "external_param": true, + "parameter_fieldname": "limit", "required": false, - "_key": "root_manifest_id" + "_key": "limit" }, { - "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", + "enum": [ + "ASC", + "DESC" + ], + "description": "The order of the records. Acceptable values: ASC, DESC. Default: ASC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "in": "query", + "name": "order", + "external_param": true, + "parameter_fieldname": "order", "required": false, - "_key": "when" + "enum_reference": "update_campaign_order_enum", + "_key": "order" } ], - "method": "post", - "mode": "create", + "method": "get", + "mode": "list", "responses": [ { - "description": "Update campaign created", - "schema": [ - { - "group": "Device_Update", - "entity": "update_campaign", - "_key": "foreign_key" - }, - { - "autostop_reason": { - "description": "Text description of why a campaign failed to start or why a campaign stopped.", - "type": "string", - "example": "Insufficient billing credit.", - "api_fieldname": "autostop_reason", - "entity_fieldname": "autostop_reason" - }, - "phase": { - "description": "The current phase of the campaign.", - "type": "string", - "readOnly": true, - "api_fieldname": "phase", - "entity_fieldname": "phase" - }, - "created_at": { - "description": "The time the update campaign was created", - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at" - }, - "description": { - "description": "An optional description of the campaign", - "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description" - }, - "device_filter": { - "description": "The filter for the devices the campaign is targeting at", - "type": "string", - "example": "id__eq=00000000000000000000000000000000", - "api_fieldname": "device_filter", - "entity_fieldname": "device_filter" - }, - "etag": { - "description": "The entity instance signature", - "type": "string", - "example": "2017-05-22T12:37:58.753425Z", - "api_fieldname": "etag", - "entity_fieldname": "etag" - }, - "finished": { - "description": "The campaign finish timestamp", - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "finished", - "entity_fieldname": "finished" - }, - "id": { - "description": "The campaign ID", - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id" - }, - "name": { - "description": "The campaign name", - "type": "string", - "maxLength": 128, - "example": "campaign", - "api_fieldname": "name", - "entity_fieldname": "name" - }, - "object": { - "description": "The API resource entity", - "type": "string", - "example": "update-campaign", - "api_fieldname": "object", - "entity_fieldname": "object" - }, - "root_manifest_id": { - "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "root_manifest_id", - "entity_fieldname": "root_manifest_id" - }, - "root_manifest_url": { - "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "root_manifest_url", - "entity_fieldname": "root_manifest_url" - }, - "started_at": { + "description": "Request successful.", + "schema": { + "properties": [ + { "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "started_at", - "entity_fieldname": "started_at" + "example": null, + "api_fieldname": "after", + "entity_fieldname": "after", + "_key": "after" }, - "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": "array", + "items": [ + { + "group": "Device_Update", + "entity": "update_campaign", + "_key": "foreign_key" + }, + { + "created_at": { + "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" + }, + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "campaign_strategy": { + "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`.", + "type": "string", + "enum": [ + "one-shot", + "continuous" + ], + "default": "one-shot" + }, + "object": { + "description": "Entity name: always 'update-campaign'.", + "type": "string", + "example": "update-campaign" + }, + "active_at": { + "description": "The time the campaign entered the active state.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "approval_required": { + "type": "boolean", + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false" + }, + "archived_at": { + "description": "The time the campaign was archived.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "autostop": { + "type": "boolean", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false" + }, + "autostop_success_percent": { + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00" + }, + "autostop_reason": { + "description": "Text description of why a campaign failed to start or why a campaign stopped.", + "type": "string", + "example": "Insufficient billing credit." + }, + "description": { + "description": "An optional description of the campaign.", + "type": "string", + "maxLength": 2000, + "example": "This campaign updates Class XX devices to version 1.34" + }, + "device_filter": { + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", + "type": "string", + "example": "state__eq=registered" + }, + "finished": { + "description": "The time the campaign finished.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "id": { + "description": "The campaign ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5" + }, + "name": { + "description": "The campaign name.", + "type": "string", + "maxLength": 128, + "example": "campaign" + }, + "root_manifest_id": { + "description": "The ID of the manifest that will be sent to the device as part of the campaign.", + "type": "string", + "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": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102" + }, + "starting_at": { + "description": "The time the campaign will be started.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "started_at": { + "description": "The time the campaign was started.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "stopping_at": { + "description": "The time the campaign will be stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "stopped_at": { + "description": "The time the campaign was stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z" + }, + "phase": { + "description": "The phase of the campaign.", + "type": "string", + "enum": [ + "draft", + "awaiting_approval", + "timed", + "starting", + "active", + "stopping", + "stopped", + "deleted", + "archived" + ] + }, + "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": [] + } + }, + "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 + }, + "_key": "properties" + } ], - "type": "string", - "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" + "api_fieldname": "data", + "entity_fieldname": "data", + "_key": "data" }, - "updated_at": { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at" + { + "type": "boolean", + "api_fieldname": "has_more", + "entity_fieldname": "has_more", + "_key": "has_more" }, - "_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" - } - ], - "path": "/v3/update-campaigns/", - "summary": "Create a campaign", - "return_type": "update_campaign", - "return_info": { - "self": true, - "custom": false, - "type": "update_campaign" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "state", - "autostop_reason", - "phase", - "created_at", - "finished", - "id", - "root_manifest_url", - "started_at", - "updated_at" - ], - "group_id": "Device_Update", - "parameter_map": { - "campaign_id": "id" - }, - "operation_id": "Update_Campaign_create", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "create" - }, - { - "description": "Delete an update campaign.", - "field_renames": [], - "fields": [ - { - "description": "Helper for creating the device filter string.", - "detail": "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.", - "type": "filter", - "foundation_reference": "devices.device.list", - "getter_custom_method": "device_filter_helper_getter", - "setter_custom_method": "device_filter_helper_setter", - "_override": true, - "api_fieldname": "device_filter_helper", - "entity_fieldname": "device_filter_helper", - "_key": "device_filter_helper" - }, - { - "description": "The ID of the update campaign", - "in": "path", - "name": "campaign_id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "campaign_id", - "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Update campaign deleted", - "_key": "204" - }, - { - "description": "Validation error: The data used to update the campaign did not validate\n", - "_key": "400" - }, - { - "description": "Not authenticated", - "_key": "401" - }, - { - "description": "Update campaign can't be found", - "_key": "404" + { + "type": "integer", + "api_fieldname": "limit", + "entity_fieldname": "limit", + "_key": "limit" + }, + { + "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 to return. Acceptable values: ASC, DESC. Default: ASC.", + "example": "ASC", + "api_fieldname": "order", + "entity_fieldname": "order", + "_key": "order" + }, + { + "type": "integer", + "api_fieldname": "total_count", + "entity_fieldname": "total_count", + "_key": "total_count" + } + ], + "pagination": true, + "foreign_key": { + "group": "Device_Update", + "entity": "update_campaign" + } + }, + "_key": "200" }, { - "description": "Conflict - Cannot delete the campaign while in the current phase.", + "description": "Validation error: The data used to update the campaign did not validate.\n", "schema": { "type": "object", "required": [ @@ -65770,381 +94630,305 @@ } ] }, - "_key": "409" - } - ], - "path": "/v3/update-campaigns/{campaign_id}/", - "summary": "Delete a campaign", - "return_type": "update_campaign", - "return_info": { - "self": true, - "custom": false, - "type": "update_campaign" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "state" - ], - "group_id": "Device_Update", - "parameter_map": { - "campaign_id": "id" - }, - "operation_id": "Update_Campaign_destroy", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "delete" - }, - { - "description": "Get campaign device metadata.", - "field_renames": [], - "fields": [ - { - "type": "string", - "description": "The ID of the the item after which to retrieve the next page", - "example": "null", - "api_fieldname": "after", - "entity_fieldname": "after", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, - { - "description": "Helper for creating the device filter string.", - "detail": "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.", - "type": "filter", - "foundation_reference": "devices.device.list", - "getter_custom_method": "device_filter_helper_getter", - "setter_custom_method": "device_filter_helper_setter", - "_override": true, - "api_fieldname": "device_filter_helper", - "entity_fieldname": "device_filter_helper", - "_key": "device_filter_helper" - }, - { - "description": "The update campaign ID", - "in": "path", - "name": "campaign_id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "campaign_id", - "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "id" - }, - { - "description": "A 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" + "_key": "400" }, { - "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "description": "ASC or DESC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "enum_reference": "update_campaign_order_enum", - "_key": "order" - } - ], - "method": "get", - "mode": "device_metadata", - "responses": [ - { - "description": "Request successful", + "description": "Not authenticated.", "schema": { "type": "object", + "required": [ + "code", + "message", + "object", + "request_id", + "type" + ], "properties": [ { - "type": "string", - "description": "The entity ID to fetch after the given one", - "example": "null", - "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": "The device's campaign ID", - "example": "015bf72fccda00000000000100100280", - "api_fieldname": "campaign", - "entity_fieldname": "campaign_id", - "parameter_fieldname": "campaign_id", - "in": "path", - "required": true, - "_key": "campaign" - }, - { - "type": "string", - "format": "date-time", - "description": "The time the campaign was created", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at", - "_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", - "entity_fieldname": "deployment_state", - "_key": "deployment_state" - }, - { - "type": "string", - "maxLength": 2000, - "description": "Description", - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description", - "_key": "description" - }, - { - "type": "string", - "description": "The device ID", - "example": "015c2fec9bba0000000000010010036f", - "api_fieldname": "device_id", - "entity_fieldname": "device_id", - "_key": "device_id" - }, - { - "type": "string", - "description": "API resource entity version", - "example": "2017-05-22T12:37:58.753425Z", - "api_fieldname": "etag", - "entity_fieldname": "etag", - "_key": "etag" - }, - { - "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" - }, - { - "type": "string", - "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", - "example": "", - "api_fieldname": "mechanism_url", - "entity_fieldname": "mechanism_url", - "_key": "mechanism_url" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "maxLength": 128, - "description": "The record name", - "example": "default_object_name", - "api_fieldname": "name", - "entity_fieldname": "name", + "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": "The entity name: always 'update-campaign-device-metadata'", - "example": "update-campaign-device-metadata", - "api_fieldname": "object", - "entity_fieldname": "object", - "_key": "object" + "description": "Message describing the error condition.", + "_key": "message" }, { "type": "string", - "format": "date-time", - "description": "The record was modified in the database format: date-time", - "example": "2017-05-22T12:37:58.776736Z", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at", - "_key": "updated_at" + "description": "Name of the field which caused the error.", + "_key": "name" } - ], - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_device_metadata" - } + ] }, - "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" + "_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 entity name: always 'list'", - "example": "list", - "api_fieldname": "object", - "entity_fieldname": "object", + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], "_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" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, { - "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" + "type": "string", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" } - ], - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "campaign_device_metadata" - } + ] }, - "_key": "200" - }, - { - "description": "Unauthorized", - "_key": "401" + "_key": "404" } ], - "path": "/v3/update-campaigns/{campaign_id}/campaign-device-metadata/", - "summary": "List all campaign device metadata", - "return_type": "paginated_response(campaign_device_metadata)", + "path": "/v3/update-campaigns", + "summary": "List all campaigns", + "return_type": "paginated_response(update_campaign)", "return_info": { - "self": false, + "self": true, "custom": false, - "type": "campaign_device_metadata" + "type": "update_campaign" + }, + "x_filter": { + "created_at": [ + "in", + "nin", + "lte", + "gte" + ], + "description": [ + "eq", + "neq", + "in", + "nin" + ], + "device_filter": [ + "eq", + "neq", + "in", + "nin" + ], + "finished": [ + "in", + "nin", + "lte", + "gte" + ], + "id": [ + "eq", + "neq", + "in", + "nin" + ], + "name": [ + "eq", + "neq", + "in", + "nin" + ], + "root_manifest_id": [ + "eq", + "neq", + "in", + "nin" + ], + "started_at": [ + "in", + "nin", + "lte", + "gte" + ], + "state": [ + "eq", + "neq", + "in", + "nin" + ], + "updated_at": [ + "in", + "nin", + "lte", + "gte" + ], + "when": [ + "in", + "nin", + "lte", + "gte" + ] }, - "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", "state", - "has_more", "data", - "total_count" + "has_more", + "total_count", + "created_at__in", + "created_at__nin", + "created_at__lte", + "created_at__gte", + "description__eq", + "description__neq", + "description__in", + "description__nin", + "device_filter__eq", + "device_filter__neq", + "device_filter__in", + "device_filter__nin", + "finished__in", + "finished__nin", + "finished__lte", + "finished__gte", + "id__eq", + "id__neq", + "id__in", + "id__nin", + "name__eq", + "name__neq", + "name__in", + "name__nin", + "root_manifest_id__eq", + "root_manifest_id__neq", + "root_manifest_id__in", + "root_manifest_id__nin", + "started_at__in", + "started_at__nin", + "started_at__lte", + "started_at__gte", + "state__eq", + "state__neq", + "state__in", + "state__nin", + "updated_at__in", + "updated_at__nin", + "updated_at__lte", + "updated_at__gte", + "when__in", + "when__nin", + "when__lte", + "when__gte" ], + "foreign_key_priority": "self", "group_id": "Device_Update", "parameter_map": { "campaign_id": "id" }, - "operation_id": "Update_Campaign_Metadata_list", + "operation_id": "Update_Campaign_list", "pagination": true, "foreign_key": { "group": "Device_Update", - "entity": "campaign_device_metadata" + "entity": "update_campaign" }, "request_content_type": "application/json", "request_body": "json", - "_key": "device_metadata" + "_key": "list" }, { - "description": "Get update campaigns for devices specified by a filter.", + "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": [ - { - "type": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "description": "The ID of the the item after which to retrieve the next page", - "in": "query", - "name": "after", - "external_param": true, - "parameter_fieldname": "after", - "required": false, - "_key": "after" - }, { "description": "Helper for creating the device filter string.", "detail": "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.", @@ -66158,400 +94942,535 @@ "_key": "device_filter_helper" }, { - "description": "A 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", - "api_fieldname": "limit", - "entity_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.", - "in": "query", - "name": "limit", - "minimum": 2, - "maximum": 1000, - "external_param": true, - "parameter_fieldname": "limit", - "required": false, - "_key": "limit" - }, - { + "description": "The campaign ID.", "type": "string", - "enum": [ - "ASC", - "DESC" - ], - "description": "The order of the records. Acceptable values: ASC, DESC. Default: ASC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "in": "query", - "name": "order", - "external_param": true, - "parameter_fieldname": "order", - "required": false, - "enum_reference": "update_campaign_order_enum", - "_key": "order" + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", + "api_fieldname": "id", + "entity_fieldname": "id", + "parameter_fieldname": "campaign_id", + "in": "path", + "required": true, + "_key": "id" } ], "method": "get", - "mode": "list", + "mode": "read", "responses": [ { - "description": "Request successful", + "description": "Retrieved result successfully.", + "schema": [ + { + "group": "Device_Update", + "entity": "update_campaign", + "_key": "foreign_key" + }, + { + "created_at": { + "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" + }, + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "campaign_strategy": { + "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`.", + "type": "string", + "enum": [ + "one-shot", + "continuous" + ], + "default": "one-shot", + "api_fieldname": "campaign_strategy", + "entity_fieldname": "campaign_strategy" + }, + "object": { + "description": "Entity name: always 'update-campaign'.", + "type": "string", + "example": "update-campaign", + "api_fieldname": "object", + "entity_fieldname": "object" + }, + "active_at": { + "description": "The time the campaign entered the active state.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "active_at", + "entity_fieldname": "active_at" + }, + "approval_required": { + "type": "boolean", + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false", + "api_fieldname": "approval_required", + "entity_fieldname": "approval_required" + }, + "archived_at": { + "description": "The time the campaign was archived.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "archived_at", + "entity_fieldname": "archived_at" + }, + "autostop": { + "type": "boolean", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false", + "api_fieldname": "autostop", + "entity_fieldname": "autostop" + }, + "autostop_success_percent": { + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00", + "api_fieldname": "autostop_success_percent", + "entity_fieldname": "autostop_success_percent" + }, + "autostop_reason": { + "description": "Text description of why a campaign failed to start or why a campaign stopped.", + "type": "string", + "example": "Insufficient billing credit.", + "api_fieldname": "autostop_reason", + "entity_fieldname": "autostop_reason" + }, + "description": { + "description": "An optional description of the campaign.", + "type": "string", + "maxLength": 2000, + "example": "This campaign updates Class XX devices to version 1.34", + "api_fieldname": "description", + "entity_fieldname": "description" + }, + "device_filter": { + "description": "The filter for the devices the campaign targets. Refer to this using the filter ID.", + "type": "string", + "example": "state__eq=registered", + "api_fieldname": "device_filter", + "entity_fieldname": "device_filter" + }, + "finished": { + "description": "The time the campaign finished.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "finished", + "entity_fieldname": "finished" + }, + "id": { + "description": "The campaign ID.", + "type": "string", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", + "api_fieldname": "id", + "entity_fieldname": "id" + }, + "name": { + "description": "The campaign name.", + "type": "string", + "maxLength": 128, + "example": "campaign", + "api_fieldname": "name", + "entity_fieldname": "name" + }, + "root_manifest_id": { + "description": "The ID of the manifest that will be sent to the device as part of the campaign.", + "type": "string", + "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": "https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/016e83dce36a00000000000100100102", + "api_fieldname": "root_manifest_url", + "entity_fieldname": "root_manifest_url" + }, + "starting_at": { + "description": "The time the campaign will be started.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "starting_at", + "entity_fieldname": "starting_at" + }, + "started_at": { + "description": "The time the campaign was started.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "started_at", + "entity_fieldname": "started_at" + }, + "stopping_at": { + "description": "The time the campaign will be stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopping_at", + "entity_fieldname": "stopping_at" + }, + "stopped_at": { + "description": "The time the campaign was stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopped_at", + "entity_fieldname": "stopped_at" + }, + "phase": { + "description": "The phase of the campaign.", + "type": "string", + "enum": [ + "draft", + "awaiting_approval", + "timed", + "starting", + "active", + "stopping", + "stopped", + "deleted", + "archived" + ], + "api_fieldname": "phase", + "entity_fieldname": "phase" + }, + "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": "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": "string", - "example": null, - "api_fieldname": "after", - "entity_fieldname": "after", - "_key": "after" + "type": "integer", + "format": "int32", + "description": "HTTP response code", + "example": 400, + "_key": "code" }, { - "items": [ - { - "group": "Device_Update", - "entity": "update_campaign", - "_key": "foreign_key" - }, - { - "autostop_reason": { - "description": "Text description of why a campaign failed to start or why a campaign stopped.", - "type": "string", - "example": "Insufficient billing credit." - }, - "phase": { - "description": "The current phase of the campaign.", - "type": "string", - "readOnly": true - }, - "created_at": { - "description": "The time the update campaign was created", - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z" - }, - "description": { - "description": "An optional description of the campaign", - "type": "string", - "maxLength": 2000, - "example": "" - }, - "device_filter": { - "description": "The filter for the devices the campaign is targeting at", - "type": "string", - "example": "id__eq=00000000000000000000000000000000" - }, - "etag": { - "description": "The entity instance signature", - "type": "string", - "example": "2017-05-22T12:37:58.753425Z" - }, - "finished": { - "description": "The campaign finish timestamp", - "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z" - }, - "id": { - "description": "The campaign ID", - "type": "string", - "example": "00000000000000000000000000000000" - }, - "name": { - "description": "The campaign name", - "type": "string", - "maxLength": 128, - "example": "campaign" - }, - "object": { - "description": "The API resource entity", - "type": "string", - "example": "update-campaign" - }, - "root_manifest_id": { - "type": "string", - "example": "00000000000000000000000000000000" - }, - "root_manifest_url": { + "type": "array", + "description": "Request fields which failed validation.", + "items": { + "type": "object", + "required": [ + "name", + "message" + ], + "properties": [ + { "type": "string", - "example": "http://example.com/00000000000000000000000000000000" + "description": "Message describing the error condition.", + "_key": "message" }, - "started_at": { + { "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z" - }, - "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" - ], + "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", - "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": [] - } + "description": "Message describing the error condition.", + "_key": "message" }, - "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 - }, - "updated_at": { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string" - }, - "_key": "properties" - } + "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" ], - "type": "array", - "example": "[]", - "api_fieldname": "data", - "entity_fieldname": "data", - "_key": "data" + "_key": "object" }, { - "type": "boolean", - "api_fieldname": "has_more", - "entity_fieldname": "has_more", - "_key": "has_more" + "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": "integer", - "api_fieldname": "limit", - "entity_fieldname": "limit", - "_key": "limit" + "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": "list", - "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 to return. Acceptable values: ASC, DESC. Default: ASC", - "example": "ASC", - "api_fieldname": "order", - "entity_fieldname": "order", - "_key": "order" + "_key": "object" }, { - "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": "update_campaign" - } + ] }, - "_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" } ], - "path": "/v3/update-campaigns/", - "summary": "List all campaigns", - "return_type": "paginated_response(update_campaign)", + "path": "/v3/update-campaigns/{campaign_id}", + "summary": "Get a campaign.", + "return_type": "update_campaign", "return_info": { "self": true, "custom": false, "type": "update_campaign" }, - "x_filter": { - "created_at": [ - "in", - "nin", - "lte", - "gte" - ], - "description": [ - "eq", - "neq", - "in", - "nin" - ], - "device_filter": [ - "eq", - "neq", - "in", - "nin" - ], - "finished": [ - "in", - "nin", - "lte", - "gte" - ], - "id": [ - "eq", - "neq", - "in", - "nin" - ], - "name": [ - "eq", - "neq", - "in", - "nin" - ], - "root_manifest_id": [ - "eq", - "neq", - "in", - "nin" - ], - "started_at": [ - "in", - "nin", - "lte", - "gte" - ], - "state": [ - "eq", - "neq", - "in", - "nin" - ], - "updated_at": [ - "in", - "nin", - "lte", - "gte" - ], - "when": [ - "in", - "nin", - "lte", - "gte" - ] - }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", "state", - "data", - "has_more", - "total_count", - "created_at__in", - "created_at__nin", - "created_at__lte", - "created_at__gte", - "description__eq", - "description__neq", - "description__in", - "description__nin", - "device_filter__eq", - "device_filter__neq", - "device_filter__in", - "device_filter__nin", - "finished__in", - "finished__nin", - "finished__lte", - "finished__gte", - "id__eq", - "id__neq", - "id__in", - "id__nin", - "name__eq", - "name__neq", - "name__in", - "name__nin", - "root_manifest_id__eq", - "root_manifest_id__neq", - "root_manifest_id__in", - "root_manifest_id__nin", - "started_at__in", - "started_at__nin", - "started_at__lte", - "started_at__gte", - "state__eq", - "state__neq", - "state__in", - "state__nin", - "updated_at__in", - "updated_at__nin", - "updated_at__lte", - "updated_at__gte", - "when__in", - "when__nin", - "when__lte", - "when__gte" + "created_at", + "updated_at", + "campaign_strategy", + "active_at", + "approval_required", + "archived_at", + "autostop", + "autostop_success_percent", + "autostop_reason", + "description", + "device_filter", + "finished", + "name", + "root_manifest_id", + "root_manifest_url", + "starting_at", + "started_at", + "stopping_at", + "stopped_at", + "phase", + "when" ], - "foreign_key_priority": "self", "group_id": "Device_Update", "parameter_map": { "campaign_id": "id" }, - "operation_id": "Update_Campaign_list", - "pagination": true, - "foreign_key": { - "group": "Device_Update", - "entity": "update_campaign" - }, + "operation_id": "Update_Campaign_retrieve", + "pagination": false, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_key": "read" }, { - "description": "Get an update campaign.", + "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": [ { @@ -66567,280 +95486,316 @@ "_key": "device_filter_helper" }, { - "description": "The campaign ID", + "description": "The campaign ID.", + "in": "path", + "name": "campaign_id", + "required": true, "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", + "api_fieldname": "campaign_id", + "external_param": false, "parameter_fieldname": "campaign_id", - "in": "path", - "required": true, "_key": "id" } ], - "method": "get", - "mode": "read", + "method": "post", + "mode": "start", "responses": [ { - "description": "Retrieved result successfully", - "schema": [ - { - "group": "Device_Update", - "entity": "update_campaign", - "_key": "foreign_key" - }, - { - "autostop_reason": { - "description": "Text description of why a campaign failed to start or why a campaign stopped.", + "description": "The campaign is starting.", + "_key": "202" + }, + { + "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", - "example": "Insufficient billing credit.", - "api_fieldname": "autostop_reason", - "entity_fieldname": "autostop_reason" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "phase": { - "description": "The current phase of the campaign.", + { "type": "string", - "readOnly": true, - "api_fieldname": "phase", - "entity_fieldname": "phase" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "created_at": { - "description": "The time the update campaign was created", + { "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "description": { - "description": "An optional description of the campaign", + { "type": "string", - "maxLength": 2000, - "example": "", - "api_fieldname": "description", - "entity_fieldname": "description" + "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" }, - "device_filter": { - "description": "The filter for the devices the campaign is targeting 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" + }, + { "type": "string", - "example": "id__eq=00000000000000000000000000000000", - "api_fieldname": "device_filter", - "entity_fieldname": "device_filter" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "etag": { - "description": "The entity instance signature", + { "type": "string", - "example": "2017-05-22T12:37:58.753425Z", - "api_fieldname": "etag", - "entity_fieldname": "etag" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "finished": { - "description": "The campaign finish timestamp", + { "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "finished", - "entity_fieldname": "finished" + "description": "ID of the request.", + "example": "0161991d63150242ac12000600000000", + "_key": "request_id" }, - "id": { - "description": "The campaign ID", + { "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "id", - "entity_fieldname": "id" + "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" }, - "name": { - "description": "The campaign 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" + }, + { "type": "string", - "maxLength": 128, - "example": "campaign", - "api_fieldname": "name", - "entity_fieldname": "name" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "object": { - "description": "The API resource entity", + { "type": "string", - "example": "update-campaign", - "api_fieldname": "object", - "entity_fieldname": "object" + "description": "Entity name, always `error`.", + "enum": [ + "error" + ], + "_key": "object" }, - "root_manifest_id": { + { "type": "string", - "example": "00000000000000000000000000000000", - "api_fieldname": "root_manifest_id", - "entity_fieldname": "root_manifest_id" + "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" }, - "root_manifest_url": { + { "type": "string", - "example": "http://example.com/00000000000000000000000000000000", - "api_fieldname": "root_manifest_url", - "entity_fieldname": "root_manifest_url" + "description": "A human readable informative explanation", + "example": "Validation error", + "_key": "message" }, - "started_at": { + { "type": "string", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "started_at", - "entity_fieldname": "started_at" - }, - "state": { - "description": "DEPRECATED: The state of the campaign (use phase instead).", + "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" ], - "type": "string", - "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" }, - "updated_at": { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", + { "type": "string", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at" - }, - "_key": "properties" - } - ], - "_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 campaign", - "_key": "404" - } - ], - "path": "/v3/update-campaigns/{campaign_id}/", - "summary": "Get a campaign.", - "return_type": "update_campaign", - "return_info": { - "self": true, - "custom": false, - "type": "update_campaign" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "state", - "autostop_reason", - "phase", - "created_at", - "description", - "device_filter", - "finished", - "name", - "root_manifest_id", - "root_manifest_url", - "started_at", - "when", - "updated_at" - ], - "group_id": "Device_Update", - "parameter_map": { - "campaign_id": "id" - }, - "operation_id": "Update_Campaign_retrieve", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_key": "read" - }, - { - "description": "This command will begin the process of starting a campaign.", - "field_renames": [], - "fields": [ - { - "description": "Helper for creating the device filter string.", - "detail": "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.", - "type": "filter", - "foundation_reference": "devices.device.list", - "getter_custom_method": "device_filter_helper_getter", - "setter_custom_method": "device_filter_helper_setter", - "_override": true, - "api_fieldname": "device_filter_helper", - "entity_fieldname": "device_filter_helper", - "_key": "device_filter_helper" - }, - { - "description": "The campaign ID", - "in": "path", - "name": "campaign_id", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "campaign_id", - "external_param": false, - "parameter_fieldname": "campaign_id", - "_key": "id" - } - ], - "method": "post", - "mode": "start", - "responses": [ - { - "description": "The campaign is starting.", - "_key": "202" - }, - { - "description": "Unable to change the phase of the campaign.", - "_key": "400" - }, - { - "description": "Not authenticated.", - "_key": "401" - }, - { - "description": "Cannot find the campaign.", - "_key": "404" - }, - { - "description": "Cannot start the campaign while in the current phase.", + "description": "Error type used to categorise the error.", + "example": "validation_error", + "_key": "type" + } + ] + }, "_key": "409" } ], @@ -66858,7 +95813,6 @@ "object", "etag", "type", - "groups", "filter", "state" ], @@ -66873,7 +95827,7 @@ "_key": "start" }, { - "description": "This command will begin the process of stopping a campaign.", + "description": "Stop a campaign. Stopping is a process that requires the campaign go through several [phases](https://www.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": [ { @@ -66889,11 +95843,12 @@ "_key": "device_filter_helper" }, { - "description": "The campaign ID", + "description": "The campaign ID.", "in": "path", "name": "campaign_id", "required": true, "type": "string", + "pattern": "[A-Fa-f0-9]{32}", "entity_fieldname": "id", "api_fieldname": "campaign_id", "external_param": false, @@ -66910,18 +95865,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" } ], @@ -66939,7 +96170,6 @@ "object", "etag", "type", - "groups", "filter", "state" ], @@ -66954,14 +96184,48 @@ "_key": "stop" }, { - "description": "Modify an update campaign.", + "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": [ { - "description": "An optional description of the campaign", + "type": "boolean", + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false", + "api_fieldname": "approval_required", + "entity_fieldname": "approval_required", + "parameter_fieldname": "approval_required", + "in": "body", + "required": false, + "_key": "approval_required" + }, + { + "type": "boolean", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false", + "api_fieldname": "autostop", + "entity_fieldname": "autostop", + "parameter_fieldname": "autostop", + "in": "body", + "required": false, + "_key": "autostop" + }, + { + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00", + "api_fieldname": "autostop_success_percent", + "entity_fieldname": "autostop_success_percent", + "parameter_fieldname": "autostop_success_percent", + "in": "body", + "required": false, + "_key": "autostop_success_percent" + }, + { + "description": "An optional description of the campaign.", "type": "string", "maxLength": 2000, - "example": "", + "example": "This campaign updates Class XX devices to version 1.34", "api_fieldname": "description", "entity_fieldname": "description", "parameter_fieldname": "description", @@ -66970,9 +96234,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", @@ -66993,9 +96257,10 @@ "_key": "device_filter_helper" }, { - "description": "The campaign ID", + "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", @@ -67004,7 +96269,7 @@ "_key": "id" }, { - "description": "The campaign name", + "description": "The campaign name.", "type": "string", "maxLength": 128, "example": "campaign", @@ -67016,8 +96281,9 @@ "_key": "name" }, { + "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", @@ -67043,7 +96309,7 @@ "mode": "update", "responses": [ { - "description": "Update campaign updated", + "description": "Update campaign updated.", "schema": [ { "group": "Device_Update", @@ -67051,52 +96317,109 @@ "_key": "foreign_key" }, { - "autostop_reason": { - "description": "Text description of why a campaign failed to start or why a campaign stopped.", + "created_at": { "type": "string", - "example": "Insufficient billing credit.", - "api_fieldname": "autostop_reason", - "entity_fieldname": "autostop_reason" + "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" + }, + "etag": { + "type": "string", + "description": "API resource entity version.", + "example": "2017-05-22T12:37:58.753425Z", + "api_fieldname": "etag", + "entity_fieldname": "etag" + }, + "updated_at": { + "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" + }, + "campaign_strategy": { + "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`.", + "type": "string", + "enum": [ + "one-shot", + "continuous" + ], + "default": "one-shot", + "api_fieldname": "campaign_strategy", + "entity_fieldname": "campaign_strategy" + }, + "object": { + "description": "Entity name: always 'update-campaign'.", + "type": "string", + "example": "update-campaign", + "api_fieldname": "object", + "entity_fieldname": "object" }, - "phase": { - "description": "The current phase of the campaign.", + "active_at": { + "description": "The time the campaign entered the active state.", "type": "string", - "readOnly": true, - "api_fieldname": "phase", - "entity_fieldname": "phase" + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "active_at", + "entity_fieldname": "active_at" }, - "created_at": { - "description": "The time the update campaign was created", + "approval_required": { + "type": "boolean", + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false", + "api_fieldname": "approval_required", + "entity_fieldname": "approval_required" + }, + "archived_at": { + "description": "The time the campaign was archived.", "type": "string", "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", - "api_fieldname": "created_at", - "entity_fieldname": "created_at" + "api_fieldname": "archived_at", + "entity_fieldname": "archived_at" + }, + "autostop": { + "type": "boolean", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false", + "api_fieldname": "autostop", + "entity_fieldname": "autostop" + }, + "autostop_success_percent": { + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00", + "api_fieldname": "autostop_success_percent", + "entity_fieldname": "autostop_success_percent" + }, + "autostop_reason": { + "description": "Text description of why a campaign failed to start or why a campaign stopped.", + "type": "string", + "example": "Insufficient billing credit.", + "api_fieldname": "autostop_reason", + "entity_fieldname": "autostop_reason" }, "description": { - "description": "An optional description of the campaign", + "description": "An optional description of the campaign.", "type": "string", "maxLength": 2000, - "example": "", + "example": "This campaign updates Class XX devices to version 1.34", "api_fieldname": "description", "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" }, - "etag": { - "description": "The entity instance signature", - "type": "string", - "example": "2017-05-22T12:37:58.753425Z", - "api_fieldname": "etag", - "entity_fieldname": "etag" - }, "finished": { - "description": "The campaign finish timestamp", + "description": "The time the campaign finished.", "type": "string", "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", @@ -67104,48 +96427,87 @@ "entity_fieldname": "finished" }, "id": { - "description": "The campaign ID", + "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "entity_fieldname": "id" }, "name": { - "description": "The campaign name", + "description": "The campaign name.", "type": "string", "maxLength": 128, "example": "campaign", "api_fieldname": "name", "entity_fieldname": "name" }, - "object": { - "description": "The API resource entity", - "type": "string", - "example": "update-campaign", - "api_fieldname": "object", - "entity_fieldname": "object" - }, "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" }, + "starting_at": { + "description": "The time the campaign will be started.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "starting_at", + "entity_fieldname": "starting_at" + }, "started_at": { + "description": "The time the campaign was started.", "type": "string", "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", "api_fieldname": "started_at", "entity_fieldname": "started_at" }, + "stopping_at": { + "description": "The time the campaign will be stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopping_at", + "entity_fieldname": "stopping_at" + }, + "stopped_at": { + "description": "The time the campaign was stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopped_at", + "entity_fieldname": "stopped_at" + }, + "phase": { + "description": "The phase of the campaign.", + "type": "string", + "enum": [ + "draft", + "awaiting_approval", + "timed", + "starting", + "active", + "stopping", + "stopped", + "deleted", + "archived" + ], + "api_fieldname": "phase", + "entity_fieldname": "phase" + }, "state": { - "description": "DEPRECATED: The state of the campaign (use phase instead).", + "description": "The state of the campaign.", + "type": "string", "enum": [ "draft", "scheduled", @@ -67167,7 +96529,6 @@ "userstopped", "conflict" ], - "type": "string", "x-deprecation": { "issued_at": "2019-03-18T14:55:20+00:00", "end_of_life_at": "2020-03-18T14:55:20+00:00", @@ -67186,25 +96547,17 @@ "api_fieldname": "when", "entity_fieldname": "when" }, - "updated_at": { - "description": "The time the object was updated", - "format": "date-time", - "example": "2017-05-22T12:37:55.576563Z", - "type": "string", - "api_fieldname": "updated_at", - "entity_fieldname": "updated_at" - }, "_key": "properties" } ], "_key": "200" }, { - "description": "Validation error: The data used to update the campaign did not validate\n", + "description": "Validation error: The data used to update the campaign did not validate.\n", "_key": "400" }, { - "description": "Not authenticated", + "description": "Not authenticated.", "_key": "401" }, { @@ -67212,11 +96565,11 @@ "_key": "403" }, { - "description": "Update campaign can't be found", + "description": "Update campaign can't be found.", "_key": "404" } ], - "path": "/v3/update-campaigns/{campaign_id}/", + "path": "/v3/update-campaigns/{campaign_id}", "summary": "Modify a campaign", "return_type": "update_campaign", "return_info": { @@ -67230,16 +96583,21 @@ "object", "etag", "type", - "groups", "filter", "state", - "autostop_reason", - "phase", "created_at", + "updated_at", + "campaign_strategy", + "active_at", + "archived_at", + "autostop_reason", "finished", "root_manifest_url", + "starting_at", "started_at", - "updated_at" + "stopping_at", + "stopped_at", + "phase" ], "group_id": "Device_Update", "parameter_map": { @@ -67253,6 +96611,44 @@ } ], "fields": [ + { + "description": "The time the campaign entered the active state.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "active_at", + "readOnly": true, + "required": false, + "_key": "active_at" + }, + { + "type": "boolean", + "description": "Flag indicating whether approval is needed to start the campaign.", + "example": "false", + "api_fieldname": "approval_required", + "readOnly": false, + "required": false, + "_key": "approval_required" + }, + { + "description": "The time the campaign was archived.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "archived_at", + "readOnly": true, + "required": false, + "_key": "archived_at" + }, + { + "type": "boolean", + "description": "Flag indicating whether the campaign should be auto-stopped on reaching a threshold.", + "example": "false", + "api_fieldname": "autostop", + "readOnly": false, + "required": false, + "_key": "autostop" + }, { "description": "Text description of why a campaign failed to start or why a campaign stopped.", "type": "string", @@ -67263,9 +96659,33 @@ "_key": "autostop_reason" }, { - "description": "The time the update campaign was created", + "description": "Percent of successful device updates to auto stop the campaign.", + "type": "number", + "format": "double", + "example": "85.00", + "api_fieldname": "autostop_success_percent", + "readOnly": false, + "required": false, + "_key": "autostop_success_percent" + }, + { + "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`.", + "type": "string", + "enum": [ + "one-shot", + "continuous" + ], + "default": "one-shot", + "api_fieldname": "campaign_strategy", + "readOnly": false, + "required": false, + "enum_reference": "update_campaign_strategy_enum", + "_key": "campaign_strategy" + }, + { "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, @@ -67273,19 +96693,19 @@ "_key": "created_at" }, { - "description": "An optional description of the campaign", + "description": "An optional description of the campaign.", "type": "string", "maxLength": 2000, - "example": "", + "example": "This campaign updates Class XX devices to version 1.34", "api_fieldname": "description", "readOnly": false, "required": false, "_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, @@ -67305,7 +96725,7 @@ "_key": "device_filter_helper" }, { - "description": "The campaign finish timestamp", + "description": "The time the campaign finished.", "type": "string", "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", @@ -67315,16 +96735,17 @@ "_key": "finished" }, { - "description": "The campaign ID", + "description": "The campaign ID.", "type": "string", - "example": "00000000000000000000000000000000", + "pattern": "[A-Fa-f0-9]{32}", + "example": "016e83ddc648000000000001001000f5", "api_fieldname": "id", "readOnly": false, "required": true, "_key": "id" }, { - "description": "The campaign name", + "description": "The campaign name.", "type": "string", "maxLength": 128, "example": "campaign", @@ -67334,30 +96755,45 @@ "_key": "name" }, { - "description": "The current phase of the campaign.", + "description": "The phase of the campaign.", "type": "string", - "readOnly": true, + "enum": [ + "draft", + "awaiting_approval", + "timed", + "starting", + "active", + "stopping", + "stopped", + "deleted", + "archived" + ], "api_fieldname": "phase", + "readOnly": true, "required": false, + "enum_reference": "update_campaign_phase_enum", "_key": "phase" }, { + "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, "_key": "root_manifest_id" }, { + "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, "_key": "root_manifest_url" }, { + "description": "The time the campaign was started.", "type": "string", "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", @@ -67367,10 +96803,40 @@ "_key": "started_at" }, { - "description": "The time the object was updated", + "description": "The time the campaign will be started.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "starting_at", + "readOnly": true, + "required": false, + "_key": "starting_at" + }, + { + "description": "The time the campaign was stopped.", + "type": "string", + "format": "date-time", + "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopped_at", + "readOnly": true, + "required": false, + "_key": "stopped_at" + }, + { + "description": "The time the campaign will be stopped.", + "type": "string", "format": "date-time", "example": "2017-05-22T12:37:55.576563Z", + "api_fieldname": "stopping_at", + "readOnly": true, + "required": false, + "_key": "stopping_at" + }, + { "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, @@ -67389,12 +96855,15 @@ } ], "field_renames": [], - "tags": [], + "tags": [ + "Device update - campaigns" + ], "group_id": "Device_Update", "_key": "update_campaign" }, { "swagger_models": [ + "GroupSummaryList", "UserInfoReq", "UserInfoResp", "UserInfoRespList", @@ -67403,7 +96872,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": [ { @@ -67456,6 +96925,19 @@ "required": false, "_key": "full_name" }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, { "type": "boolean", "example": true, @@ -67490,6 +96972,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, @@ -67499,6 +96991,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -67509,6 +97002,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -67517,7 +97011,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -67621,6 +97115,15 @@ "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", @@ -67869,6 +97372,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, @@ -67878,6 +97391,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -67888,6 +97402,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -67896,7 +97411,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -68003,7 +97518,364 @@ "_key": "201" }, { - "description": "Error in input data, for example, an invalid email address.", + "description": "Error in input data, for example, an invalid email address.", + "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": "A user with the given username or email 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": [ + "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/users", + "summary": "Create a new user.", + "return_type": "user", + "return_info": { + "self": true, + "custom": false, + "type": "user" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter", + "id", + "created_at", + "updated_at", + "status", + "email_verified", + "creation_time", + "last_login_time", + "password_changed_time", + "account_id", + "login_history", + "is_totp_enabled", + "totp_scratch_codes", + "custom_fields", + "active_sessions" + ], + "group_id": "Accounts", + "parameter_map": { + "user_id": "id" + }, + "operation_id": "createUser", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "create" + }, + { + "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": [ + { + "name": "user_id", + "in": "path", + "description": "The ID of the user to delete.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "user_id", + "external_param": false, + "parameter_fieldname": "user_id", + "_key": "id" + } + ], + "method": "delete", + "mode": "delete", + "responses": [ + { + "description": "Deleted successfully.", + "_key": "204" + }, + { + "description": "Bad request, for example, trying to delete active user.", "schema": { "type": "object", "required": [ @@ -68222,7 +98094,7 @@ "_key": "403" }, { - "description": "A user with the given username or email already exists.", + "description": "A user with the specified ID does not exist.", "schema": { "type": "object", "required": [ @@ -68252,262 +98124,619 @@ "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/users/{user_id}", + "summary": "Delete a user.", + "return_type": "user", + "return_info": { + "self": true, + "custom": false, + "type": "user" + }, + "x_filter": {}, + "x_deprecation": null, + "drop_fields": [ + "object", + "etag", + "type", + "filter" + ], + "group_id": "Accounts", + "parameter_map": { + "user_id": "id" + }, + "operation_id": "deleteUser", + "pagination": false, + "request_content_type": "application/json", + "request_body": "json", + "_key": "delete" + }, + { + "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 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": "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": "user_order_enum", + "_key": "order" + } + ], + "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 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", + "email", + "etag", + "id", + "object", + "status" + ], + "properties": [ + { + "type": "string", + "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", + "example": "110 Fulbourn Rd, Cambridge, United Kingdom", + "description": "Address.", + "x-nullable": true, + "_key": "address" + }, + { + "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": "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", + "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": "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/users", - "summary": "Create a new user.", - "return_type": "user", - "return_info": { - "self": true, - "custom": false, - "type": "user" - }, - "x_filter": {}, - "x_deprecation": null, - "drop_fields": [ - "object", - "etag", - "type", - "groups", - "filter", - "id", - "created_at", - "updated_at", - "status", - "email_verified", - "creation_time", - "last_login_time", - "password_changed_time", - "account_id", - "login_history", - "is_totp_enabled", - "totp_scratch_codes", - "custom_fields", - "active_sessions" - ], - "group_id": "Accounts", - "parameter_map": { - "user_id": "id" - }, - "operation_id": "createUser", - "pagination": false, - "request_content_type": "application/json", - "request_body": "json", - "_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```", - "field_renames": [], - "fields": [ - { - "name": "user_id", - "in": "path", - "description": "The ID of the user to delete.", - "required": true, - "type": "string", - "entity_fieldname": "id", - "api_fieldname": "user_id", - "external_param": false, - "parameter_fieldname": "user_id", - "_key": "id" - } - ], - "method": "delete", - "mode": "delete", - "responses": [ - { - "description": "Deleted successfully.", - "_key": "204" - }, - { - "description": "Bad request, for example, trying to delete active user.", - "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": "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", - "description": "Message describing the error condition.", - "_key": "message" + "format": "date-time", + "example": "2018-02-14T15:24:14Z", + "description": "Last update UTC time RFC3339.", + "_key": "updated_at" }, { + "pattern": "[\\w\\-,._@+=]{4,30}", "type": "string", - "description": "Name of the field which caused the error.", - "_key": "name" + "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" - }, - { - "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": "data", + "entity_fieldname": "data", + "_key": "data" }, { - "type": "string", - "description": "ID of the request.", - "example": "0161991d63150242ac12000600000000", - "_key": "request_id" + "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", - "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" + "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": "Accounts", + "entity": "user" + } }, - "_key": "401" + "_key": "200" }, { - "description": "Forbidden.", + "description": "Authentication failure.", "schema": { "type": "object", "required": [ @@ -68577,10 +98806,10 @@ } ] }, - "_key": "403" + "_key": "401" }, { - "description": "A user with the specified ID does not exist.", + "description": "Forbidden.", "schema": { "type": "object", "required": [ @@ -68650,44 +98879,68 @@ } ] }, - "_key": "404" + "_key": "403" } ], - "path": "/v3/users/{user_id}", - "summary": "Delete a user.", - "return_type": "user", + "path": "/v3/users", + "summary": "Get users.", + "return_type": "paginated_response(user)", "return_info": { "self": true, "custom": false, "type": "user" }, - "x_filter": {}, + "x_filter": { + "email": [ + "eq" + ], + "status": [ + "eq", + "in", + "nin" + ], + "login_profiles": [ + "eq" + ] + }, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", - "filter" + "filter", + "total_count", + "has_more", + "data", + "email__eq", + "status__eq", + "status__in", + "status__nin", + "login_profiles__eq" ], + "foreign_key_priority": "self", "group_id": "Accounts", "parameter_map": { "user_id": "id" }, - "operation_id": "deleteUser", - "pagination": false, + "operation_id": "getAllUsers", + "pagination": true, + "foreign_key": { + "group": "Accounts", + "entity": "user" + }, "request_content_type": "application/json", "request_body": "json", - "_key": "delete" + "_key": "list" }, { - "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 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", @@ -68698,6 +98951,18 @@ "parameter_fieldname": "after", "_key": "after" }, + { + "name": "user_id", + "in": "path", + "description": "The ID of the user.", + "required": true, + "type": "string", + "entity_fieldname": "id", + "api_fieldname": "user_id", + "external_param": false, + "parameter_fieldname": "user_id", + "_key": "id" + }, { "name": "include", "in": "query", @@ -68719,193 +98984,103 @@ "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": "user_order_enum", - "_key": "order" - } - ], - "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": [ - "account_id", - "email", - "etag", - "id", - "object", - "status" - ], - "properties": [ - { - "type": "string", - "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", - "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", - "example": "110 Fulbourn Rd, Cambridge, United Kingdom", - "description": "Address.", - "x-nullable": true, - "_key": "address" - }, + "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": "user_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 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", + "apikey_count", + "etag", + "id", + "name", + "object", + "user_count" + ], + "properties": [ { "type": "string", - "format": "date-time", - "example": "2018-02-13T09:35:20Z", - "description": "Creation UTC time RFC3339.", - "_key": "created_at" + "example": "01619571e2e90242ac12000600000000", + "description": "The ID of the account this group belongs to.", + "pattern": "[a-f0-9]{32}", + "_key": "account_id" }, { "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" + "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": "custom_fields" + "_key": "apikey_count" }, { - "pattern": "^(?=.{3,254}$).+\\@.+", - "type": "string", - "example": "user@arm.com", - "description": "The email address.", - "_key": "email" + "type": "integer", + "format": "int32", + "example": 0, + "description": "The number of applications in this group.", + "_key": "application_count" }, { - "type": "boolean", - "example": true, - "description": "A flag indicating whether the user's email address has been verified or not.", - "_key": "email_verified" + "type": "string", + "format": "date-time", + "example": "2018-02-13T09:35:20Z", + "description": "Creation UTC time RFC3339.", + "_key": "created_at" }, { "type": "string", @@ -68915,209 +99090,25 @@ }, { "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.", + "example": "01619571dec00242ac12000600000000", + "description": "The ID of the group.", "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", - "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": "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" + "example": "Administrators", + "description": "The name of the group.", + "_key": "name" }, { "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": "Entity name: always `group`.", "enum": [ - "ENROLLING", - "INVITED", - "ACTIVE", - "RESET", - "INACTIVE" + "group" ], - "_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" + "_key": "object" }, { "type": "string", @@ -69127,18 +99118,17 @@ "_key": "updated_at" }, { - "pattern": "[\\w\\-,._@+=]{4,30}", - "type": "string", - "example": "admin", - "description": "A username.", - "x-nullable": true, - "_key": "username" + "type": "integer", + "format": "int32", + "example": 1, + "description": "The number of users in this group.", + "_key": "user_count" } ], - "description": "Represents a user in Device Management.", + "description": "This object contains basic information about groups.", "foreign_key": { "group": "Accounts", - "entity": "user" + "entity": "subtenant_policy_group" } }, "api_fieldname": "data", @@ -69196,7 +99186,7 @@ "pagination": true, "foreign_key": { "group": "Accounts", - "entity": "user" + "entity": "subtenant_policy_group" } }, "_key": "200" @@ -69346,62 +99336,115 @@ ] }, "_key": "403" + }, + { + "description": "A user 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" } ], - "path": "/v3/users", - "summary": "Get the details of all users.", - "return_type": "paginated_response(user)", + "path": "/v3/users/{user_id}/groups", + "summary": "Get policy groups for a user.", + "return_type": "paginated_response(policy_group)", "return_info": { - "self": true, + "self": false, "custom": false, - "type": "user" - }, - "x_filter": { - "email": [ - "eq" - ], - "status": [ - "eq", - "in", - "nin" - ], - "login_profiles": [ - "eq" - ] + "type": "policy_group" }, + "x_filter": {}, "x_deprecation": null, "drop_fields": [ "object", "etag", "type", - "groups", "filter", "total_count", "has_more", - "data", - "email__eq", - "status__eq", - "status__in", - "status__nin", - "login_profiles__eq" + "data" ], - "foreign_key_priority": "self", "group_id": "Accounts", "parameter_map": { "user_id": "id" }, - "operation_id": "getAllUsers", - "pagination": true, + "operation_id": "getGroupsOfUser", "foreign_key": { - "group": "Accounts", - "entity": "user" + "entity": "policy_group" }, + "pagination": true, "request_content_type": "application/json", "request_body": "json", - "_key": "list" + "_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": [ { @@ -69465,6 +99508,15 @@ "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", @@ -69713,6 +99765,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, @@ -69722,6 +99784,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -69732,6 +99795,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -69740,7 +99804,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -70080,7 +100144,6 @@ "object", "etag", "type", - "groups", "filter", "created_at", "updated_at", @@ -70091,6 +100154,7 @@ "email", "address", "phone_number", + "groups", "is_gtc_accepted", "is_marketing_accepted", "email_verified", @@ -70116,7 +100180,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": [ { @@ -70144,6 +100208,19 @@ "required": false, "_key": "full_name" }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, { "type": "string", "example": "01619571e2e89242ac12000600000000", @@ -70201,6 +100278,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, @@ -70210,6 +100297,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -70220,6 +100308,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -70228,7 +100317,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -70320,6 +100409,15 @@ "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", @@ -70568,6 +100666,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, @@ -70577,6 +100685,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -70587,6 +100696,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -70595,7 +100705,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -71081,7 +101191,6 @@ "object", "etag", "type", - "groups", "filter", "email", "two_factor_auth_enabled", @@ -71144,6 +101253,15 @@ "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", @@ -71271,6 +101389,17 @@ "required": false, "_key": "full_name" }, + { + "type": "array", + "description": "A list of IDs of the groups this user belongs to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "readOnly": false, + "required": false, + "_key": "groups" + }, { "type": "string", "example": "01619571e2e89242ac12000600000000", @@ -71388,6 +101517,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, @@ -71397,6 +101536,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -71407,6 +101547,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -71415,7 +101556,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -71528,7 +101669,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": [ { @@ -71543,6 +101684,19 @@ "required": true, "_key": "email" }, + { + "type": "array", + "description": "A list of IDs of the groups the user is invited to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "entity_fieldname": "groups", + "parameter_fieldname": "groups", + "in": "body", + "required": false, + "_key": "groups" + }, { "type": "array", "description": "A list of login profiles for the user. Specified as the identity providers the user is associated with.", @@ -71555,6 +101709,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, @@ -71564,6 +101728,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -71574,6 +101739,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -71582,7 +101748,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -71708,6 +101874,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, @@ -71717,6 +101893,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -71727,6 +101904,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -71735,7 +101913,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -72020,7 +102198,6 @@ "object", "etag", "type", - "groups", "filter", "id", "created_at", @@ -72040,7 +102217,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": [ { @@ -72297,7 +102474,6 @@ "object", "etag", "type", - "groups", "filter" ], "group_id": "Accounts", @@ -72311,13 +102487,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", @@ -72345,7 +102521,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" @@ -72380,7 +102556,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", @@ -72461,6 +102637,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, @@ -72470,6 +102656,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -72480,6 +102667,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -72488,7 +102676,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -72737,7 +102925,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, @@ -72754,7 +102942,6 @@ "object", "etag", "type", - "groups", "filter", "total_count", "has_more", @@ -72777,7 +102964,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": [ { @@ -72884,6 +103071,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, @@ -72893,6 +103090,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -72903,6 +103101,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -72911,7 +103110,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -73196,13 +103395,13 @@ "object", "etag", "type", - "groups", "filter", "created_at", "updated_at", "email", "user_id", "account_id", + "groups", "expiration", "login_profiles" ], @@ -73258,6 +103457,17 @@ "required": false, "_key": "expiration" }, + { + "type": "array", + "description": "A list of IDs of the groups the user is invited to.", + "items": { + "type": "string" + }, + "api_fieldname": "groups", + "readOnly": false, + "required": false, + "_key": "groups" + }, { "type": "string", "example": "01619571e2e89242ac12000600000000", @@ -73280,6 +103490,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, @@ -73289,6 +103509,7 @@ }, { "type": "string", + "example": "Pelion", "readOnly": false, "description": "Name of the identity provider.", "_override": true, @@ -73299,6 +103520,7 @@ { "type": "string", "description": "Identity provider type.", + "example": "NATIVE", "readOnly": true, "enum": [ "NATIVE", @@ -73307,7 +103529,7 @@ "OIDC" ], "api_fieldname": "type", - "entity_fieldname": "type", + "entity_fieldname": "login_profile_type", "_key": "type" } ], @@ -73359,8 +103581,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, @@ -73368,7 +103590,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/api_specifications/public/sdk_foundation_definition.yaml b/api_specifications/public/sdk_foundation_definition.yaml index f5bd0d81..5cd6e776 100644 --- a/api_specifications/public/sdk_foundation_definition.yaml +++ b/api_specifications/public/sdk_foundation_definition.yaml @@ -42,7 +42,8 @@ entities: x-nullable: true - _key: admin_id api_fieldname: admin_id - description: The ID of the admin user created for this account. + 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}' readOnly: true @@ -57,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 @@ -79,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 @@ -87,6 +94,41 @@ entities: readOnly: false required: false type: array + - _key: business_model + api_fieldname: 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 + enum_reference: account_business_model_enum + example: api_calls_1_business_model + readOnly: false + required: false + type: string + - _key: business_model_history + api_fieldname: business_model_history + description: Business model history for this account. + items: + properties: + - _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: updated_at + 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: city api_fieldname: city description: The city part of the postal address. @@ -98,7 +140,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 @@ -158,7 +200,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 @@ -218,14 +260,100 @@ entities: required: false type: integer x-nullable: true + - _key: limitations + api_fieldname: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _key: updated_at + 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: limits additionalProperties: type: string api_fieldname: limits - 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: 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 api_fieldname: mfa_status @@ -364,7 +492,27 @@ entities: 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. @@ -449,6 +597,25 @@ entities: readOnly: true required: false type: string + - _key: tier_history + api_fieldname: 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 + readOnly: true + required: false + type: array - _key: updated_at api_fieldname: updated_at description: Last update UTC time RFC3339. @@ -468,7 +635,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:** @@ -478,14 +647,13 @@ 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: - object - etag - type - - groups - filter - sub_accounts - total_count @@ -497,7 +665,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 @@ -544,7 +712,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: @@ -581,7 +749,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 @@ -704,8 +872,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 @@ -881,7 +1049,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 @@ -890,6 +1062,8 @@ entities: - _key: create description: 'Create a new account. + Note: This endpoint is restricted to administrators. + **Example:** @@ -897,21 +1071,20 @@ 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: - object - etag - type - - groups - filter - sub_accounts - id @@ -937,7 +1110,10 @@ entities: - expiration - admin_id - admin_key + - limitations - password_recovery_expiration + - business_model_history + - tier_history field_renames: [] fields: - _key: action @@ -1033,7 +1209,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: @@ -1043,6 +1220,20 @@ entities: parameter_fieldname: aliases required: false type: array + - _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 + enum_reference: account_business_model_enum + example: api_calls_1_business_model + in: body + parameter_fieldname: business_model + required: false + type: string - _key: city api_fieldname: city description: The city part of the postal address. @@ -1056,7 +1247,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 @@ -1109,7 +1300,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 @@ -1136,7 +1327,7 @@ entities: example: IT in: body parameter_fieldname: end_market - required: false + required: true type: string - _key: phone_number api_fieldname: phone_number @@ -1186,6 +1377,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 @@ -1223,7 +1417,8 @@ entities: x-nullable: true - _key: admin_id api_fieldname: admin_id - description: The ID of the admin user created for this account. + 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}' @@ -1237,6 +1432,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 @@ -1257,13 +1457,47 @@ 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}' type: string maxItems: 10 type: array + - _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: business_model_history + api_fieldname: business_model_history + description: Business model history for this account. + entity_fieldname: business_model_history + items: + properties: + - _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: 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 api_fieldname: city description: The city part of the postal address. @@ -1274,7 +1508,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 @@ -1327,7 +1561,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 @@ -1386,13 +1620,98 @@ entities: minimum: 1 type: integer x-nullable: true + - _key: limitations + api_fieldname: limitations + description: List of account limitation objects. + entity_fieldname: limitations + items: + description: This object represents an account limitation. + properties: + - _key: billing_period + description: Billing period of the account limitation. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string api_fieldname: limits - 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: 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 api_fieldname: mfa_status @@ -1535,7 +1854,27 @@ entities: 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. @@ -1613,53 +1952,43 @@ 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. - 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 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 + 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: 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 @@ -1667,7 +1996,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 @@ -1706,7 +2035,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 @@ -1751,11 +2080,94 @@ entities: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string - description: List of limits as key-value pairs if requested. + 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, @@ -1880,7 +2292,28 @@ entities: 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. @@ -1929,390 +2362,629 @@ 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 - - groups - - filter - - sub_accounts - - limit - - after - - order - - total_count - - has_more - - data - field_renames: [] - fields: - - _key: id - api_fieldname: account_id - description: Account ID. - 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 + 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 + 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: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: 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 - - _key: data - api_fieldname: data - description: A list of entities. - entity_fieldname: data + 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: - 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 + - _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 time in UTC. + - _key: updatedAt + description: Last update UTC time RFC3339. 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 + - _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: object - api_fieldname: object - description: 'Entity name: always `list`.' - entity_fieldname: object - enum: - - list + - _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: 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 + - _key: object + description: Entity name, always `error`. enum: - - ASC - - DESC + - 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 - - _key: total_count - api_fieldname: total_count - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer required: - - data - - has_more - - limit + - code + - message - object - - total_count + - request_id + - type type: object - _key: '401' description: Authentication failure. @@ -2410,8 +3082,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Account not found. + - _key: '409' + description: Account with the specified alias exists already. schema: properties: - _key: code @@ -2460,31 +3132,32 @@ entities: type: object return_info: custom: false - self: false - type: subtenant_dark_theme_color - return_type: paginated_response(subtenant_dark_theme_color) - summary: Get dark theme branding colors. + self: true + type: account + return_type: account + summary: Create a new account. x_deprecation: null x_filter: {} - - _key: dark_theme_branding_images - description: 'Retrieve the metadata of all dark theme branding images. + - _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-images/dark + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - sub_accounts - limit @@ -2497,7 +3170,7 @@ entities: fields: - _key: id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: id external_param: false in: path @@ -2506,16 +3179,16 @@ entities: required: true type: string foreign_key: - entity: subtenant_dark_theme_image + entity: subtenant_dark_theme_color group_id: Accounts method: get - mode: dark_theme_branding_images - notes: This lists the dark theme banding images of the subtenant account. - operation_id: getAllAccountDarkImageData + 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-images/dark + path: /v3/accounts/{account_id}/branding-colors/dark request_body: json request_content_type: application/json responses: @@ -2523,13 +3196,13 @@ entities: description: Successful operation. schema: foreign_key: - entity: dark_theme_image + entity: dark_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}' @@ -2540,64 +3213,42 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_image + 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_image''' + description: 'Entity name: always ''branding_color''' enum: - - branding_image + - branding_color readOnly: true type: string - _key: reference _override: true - description: Name of the image. + description: Color name. 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 is_primary_key: true type: string - - _key: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - _key: updated_at description: Last update time in UTC. example: '2018-02-14T15:24:14Z' @@ -2796,30 +3447,31 @@ entities: return_info: custom: false self: false - type: subtenant_dark_theme_image - return_type: paginated_response(subtenant_dark_theme_image) - summary: Get metadata of all dark theme images. + type: subtenant_dark_theme_color + return_type: paginated_response(subtenant_dark_theme_color) + summary: Get dark theme branding colors. x_deprecation: null x_filter: {} - - _key: light_theme_branding_colors - description: 'Retrieve light theme branding colors for an account. + - _key: dark_theme_branding_images + description: 'Retrieve the metadata of all dark 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/light + 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: - object - etag - type - - groups - filter - sub_accounts - limit @@ -2832,7 +3484,7 @@ entities: fields: - _key: id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: id external_param: false in: path @@ -2841,16 +3493,16 @@ entities: required: true type: string foreign_key: - entity: subtenant_light_theme_color + entity: subtenant_dark_theme_image group_id: Accounts method: get - mode: light_theme_branding_colors - notes: This lists the light theme banding colors of the subtenant account. - operation_id: getAccountLightColors + mode: dark_theme_branding_images + notes: This lists the dark theme banding images of the subtenant account. + operation_id: getAllAccountDarkImageData pagination: true parameter_map: account_id: id - path: /v3/accounts/{account_id}/branding-colors/light + path: /v3/accounts/{account_id}/branding-images/dark request_body: json request_content_type: application/json responses: @@ -2858,13 +3510,13 @@ entities: description: Successful operation. schema: foreign_key: - entity: dark_theme_color + entity: dark_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}' @@ -2875,40 +3527,376 @@ entities: entity_fieldname: data items: foreign_key: - entity: dark_theme_color + entity: dark_theme_image 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''' + description: 'Entity name: always ''branding_image''' enum: - - branding_color + - branding_image readOnly: true type: string - _key: reference _override: true - description: Color name. + description: Name of the image. 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 + - 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 + is_primary_key: true + type: string + - _key: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: 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 + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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: '404' + description: Account 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: false + type: subtenant_dark_theme_image + return_type: paginated_response(subtenant_dark_theme_image) + summary: Get metadata of all dark theme images. + x_deprecation: null + x_filter: {} + - _key: light_theme_branding_colors + 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 '' + + ```' + 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_light_theme_color + group_id: Accounts + method: get + mode: light_theme_branding_colors + notes: This lists the light theme banding colors of the subtenant account. + operation_id: getAccountLightColors + pagination: true + parameter_map: + account_id: id + path: /v3/accounts/{account_id}/branding-colors/light + 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 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: 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 @@ -3117,6 +4105,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:** @@ -3125,14 +4115,13 @@ 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: - object - etag - type - - groups - filter - sub_accounts - limit @@ -3145,7 +4134,7 @@ entities: fields: - _key: id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: id external_param: false in: path @@ -3177,7 +4166,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}' @@ -3450,9 +4439,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:** @@ -3460,14 +4451,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - sub_accounts - total_count @@ -3484,7 +4474,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 @@ -3507,7 +4497,7 @@ entities: - _key: include api_fieldname: include description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts.' + limits, policies, sub_accounts, history.' entity_fieldname: include external_param: true in: query @@ -3578,7 +4568,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}' @@ -3602,53 +4592,43 @@ 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. - 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 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 + 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: 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 @@ -3656,7 +4636,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 @@ -3695,7 +4675,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 @@ -3740,11 +4720,94 @@ entities: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string - description: List of limits as key-value pairs if requested. + 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, @@ -3869,7 +4932,28 @@ entities: 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. @@ -3933,53 +5017,43 @@ 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. - 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 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 + 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: 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 @@ -3987,7 +5061,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 @@ -4026,7 +5100,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 @@ -4071,11 +5145,94 @@ entities: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string - description: List of limits as key-value pairs if requested. + 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, @@ -4200,7 +5357,29 @@ entities: 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. @@ -4264,6 +5443,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' @@ -4296,6 +5492,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' @@ -4476,7 +5689,7 @@ entities: tier: - eq - _key: me - description: 'Retrieve detailed information about the account. + description: 'Retrieve information about the account. **Example:** @@ -4486,14 +5699,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/me?include=policies \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - sub_accounts - id @@ -4532,13 +5744,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 @@ -4596,67 +5806,49 @@ 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. - 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}' type: string maxItems: 10 type: array + - _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: business_model_history + api_fieldname: business_model_history + description: Business model history for this account. + entity_fieldname: business_model_history + items: + properties: + - _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: 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 api_fieldname: city description: The city part of the postal address. @@ -4667,7 +5859,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 @@ -4720,7 +5912,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 @@ -4779,13 +5971,98 @@ entities: minimum: 1 type: integer x-nullable: true + - _key: limitations + api_fieldname: limitations + description: List of account limitation objects. + entity_fieldname: limitations + items: + description: This object represents an account limitation. + properties: + - _key: billing_period + description: Billing period of the account limitation. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string api_fieldname: limits - 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: 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 api_fieldname: mfa_status @@ -4928,7 +6205,27 @@ entities: 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. @@ -5006,53 +6303,43 @@ 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. - 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 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 + 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: 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 @@ -5060,7 +6347,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 @@ -5099,7 +6386,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 @@ -5144,11 +6431,94 @@ entities: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string - description: List of limits as key-value pairs if requested. + 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, @@ -5273,7 +6643,28 @@ entities: 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. @@ -5336,6 +6727,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' @@ -5372,6 +6780,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. @@ -5495,12 +6921,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:** @@ -5509,14 +6937,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - sub_accounts - created_at @@ -5554,13 +6981,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 @@ -5576,7 +7001,7 @@ entities: - _key: include api_fieldname: include description: 'Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts.' + limits, policies, sub_accounts, history.' entity_fieldname: include external_param: true in: query @@ -5626,67 +7051,49 @@ 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. - 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}' type: string maxItems: 10 type: array + - _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: business_model_history + api_fieldname: business_model_history + description: Business model history for this account. + entity_fieldname: business_model_history + items: + properties: + - _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: 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 api_fieldname: city description: The city part of the postal address. @@ -5697,7 +7104,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 @@ -5750,7 +7157,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 @@ -5809,13 +7216,98 @@ entities: minimum: 1 type: integer x-nullable: true + - _key: limitations + api_fieldname: limitations + description: List of account limitation objects. + entity_fieldname: limitations + items: + description: This object represents an account limitation. + properties: + - _key: billing_period + description: Billing period of the account limitation. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string api_fieldname: limits - 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: 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 api_fieldname: mfa_status @@ -5958,7 +7450,27 @@ entities: 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. @@ -6036,53 +7548,43 @@ 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. - 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 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 + 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: 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 @@ -6090,7 +7592,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 @@ -6129,7 +7631,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 @@ -6174,11 +7676,94 @@ entities: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string - description: List of limits as key-value pairs if requested. + 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, @@ -6303,7 +7888,28 @@ entities: 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. @@ -6366,6 +7972,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' @@ -6402,6 +8025,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. @@ -6573,11 +8214,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:** @@ -6587,14 +8230,13 @@ 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: - object - etag - type - - groups - filter - sub_accounts - total_count @@ -6610,12 +8252,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 @@ -6662,7 +8305,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: @@ -6699,7 +8342,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 @@ -6749,9 +8392,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' @@ -6857,8 +8506,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 @@ -6933,7 +8582,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 @@ -7033,9 +8682,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 @@ -7064,6 +8715,8 @@ entities: operation_id: updateMyAccount description: 'Update an account. + Note: This endpoint is restricted to administrators. + **Example:** @@ -7072,7 +8725,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'' \ @@ -7083,7 +8736,6 @@ entities: - object - etag - type - - groups - filter - sub_accounts - created_at @@ -7099,12 +8751,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 @@ -7131,7 +8780,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: @@ -7141,6 +8791,20 @@ entities: parameter_fieldname: aliases required: false type: array + - _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 + enum_reference: account_business_model_enum + example: api_calls_1_business_model + in: body + parameter_fieldname: business_model + required: false + type: string - _key: city api_fieldname: city description: The city part of the postal address. @@ -7154,7 +8818,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 @@ -7218,7 +8882,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 @@ -7416,67 +9080,49 @@ 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. - 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}' type: string maxItems: 10 type: array + - _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: business_model_history + api_fieldname: business_model_history + description: Business model history for this account. + entity_fieldname: business_model_history + items: + properties: + - _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: 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 api_fieldname: city description: The city part of the postal address. @@ -7487,7 +9133,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 @@ -7540,7 +9186,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 @@ -7599,13 +9245,98 @@ entities: minimum: 1 type: integer x-nullable: true + - _key: limitations + api_fieldname: limitations + description: List of account limitation objects. + entity_fieldname: limitations + items: + description: This object represents an account limitation. + properties: + - _key: billing_period + description: Billing period of the account limitation. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string api_fieldname: limits - 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: 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 api_fieldname: mfa_status @@ -7748,7 +9479,27 @@ entities: 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. @@ -7826,53 +9577,43 @@ 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. - 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 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 + 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: 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 @@ -7880,7 +9621,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 @@ -7919,7 +9660,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 @@ -7964,11 +9705,94 @@ entities: 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. + format: int32 + type: integer + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description of the account limitation. + readOnly: true + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + 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. + readOnly: true + type: string + - _key: limit + description: The value of the limit. + format: int32 + type: integer + - _key: name + description: Name of the account limitation. + 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 + type: string + - _key: quota + description: Quota of the account limitation. + format: int32 + type: integer + - _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: limits additionalProperties: type: string - description: List of limits as key-value pairs if requested. + 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, @@ -8093,7 +9917,28 @@ entities: 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. @@ -8156,66 +10001,10918 @@ 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' 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 + - _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 + required: + - end_market + - etag + - id + - object + - status + - tier + type: object + - _key: '400' + description: Error in input data format. + 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: '404' + description: Account with the given ID 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 + - _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 + type: account + return_type: account + summary: Update attributes of an existing account. + x_deprecation: null + x_filter: {} + - _key: user_invitations + description: 'Retrieve an array of active user invitations. + + Note: 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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - sub_accounts + - total_count + - has_more + - data + - login_profiles__eq + field_renames: [] + fields: + - _key: after + api_fieldname: after + 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: id + api_fieldname: account_id + description: Account ID. + entity_fieldname: id + external_param: false + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + - _key: limit + api_fieldname: limit + 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: order + api_fieldname: order + 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 + foreign_key: + entity: subtenant_user_invitation + group_id: Accounts + method: get + mode: user_invitations + notes: This lists the user invitations of the subtenant account. + operation_id: getAllAccountInvitations + pagination: true + parameter_map: + account_id: id + path: /v3/accounts/{account_id}/user-invitations + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: user_invitation + group: Accounts + pagination: true + properties: + - _key: after + api_fieldname: after + 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 + description: A list of entities. + entity_fieldname: data + items: + description: Represents an user invitation in responses. + foreign_key: + entity: user_invitation + group: Accounts + properties: + - _key: account_id + description: The ID of the account the user is invited to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: email + description: Email address of the invited user. + example: friend@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: expiration + description: Invitation expiration as UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: groups + description: A list of IDs of the groups the user is invited to. + items: + type: string + type: array + - _key: id + description: The ID of the invitation. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: login_profiles + description: A list of login profiles for the user. Specified as the + identity providers the user is associated with. + items: + description: Represents a user login profile in Device Management. + foreign_key: + 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 + _override: true + 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: + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE + readOnly: true + type: string + required: + - id + type: object + type: array + x-nullable: true + - _key: object + description: 'Entity name: always ''user-invitation''' + enum: + - user-invitation + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: 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 + 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 + 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 + description: 'Entity name: always `list`.' + entity_fieldname: object + enum: + - list + type: string + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: user_invitation_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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: '404' + description: An account with the specified ID does not exist. + 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: false + type: subtenant_user_invitation + return_type: paginated_response(subtenant_user_invitation) + summary: Get user invitations. + x_deprecation: null + x_filter: + login_profiles: + - eq + - _key: users + 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}/users + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - sub_accounts + - total_count + - has_more + - data + - email__eq + - status__eq + - status__in + - status__nin + - login_profiles__eq + field_renames: [] + fields: + - _key: after + api_fieldname: after + 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: id + api_fieldname: account_id + description: Account ID. + entity_fieldname: id + external_param: false + in: path + name: account_id + parameter_fieldname: account_id + required: true + 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 + 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: order + api_fieldname: order + 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 + foreign_key: + entity: subtenant_user + group_id: Accounts + method: get + mode: users + notes: This lists the users of the subtenant account. + operation_id: getAllAccountUsers + pagination: true + parameter_map: + account_id: id + path: /v3/accounts/{account_id}/users + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: user + group: Accounts + pagination: true + properties: + - _key: after + api_fieldname: after + 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 + description: A list of entities. + entity_fieldname: data + items: + description: Represents a user in Device Management. + foreign_key: + entity: user + group: Accounts + properties: + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: active_sessions + description: List of active user sessions. + items: + description: Represents an active user session. + foreign_key: + entity: active_session + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The UUID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: login_time + api_fieldname: login_time + description: The login time of the user. + entity_fieldname: login_time + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''user-session''' + entity_fieldname: object + enum: + - user-session + type: string + - _key: reference_token + api_fieldname: reference_token + description: The reference token. + entity_fieldname: reference_token + example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk + type: string + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + type: array + - _key: address + description: Address. + example: 110 Fulbourn Rd, Cambridge, United Kingdom + 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: creation_time + description: A timestamp of the user creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: custom_fields + additionalProperties: + type: string + description: User's account-specific custom properties. The value is + a string. + type: object + x-nullable: true + - _key: email + description: The email address. + example: user@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + - _key: email_verified + description: A flag indicating whether the user's email address has + been verified or not. + example: true + type: boolean + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: full_name + description: The full name of the user. + example: User Doe + maxLength: 100 + type: string + x-nullable: true + - _key: groups + description: A list of IDs of the groups this user belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the user. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_gtc_accepted + description: A flag indicating that the user has accepted General Terms + and Conditions. + example: true + type: boolean + - _key: is_marketing_accepted + description: A flag indicating that the user has consented to receive + marketing information. + example: true + type: boolean + - _key: is_totp_enabled + description: A flag indicating whether two-factor authentication (TOTP) + has been enabled. + example: true + type: boolean + - _key: last_login_time + description: A timestamp of the latest login of the user, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: 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: + description: Represents an entry in login history. + foreign_key: + entity: login_history + group: Accounts + properties: + - _key: date + api_fieldname: date + description: UTC time RFC3339 for this login attempt. + entity_fieldname: date + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: success + api_fieldname: success + description: Flag indicating whether login attempt was successful + or not. + entity_fieldname: success + example: true + type: boolean + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + maxItems: 5 + type: array + - _key: login_profiles + description: A list of login profiles for the user. Specified as the + identity providers the user is associated with. + items: + description: Represents a user login profile in Device Management. + foreign_key: + 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 + _override: true + 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: + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE + readOnly: true + type: string + required: + - id + type: object + type: array + x-nullable: true + - _key: object + description: 'Entity name: always `user`.' + enum: + - user + type: string + - _key: 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 + - _key: password_changed_time + description: A timestamp of the latest change of the user password, + in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: phone_number + description: Phone number. + example: +44 (1223) 400 400 + maxLength: 100 + type: string + x-nullable: true + - _key: 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 + - _key: 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 + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: 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 + 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 + 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 + description: 'Entity name: always `list`.' + entity_fieldname: object + enum: + - list + type: string + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: user_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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: '404' + description: An account with the given ID does not exist. + 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: false + type: subtenant_user + return_type: paginated_response(subtenant_user) + summary: Get users. + x_deprecation: null + x_filter: + email: + - eq + login_profiles: + - eq + status: + - eq + - in + - nin + primary_key_field: id + swagger_models: + - AccountCreationReq + - AccountCreationResp + - AccountInfo + - AccountInfoList + - AccountUpdateRootReq + - ApiKeyInfoRespList + - BrandingColorList + - BrandingImageList + - TrustedCertificateRespList + - UserInfoRespList + - UserInvitationRespList + 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 +- _key: active_session + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The UUID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + required: false + type: string + - _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: ip_address + api_fieldname: ip_address + description: IP address of the client. + example: 127.0.0.1 + readOnly: true + required: false + type: string + - _key: login_time + api_fieldname: login_time + description: The login time of the user. + example: '2018-02-14T17:52:07Z' + format: date-time + readOnly: true + required: false + type: string + - _key: reference_token + api_fieldname: reference_token + description: The reference token. + example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk + readOnly: true + required: false + type: string + - _key: user_agent + api_fieldname: 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 + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - ActiveSession + tags: [] +- _key: api_key + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + required: false + type: string + - _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: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + readOnly: true + required: false + type: integer + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + items: + type: string + readOnly: false + required: false + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: key + api_fieldname: key + description: The API key. + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + readOnly: true + required: false + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + example: 1518630727688 + format: int64 + readOnly: true + required: false + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + example: API key gorgon + maxLength: 100 + readOnly: false + required: true + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: false + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + enum: + - ACTIVE + - INACTIVE + enum_reference: api_key_status_enum + example: ACTIVE + readOnly: false + 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: + - _key: create + description: '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 '' \ + + -H ''content-type: application/json'' + + ```' + drop_fields: + - object + - etag + - type + - filter + - id + - created_at + - updated_at + - key + - creation_time + - last_login_time + - account_id + field_renames: [] + fields: + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: &id001 + - ACTIVE + - INACTIVE + enum_reference: api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: post + mode: create + operation_id: createApiKey + pagination: false + parameter_map: + apikey_id: id + path: /v3/api-keys + request_body: json + request_content_type: application/json + responses: + - _key: '201' + description: New entity created. + schema: + description: Represents an API key in Device Management. + foreign_key: + entity: subtenant_api_key + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 + format: int64 + type: integer + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + items: + type: string + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''api-key''' + entity_fieldname: object + enum: + - api-key + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + 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 + required: + - etag + - id + - key + - name + - object + type: object + - _key: '400' + description: Error in input data, for example, missing API key name. + 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: api_key + return_type: api_key + summary: 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}/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. + + + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: id + api_fieldname: apikey_id + description: The ID of the API key to delete. + entity_fieldname: id + external_param: false + in: path + name: apikey_id + parameter_fieldname: apikey_id + required: true + type: string + group_id: Accounts + method: delete + mode: delete + operation_id: deleteApiKey + pagination: false + parameter_map: + apikey_id: id + path: /v3/api-keys/{apikey_id} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Deleted successfully. + - _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. Only the owner of the API key or an administrator can + delete an API key. + 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: An API key with the specified ID does not exist. + 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: api_key + return_type: api_key + summary: Delete API key. + 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 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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - total_count + - has_more + - data + - key__eq + - owner__eq + field_renames: [] + fields: + - _key: after + api_fieldname: after + 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: 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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: api_key_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: api_key + group: Accounts + foreign_key_priority: self + group_id: Accounts + method: get + mode: list + operation_id: getAllApiKeys + pagination: true + parameter_map: + apikey_id: id + path: /v3/api-keys + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: api_key + group: Accounts + 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: + description: Represents an API key in Device Management. + foreign_key: + entity: api_key + group: Accounts + properties: + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: creation_time + description: The timestamp of the API key creation in the storage, in + milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: groups + description: A list of group IDs this API key belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + description: The API key. + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: name + description: The display name for the API key. + example: API key gorgon + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always ''api-key''' + enum: + - api-key + type: string + - _key: owner + description: The owner of this API key, who is the creator by default. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + description: The status of the API key. + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + type: string + - _key: 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 + 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 + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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: api_key + return_type: paginated_response(api_key) + summary: Get all 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: + key: + - eq + owner: + - eq + - _key: me + description: 'Retrieve details of current API key. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - id + - created_at + - updated_at + - key + - name + - groups + - owner + - status + - creation_time + - last_login_time + - account_id + field_renames: [] + fields: [] + group_id: Accounts + method: get + mode: me + notes: This is provided by the SDK to avoid listing to retrieve the user's own + API Key. + operation_id: getMyApiKey + pagination: false + parameter_map: + apikey_id: id + path: /v3/api-keys/me + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + description: Represents an API key in Device Management. + foreign_key: + entity: subtenant_api_key + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 + format: int64 + type: integer + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + items: + type: string + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''api-key''' + entity_fieldname: object + enum: + - api-key + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + 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 + required: + - etag + - id + - key + - name + - object + 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: api_key + return_type: api_key + 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 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/{apikey_id}/groups + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - total_count + - has_more + - data + field_renames: [] + fields: + - _key: after + api_fieldname: after + 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: id + api_fieldname: apikey_id + description: The ID of the API key. + entity_fieldname: id + external_param: false + in: path + name: apikey_id + parameter_fieldname: apikey_id + required: true + 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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: api_key_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: policy_group + group_id: Accounts + method: get + mode: policy_groups + operation_id: getGroupsOfApikey + pagination: true + parameter_map: + apikey_id: id + path: /v3/api-keys/{apikey_id}/groups + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: subtenant_policy_group + group: Accounts + pagination: true + properties: + - _key: after + api_fieldname: after + 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 + description: A list of entities. + entity_fieldname: data + items: + description: This object contains basic information about groups. + foreign_key: + entity: subtenant_policy_group + group: Accounts + properties: + - _key: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: 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: [] + - _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' + format: date-time + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: name + description: The name of the group. + example: Administrators + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always `group`.' + enum: + - group + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: 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 + 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 + 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 + description: 'Entity name: always `list`.' + entity_fieldname: object + enum: + - list + type: string + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: subtenant_user_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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: '404' + description: An API key with the given ID does not exist. + 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: false + type: policy_group + return_type: paginated_response(policy_group) + 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 details of an API key. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - created_at + - updated_at + - key + - name + - groups + - owner + - status + - creation_time + - last_login_time + - account_id + field_renames: [] + fields: + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + required: true + type: string + group_id: Accounts + method: get + mode: read + operation_id: getApiKey + pagination: false + parameter_map: + apikey_id: id + path: /v3/api-keys/{apikey_id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + description: Represents an API key in Device Management. + foreign_key: + entity: subtenant_api_key + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 + format: int64 + type: integer + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + items: + type: string + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''api-key''' + entity_fieldname: object + enum: + - api-key + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + 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 + required: + - etag + - id + - key + - name + - object + 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: '404' + description: An API key with the specified ID does not exist. + 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: api_key + return_type: api_key + 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: + - notes: After retrieving the resource using the `me` method, it can modified + using using this SDK method. + operation_id: updateMyApiKey + description: 'Update API key details. + + + **Example:** + + `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestApiKey25"}'' + + ```' + drop_fields: + - object + - etag + - type + - filter + - created_at + - updated_at + - key + - creation_time + - last_login_time + - account_id + field_renames: [] + fields: + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: *id001 + enum_reference: api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: put + mode: update + operation_id: updateApiKey + pagination: false + parameter_map: + apikey_id: id + path: /v3/api-keys/{apikey_id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + description: Represents an API key in Device Management. + foreign_key: + entity: subtenant_api_key + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 + format: int64 + type: integer + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + items: + type: string + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''api-key''' + entity_fieldname: object + enum: + - api-key + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + 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 + required: + - etag + - id + - key + - name + - object + type: object + - _key: '400' + description: Error in input data, for example, invalid API key name. + 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. Only the owner of the API key or an administrator can + update an API key. + 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: An API key with the specified ID does not exist. + 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: api_key + return_type: api_key + summary: Update API key details. + 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: + - ApiKeyInfoReq + - ApiKeyInfoResp + - ApiKeyInfoRespList + - ApiKeyUpdateReq + - GroupSummaryList + tags: + - Account - API keys +- _key: campaign_device_metadata + field_renames: + - _key: campaign_id + api_fieldname: campaign + fields: + - _key: campaign_id + api_fieldname: campaign + description: The device's campaign ID. + example: 015bf72fccda00000000000100100280 + readOnly: false + required: true + type: string + - _key: created_at + api_fieldname: created_at + description: The time the entity was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: deployment_state + api_fieldname: deployment_state + description: The state of the update campaign on the device. + enum: + - pending + - updated_connector_channel + - failed_connector_channel_update + - deployed + - manifestremoved + - deregistered + enum_reference: campaign_device_metadata_deployment_state_enum + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + description: Description. + example: a description + maxLength: 2000 + readOnly: true + required: false + type: string + - _key: device_id + api_fieldname: device_id + description: The device ID. + example: 015c2fec9bba0000000000010010036f + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: The metadata record ID. + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: mechanism + api_fieldname: mechanism + description: How the firmware is delivered (connector or direct). + example: connector + readOnly: true + required: false + type: string + - _key: mechanism_url + api_fieldname: mechanism_url + description: The Device Management Connect URL. + readOnly: true + required: false + type: string + - _key: name + api_fieldname: name + default: default_object_name + description: The record name. + maxLength: 128 + readOnly: true + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: The time the entity was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Device_Update + methods: + - _key: read + description: 'Get update campaign metadata for a specific device. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a89900000655cd94fa8/campaign-device-metadata/016e83ddc645000000000001001000f6 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' + drop_fields: + - object + - etag + - type + - filter + - created_at + - updated_at + - deployment_state + - description + - device_id + - mechanism + - mechanism_url + - name + field_renames: + - _key: campaign_id + api_fieldname: campaign + fields: + - _key: campaign_id + api_fieldname: campaign + description: The device's campaign ID. + entity_fieldname: campaign_id + example: 015bf72fccda00000000000100100280 + in: path + parameter_fieldname: campaign_id + required: true + type: string + - _key: id + api_fieldname: id + description: The metadata record ID. + entity_fieldname: id + example: 015c3029f6f7000000000001001000c3 + in: path + parameter_fieldname: campaign_device_metadata_id + pattern: '[A-Fa-f0-9]{32}' + required: true + type: string + group_id: Device_Update + method: get + mode: read + operation_id: Update_Campaign_Metadata_retrieve + pagination: false + parameter_map: + campaign_device_metadata_id: id + path: /v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Request successful. + schema: + foreign_key: + entity: campaign_device_metadata + group: Device_Update + properties: + - _key: campaign + api_fieldname: campaign + description: The device's campaign ID. + entity_fieldname: campaign_id + example: 015bf72fccda00000000000100100280 + type: string + - _key: created_at + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: deployment_state + api_fieldname: deployment_state + description: The state of the update campaign on the device. + entity_fieldname: deployment_state + enum: + - pending + - updated_connector_channel + - failed_connector_channel_update + - deployed + - manifestremoved + - deregistered + type: string + - _key: description + api_fieldname: description + description: Description. + entity_fieldname: description + example: a description + maxLength: 2000 + type: string + - _key: device_id + api_fieldname: device_id + description: The device ID. + entity_fieldname: device_id + example: 015c2fec9bba0000000000010010036f + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' + type: string + - _key: id + api_fieldname: id + description: The metadata record ID. + entity_fieldname: id + example: 015c3029f6f7000000000001001000c3 + pattern: '[A-Fa-f0-9]{32}' + type: string + - _key: mechanism + api_fieldname: mechanism + description: How the firmware is delivered (connector or direct). + entity_fieldname: mechanism + example: connector + type: string + - _key: mechanism_url + api_fieldname: mechanism_url + description: The Device Management Connect URL. + entity_fieldname: mechanism_url + type: string + - _key: name + api_fieldname: name + default: default_object_name + description: The record name. + entity_fieldname: name + maxLength: 128 + type: string + - _key: object + 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 + description: The time the entity was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + type: object + - _key: '401' + description: Unauthorized. + - _key: '404' + description: Not Found. + return_info: + custom: false + self: true + type: campaign_device_metadata + return_type: campaign_device_metadata + summary: Get a campaign device metadata + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - CampaignDeviceMetadata + tags: + - Device update - campaigns +- _key: campaign_statistics + field_renames: [] + fields: + - _key: campaign_id + api_fieldname: campaign_id + description: ID of the associated campaign. + example: 016e652be6710000000000010010013d + readOnly: false + required: true + type: string + - _key: count + api_fieldname: count + example: 10 + readOnly: true + required: false + type: integer + - _key: created_at + api_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: ID of the event type description. + enum: + - fail + - success + - info + - skipped + enum_reference: campaign_statistics_id_enum + example: fail + readOnly: false + required: true + type: string + - _key: summary_status + api_fieldname: summary_status + description: The event type description. + enum: + - FAIL + - SUCCESS + - INFO + - SKIPPED + enum_reference: campaign_statistics_summary_status_enum + example: FAIL + readOnly: true + required: false + type: string + group_id: Device_Update + methods: + - _key: events + description: 'Get a list of events grouped by summary. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/12345678901234567890123456789012/statistics/skipped/event_types + \ + + -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 + - _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 + parameter_fieldname: summary_status_id + required: true + type: string + foreign_key: + entity: campaign_statistics_events + group: Device_Update + group_id: Device_Update + method: get + mode: events + operation_id: Update_Campaign_event_types_list + pagination: true + parameter_map: + summary_status_id: id + path: /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: campaign_statistics_events + 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 + enum: + - fail + - skipped + - info + - success + items: + foreign_key: + entity: campaign_statistics_events + group: Device_Update + properties: + - _key: campaign_id + description: ID of the associated campaign. + example: 016e652be671000000000001001001e5 + type: string + - _key: count + example: 10 + type: integer + - _key: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: description + example: Update error, nonspecific network error + type: string + - _key: event_type + example: UPD4_FAIL_101 + type: string + - _key: id + example: upd_fail_101 + type: string + - _key: object + description: 'Entity name: always ''event-type''.' + example: event-type + type: string + - _key: summary_status + example: FAIL + type: string + - _key: summary_status_id + 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: 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: read + 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 '' + + ``` + + ' + drop_fields: + - object + - etag + - type + - filter + - summary_status + - count + - created_at + field_renames: [] + fields: + - _key: campaign_id + api_fieldname: campaign_id + description: ID of the associated campaign. + entity_fieldname: campaign_id + example: 016e652be6710000000000010010013d + in: path + parameter_fieldname: campaign_id + required: true + type: string + - _key: id + api_fieldname: id + description: ID of the event type description. + entity_fieldname: id + enum: + - fail + - success + - info + - skipped + enum_reference: campaign_statistics_id_enum + example: fail + in: path + parameter_fieldname: summary_status_id + required: true + type: string + group_id: Device_Update + method: get + mode: read + operation_id: Update_Campaign_statistics_retrieve + pagination: false + parameter_map: + summary_status_id: id + path: /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: campaign_statistics + group: Device_Update + properties: + - _key: campaign_id + api_fieldname: campaign_id + description: ID of the associated campaign. + entity_fieldname: campaign_id + example: 016e652be6710000000000010010013d + type: string + - _key: count + api_fieldname: count + entity_fieldname: count + example: 10 + type: integer + - _key: created_at + api_fieldname: created_at + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: id + api_fieldname: id + description: ID of the event type description. + entity_fieldname: id + enum: + - fail + - success + - info + - skipped + example: fail + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''summary_status''.' + entity_fieldname: object + example: summary_status + type: string + - _key: summary_status + api_fieldname: summary_status + description: The event type description. + entity_fieldname: summary_status + enum: + - FAIL + - SUCCESS + - INFO + - SKIPPED + example: FAIL + type: string + 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: campaign_statistics + summary: Get a status summary + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - EventTypeList + - EventTypeSummary + - EventTypeSummaryList + tags: + - Device update - campaigns +- _key: campaign_statistics_events + field_renames: [] + fields: + - _key: campaign_id + api_fieldname: campaign_id + description: ID of the associated campaign. + example: 016e652be671000000000001001001e5 + readOnly: false + required: true + type: string + - _key: count + api_fieldname: count + example: 10 + readOnly: true + required: false + type: integer + - _key: created_at + api_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + example: Update error, nonspecific network error + readOnly: true + required: false + type: string + - _key: event_type + api_fieldname: event_type + example: UPD4_FAIL_101 + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + example: upd_fail_101 + readOnly: false + required: true + type: string + - _key: summary_status + api_fieldname: summary_status + example: FAIL + readOnly: true + required: false + type: string + - _key: summary_status_id + api_fieldname: summary_status_id + example: fail + readOnly: false + required: true + type: string + group_id: Device_Update + methods: + - _key: read + description: 'Get the count for a specific event type, for example, succeeded, + failed or skipped. + +
+ + **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 '' + + ``` + + ' + drop_fields: + - object + - etag + - type + - filter + - created_at + - event_type + - description + - summary_status + - count + field_renames: [] + fields: + - _key: campaign_id + api_fieldname: campaign_id + description: ID of the associated campaign. + entity_fieldname: campaign_id + example: 016e652be671000000000001001001e5 + in: path + parameter_fieldname: campaign_id + required: true + type: string + - _key: id + api_fieldname: id + entity_fieldname: id + example: upd_fail_101 + in: path + parameter_fieldname: event_type_id + required: true + type: string + - _key: summary_status_id + api_fieldname: summary_status_id + entity_fieldname: summary_status_id + example: fail + in: path + parameter_fieldname: summary_status_id + required: true + type: string + group_id: Device_Update + method: get + mode: read + operation_id: Update_Campaign_event_types_retrieve + pagination: false + parameter_map: + event_type_id: id + path: /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: campaign_statistics_events + group: Device_Update + properties: + - _key: campaign_id + api_fieldname: campaign_id + description: ID of the associated campaign. + entity_fieldname: campaign_id + example: 016e652be671000000000001001001e5 + type: string + - _key: count + api_fieldname: count + entity_fieldname: count + example: 10 + type: integer + - _key: created_at + api_fieldname: created_at + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: description + api_fieldname: description + entity_fieldname: description + example: Update error, nonspecific network error + type: string + - _key: event_type + api_fieldname: event_type + entity_fieldname: event_type + example: UPD4_FAIL_101 + type: string + - _key: id + api_fieldname: id + entity_fieldname: id + example: upd_fail_101 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''event-type''.' + entity_fieldname: object + example: event-type + type: string + - _key: summary_status + api_fieldname: summary_status + entity_fieldname: summary_status + example: FAIL + type: string + - _key: summary_status_id + api_fieldname: summary_status_id + entity_fieldname: summary_status_id + example: fail + type: string + 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_events + return_type: campaign_statistics_events + summary: Get an event type for a campaign + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - EventType + tags: + - Device update - campaigns +- _key: certificate_enrollment + field_renames: [] + fields: + - _key: certificate_name + api_fieldname: certificate_name + description: The certificate name. + example: customer.dlms + external_param: true + in: path + maxLength: 50 + name: certificate-name + parameter_fieldname: certificate-name + pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' + readOnly: true + required: false + type: string + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + required: false + type: string + - _key: device_id + api_fieldname: device_id + description: The device ID. + example: 01625daa23230a580a0100bd00000000 + readOnly: true + required: false + type: string + - _key: enroll_result + api_fieldname: enroll_result + description: The result of certificate enrollment request. + enum: + - success + - failure + enum_reference: certificate_enrollment_enroll_result_enum + example: success + readOnly: true + required: false + type: string + - _key: enroll_result_detail + api_fieldname: enroll_result_detail + description: Additional information in case of failure. + example: The device is currently processing too many certificate renewals. + readOnly: true + required: false + type: string + - _key: enroll_status + api_fieldname: enroll_status + description: The status of certificate enrollment request. + enum: + - new + - completed + enum_reference: certificate_enrollment_enroll_status_enum + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: The certificate enrollment ID. + example: 01612df56f3b0a580a010fc700000000 + in: path + parameter_fieldname: device-id + readOnly: false + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Update UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Security + methods: + - _key: list + description: 'Get certificate enrollments list, optionally filtered. + + + **Examples:** + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \ + + -H ''Authorization: Bearer '' + + ``` + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 + \ + + -H ''Authorization: Bearer '' + + ```' + 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 + field_renames: [] + fields: + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: 01625daa23230a580a0100bd00000000 + external_param: true + in: query + name: after + parameter_fieldname: after + pattern: '[0-9a-fA-F]{32}' + required: false + type: string + - _key: include + api_fieldname: include + description: a comma-separated list of data fields to return. + entity_fieldname: include + enum: + - total_count + enum_reference: certificate_enrollment_include_enum + external_param: true + in: query + name: include + parameter_fieldname: include + required: false + type: string + - _key: limit + api_fieldname: limit + description: The number of results to return (2-1000). + entity_fieldname: limit + external_param: true + format: int32 + in: query + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: order + api_fieldname: order + description: The order of results. + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: certificate_enrollment_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: certificate_enrollment + group: Security + foreign_key_priority: self + group_id: Security + method: get + mode: list + operation_id: getCertificateEnrollments + pagination: true + parameter_map: + certificate-enrollment-id: id + path: /v3/certificate-enrollments + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_enrollment + group: Security + pagination: true + properties: + - _key: after + api_fieldname: after + description: The entity ID to fetch after the given one. + entity_fieldname: after + example: 01625daa23230a580a0100bd00000000 + type: string + - _key: data + api_fieldname: data + description: List of certificate enrollments. + entity_fieldname: data + items: + foreign_key: + entity: certificate_enrollment + group: Security + properties: + - _key: certificate_name + api_fieldname: certificate-name + description: The certificate name. + entity_fieldname: certificate_name + example: customer.dlms + external_param: true + in: path + maxLength: 50 + name: certificate-name + parameter_fieldname: certificate-name + pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' + required: true + type: string + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: device_id + api_fieldname: device_id + description: The device ID. + entity_fieldname: device_id + example: 01625daa23230a580a0100bd00000000 + type: string + - _key: enroll_result + api_fieldname: enroll_result + description: The result of certificate enrollment request. + entity_fieldname: enroll_result + enum: + - success + - failure + example: success + type: string + - _key: enroll_result_detail + api_fieldname: enroll_result_detail + description: Additional information in case of failure. + entity_fieldname: enroll_result_detail + example: The device is currently processing too many certificate renewals. + type: string + - _key: enroll_status + api_fieldname: enroll_status + description: The status of certificate enrollment request. + entity_fieldname: enroll_status + enum: + - new + - completed + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: The certificate enrollment ID. + entity_fieldname: id + example: 01612df56f3b0a580a010fc700000000 + in: path + parameter_fieldname: device-id + required: true + type: string + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-enrollment + type: string + - _key: updated_at + api_fieldname: updated_at + description: Update UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + required: + - created_at + - etag + - id + - device_id + - certificate_name + type: object + type: array + - _key: has_more + api_fieldname: has_more + description: Flag indicating whether there are more results. + entity_fieldname: has_more + type: boolean + - _key: limit + api_fieldname: limit + description: The number of results to return. + entity_fieldname: limit + format: int32 + type: integer + - _key: object + api_fieldname: object + description: Describes the type of objects in the list. + entity_fieldname: object + enum: + - list + type: string + - _key: order + api_fieldname: order + description: 'Record order based on creation time. Acceptable values: ASC, + DESC. Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records. + entity_fieldname: total_count + format: int32 + type: integer + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_enrollment + return_type: paginated_response(certificate_enrollment) + summary: Get certificate enrollments list. + x_deprecation: null + x_filter: + certificate_name: + - eq + created_at: + - lte + - gte + device_id: + - eq + enroll_result: + - neq + - eq + enroll_status: + - neq + - eq + updated_at: + - lte + - gte + - _key: read + description: 'Get a certificate enrollment by ID. + + + **Example:** + + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - created_at + - device_id + - certificate_name + - enroll_status + - enroll_result + - enroll_result_detail + - updated_at + field_renames: [] + fields: + - _key: id + api_fieldname: id + description: The certificate enrollment ID. + entity_fieldname: id + example: 01612df56f3b0a580a010fc700000000 + in: path + parameter_fieldname: certificate-enrollment-id + required: true + type: string + group_id: Security + method: get + mode: read + operation_id: getCertificateEnrollment + pagination: false + parameter_map: + certificate-enrollment-id: id + path: /v3/certificate-enrollments/{certificate-enrollment-id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: device + group: Devices + properties: + - _key: certificate_name + api_fieldname: certificate_name + description: The certificate name. + entity_fieldname: certificate_name + example: customer.dlms + external_param: true + in: path + maxLength: 50 + name: certificate-name + parameter_fieldname: certificate-name + pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' + required: true + type: string + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: device_id + api_fieldname: device_id + description: The device ID. + entity_fieldname: device_id + example: 01625daa23230a580a0100bd00000000 + type: string + - _key: enroll_result + api_fieldname: enroll_result + description: The result of certificate enrollment request. + entity_fieldname: enroll_result + enum: + - success + - failure + example: success + type: string + - _key: enroll_result_detail + api_fieldname: enroll_result_detail + description: Additional information in case of failure. + entity_fieldname: enroll_result_detail + example: The device is currently processing too many certificate renewals. + type: string + - _key: enroll_status + api_fieldname: enroll_status + description: The status of certificate enrollment request. + entity_fieldname: enroll_status + enum: + - new + - completed + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: The certificate enrollment ID. + entity_fieldname: id + example: 01612df56f3b0a580a010fc700000000 + in: path + parameter_fieldname: device-id + required: true + type: string + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-enrollment + type: string + - _key: updated_at + api_fieldname: updated_at + description: Update UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + required: + - created_at + - etag + - id + - device_id + - certificate_name + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_enrollment + return_type: certificate_enrollment + summary: Get a certificate enrollment by ID. + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - CertificateEnrollment + - CertificateEnrollmentListResponse + tags: + - Device security - device certificate renewals +- _key: certificate_issuer + field_renames: [] + fields: + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + description: General description for the certificate issuer. + example: GlobalSign sample issuer + maxLength: 100 + readOnly: false + required: false + type: string + x-nullable: true + - _key: id + api_fieldname: id + description: Certificate issuer ID. + example: 01234567890ABCDEF01234567890ABCDEF + readOnly: false + required: true + type: string + - _key: issuer_attributes + additionalProperties: + type: string + api_fieldname: issuer_attributes + 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: [] + readOnly: false + required: false + type: object + - _key: issuer_type + api_fieldname: 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 + enum_reference: certificate_issuer_type_enum + example: GLOBAL_SIGN + readOnly: false + required: true + type: string + - _key: name + api_fieldname: name + description: Certificate issuer name, unique per account. + example: GS Issuer + maxLength: 50 + readOnly: false + required: true + type: string + group_id: Security + methods: + - _key: create + 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```" + drop_fields: + - object + - etag + - type + - filter + - created_at + - id + field_renames: [] + fields: + - _key: description + api_fieldname: description + description: General description for the certificate issuer. + entity_fieldname: description + example: GlobalSign sample issuer + in: body + maxLength: 100 + parameter_fieldname: description + required: false + type: string + x-nullable: true + - _key: issuer_attributes + additionalProperties: + type: string + api_fieldname: issuer_attributes + 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.' + entity_fieldname: issuer_attributes + example: [] + in: body + parameter_fieldname: issuer_attributes + required: false + type: object + - _key: issuer_credentials + additionalProperties: + type: string + api_fieldname: issuer_credentials + 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.' + entity_fieldname: issuer_credentials + example: [] + external_param: true + in: body + name: issuer_credentials + parameter_fieldname: issuer_credentials + required: true + schema_param: true + type: object + - _key: issuer_type + api_fieldname: 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." + entity_fieldname: issuer_type + enum: + - GLOBAL_SIGN + - CFSSL_AUTH + enum_reference: certificate_issuer_type_enum + example: GLOBAL_SIGN + in: body + parameter_fieldname: issuer_type + required: true + type: string + - _key: name + api_fieldname: name + description: Certificate issuer name, unique per account. + entity_fieldname: name + example: GS Issuer + in: body + maxLength: 50 + parameter_fieldname: name + required: false + type: string + group_id: Security + method: post + mode: create + operation_id: createCertificateIssuer + pagination: false + parameter_map: + certificate-issuer-id: id + path: /v3/certificate-issuers + request_body: json + request_content_type: application/json + responses: + - _key: '201' + description: Created. + schema: + foreign_key: + entity: certificate_issuer + group: Security + properties: + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: description + api_fieldname: description + description: General description for the certificate issuer. + entity_fieldname: description + example: GlobalSign sample issuer + maxLength: 100 + type: string + x-nullable: true + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. + entity_fieldname: id + example: 01234567890ABCDEF01234567890ABCDEF + type: string + - _key: issuer_attributes + additionalProperties: + type: string + api_fieldname: issuer_attributes + 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.' + entity_fieldname: issuer_attributes + example: [] + type: object + - _key: issuer_type + api_fieldname: 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." + entity_fieldname: issuer_type + enum: + - GLOBAL_SIGN + - CFSSL_AUTH + example: GLOBAL_SIGN + type: string + - _key: name + api_fieldname: name + description: Certificate issuer name, unique per account. + entity_fieldname: name + example: GS Issuer + maxLength: 50 + type: string + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer + type: string + required: + - issuer_type + type: object + - _key: '400' + description: 'Validation error: The data used to create the certificate issuer + failed validation.' + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: You are not authorized to view the resource. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '409' + description: Conflict. A certificate issuer with this name already exists. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '424' + description: The request failed due to customer configured external service. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer + return_type: certificate_issuer + summary: Create certificate issuer. + x_deprecation: null + x_filter: {} + - _key: delete + description: 'Delete a certificate issuer by ID. + +
+ + **Example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 + \ + + -H ''Authorization: Bearer '' \ + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: id + api_fieldname: certificate-issuer-id + description: 'Certificate issuer ID. + + An active certificate issuer cannot be deleted.' + entity_fieldname: id + external_param: false + in: path + name: certificate-issuer-id + parameter_fieldname: certificate-issuer-id + required: true + type: string + group_id: Security + method: delete + mode: delete + operation_id: deleteCertificateIssuer + pagination: false + parameter_map: + certificate-issuer-id: id + path: /v3/certificate-issuers/{certificate-issuer-id} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Certificate issuer deleted. + - _key: '400' + description: 'Validation error: An active certificate issuer cannot be deleted.' + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer + return_type: certificate_issuer + summary: Delete certificate issuer. + x_deprecation: null + x_filter: {} + - _key: list + description: '**Note:** This endpoint does not use pagination, and therefore ignores + list control parameters such as `limit` or `after`.' + drop_fields: + - object + - etag + - type + - filter + - has_more + - total_count + - data + field_renames: [] + fields: + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: '01631667477600000000000100100374' + external_param: true + in: query + name: after + parameter_fieldname: after + required: false + type: string + - _key: include + api_fieldname: include + description: 'Comma-separated list of data fields 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: 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 + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: certificate_issuer + group: Security + foreign_key_priority: self + group_id: Security + method: get + mode: list + operation_id: getCertificateIssuers + pagination: true + parameter_map: + certificate-issuer-id: id + path: /v3/certificate-issuers + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer + group: Security + pagination: true + properties: + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: '01631667477600000000000100100374' + external_param: true + in: query + name: after + parameter_fieldname: after + required: false + type: string + - _key: data + api_fieldname: data + description: List of certificate issuers. + entity_fieldname: data + items: + foreign_key: + entity: certificate_issuer + group: Security + properties: + - _key: created_at + description: Creation UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: description + description: General description for the certificate issuer. + example: GlobalSign sample issuer + maxLength: 100 + type: string + x-nullable: true + - _key: etag + description: Entity instance signature. + example: '1' + type: string + - _key: id + description: Certificate issuer ID. + example: 01234567890ABCDEF01234567890ABCDEF + type: string + - _key: issuer_attributes + additionalProperties: + type: string + 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: [] + type: object + - _key: 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 + example: GLOBAL_SIGN + type: string + - _key: name + description: Certificate issuer name, unique per account. + example: GS Issuer + maxLength: 50 + type: string + - _key: object + enum: + - certificate-issuer + type: string + required: + - issuer_type + type: object + type: array + - _key: has_more + api_fieldname: has_more + description: More results are available. + entity_fieldname: has_more + example: false + type: boolean + - _key: limit + api_fieldname: 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 + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: object + api_fieldname: object + description: The type of this API object is `list`. + entity_fieldname: object + example: list + type: string + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + example: 1 + format: integer + type: integer + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer + return_type: paginated_response(certificate_issuer) + summary: Get certificate issuers list. + x_deprecation: null + x_filter: {} + - _key: read + description: (No description provided) + drop_fields: + - object + - etag + - type + - filter + - created_at + - issuer_type + - name + - description + - issuer_attributes + field_renames: [] + fields: + - _key: id + api_fieldname: id + description: Certificate issuer ID. + entity_fieldname: id + example: 01234567890ABCDEF01234567890ABCDEF + in: path + parameter_fieldname: certificate-issuer-id + required: true + type: string + group_id: Security + method: get + mode: read + operation_id: getCertificateIssuer + pagination: false + parameter_map: + certificate-issuer-id: id + path: /v3/certificate-issuers/{certificate-issuer-id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer + group: Security + properties: + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: description + api_fieldname: description + description: General description for the certificate issuer. + entity_fieldname: description + example: GlobalSign sample issuer + maxLength: 100 + type: string + x-nullable: true + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. + entity_fieldname: id + example: 01234567890ABCDEF01234567890ABCDEF + type: string + - _key: issuer_attributes + additionalProperties: + type: string + api_fieldname: issuer_attributes + 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.' + entity_fieldname: issuer_attributes + example: [] + type: object + - _key: issuer_type + api_fieldname: 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." + entity_fieldname: issuer_type + enum: + - GLOBAL_SIGN + - CFSSL_AUTH + example: GLOBAL_SIGN + type: string + - _key: name + api_fieldname: name + description: Certificate issuer name, unique per account. + entity_fieldname: name + example: GS Issuer + maxLength: 50 + type: string + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer + type: string + required: + - issuer_type + type: object + - _key: '400' + description: 'Validation error: The data used to get the certificate issuer + failed validation.' + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer + return_type: certificate_issuer + summary: Get certificate issuer by ID. + x_deprecation: null + x_filter: {} + - _key: update + 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```" + drop_fields: + - object + - etag + - type + - filter + - created_at + - issuer_type + field_renames: [] + fields: + - _key: description + api_fieldname: description + description: General description for the certificate issuer. + entity_fieldname: description + example: GlobalSign sample issuer + in: body + maxLength: 100 + parameter_fieldname: description + required: false + type: string + x-nullable: true + - _key: id + api_fieldname: id + description: Certificate issuer ID. + entity_fieldname: id + example: 01234567890ABCDEF01234567890ABCDEF + in: path + parameter_fieldname: certificate-issuer-id + required: true + type: string + - _key: issuer_attributes + additionalProperties: + type: string + api_fieldname: issuer_attributes + 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.' + entity_fieldname: issuer_attributes + example: [] + in: body + parameter_fieldname: issuer_attributes + required: false + type: object + - _key: issuer_credentials + additionalProperties: + type: string + api_fieldname: issuer_credentials + 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.' + entity_fieldname: issuer_credentials + example: [] + external_param: true + in: body + name: issuer_credentials + parameter_fieldname: issuer_credentials + required: false + schema_param: true + type: object + - _key: name + api_fieldname: name + description: Certificate issuer name, unique per account. + entity_fieldname: name + example: GS Issuer + in: body + maxLength: 50 + parameter_fieldname: name + required: false + type: string + group_id: Security + method: put + mode: update + operation_id: updateCertificateIssuer + pagination: false + parameter_map: + certificate-issuer-id: id + path: /v3/certificate-issuers/{certificate-issuer-id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer + group: Security + properties: + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: description + api_fieldname: description + description: General description for the certificate issuer. + entity_fieldname: description + example: GlobalSign sample issuer + maxLength: 100 + type: string + x-nullable: true + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. + entity_fieldname: id + example: 01234567890ABCDEF01234567890ABCDEF + type: string + - _key: issuer_attributes + additionalProperties: + type: string + api_fieldname: issuer_attributes + 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.' + entity_fieldname: issuer_attributes + example: [] + type: object + - _key: issuer_type + api_fieldname: 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." + entity_fieldname: issuer_type + enum: + - GLOBAL_SIGN + - CFSSL_AUTH + example: GLOBAL_SIGN + type: string + - _key: name + api_fieldname: name + description: Certificate issuer name, unique per account. + entity_fieldname: name + example: GS Issuer + maxLength: 50 + type: string + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer + type: string + required: + - issuer_type + type: object + - _key: '400' + description: 'Validation error: The data used to update the certificate issuer + failed validation.' + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '409' + description: Conflict. A certificate issuer with this name already exists. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '424' + description: The request failed due to customer-configured external service. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer + return_type: certificate_issuer + summary: Update certificate issuer. + x_deprecation: null + x_filter: {} + - _key: verify + description: 'Validates the certificate issuer by sending a signing request for + a test certificate. This should be done before the configuration is made active. + +
+ + **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. + +
+ + **Example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json;charset=UTF-8'' \ + + ```' + drop_fields: + - object + - etag + - type + - filter + - successful + - message + field_renames: [] + fields: + - _key: id + api_fieldname: certificate-issuer-id + description: Certificate issuer ID. + entity_fieldname: id + external_param: false + in: path + name: certificate-issuer-id + parameter_fieldname: certificate-issuer-id + required: true + type: string + foreign_key: + entity: verification_response + group: Security + group_id: Security + method: post + mode: verify + operation_id: verifyCertificateIssuer + pagination: false + parameter_map: + certificate-issuer-id: id + path: /v3/certificate-issuers/{certificate-issuer-id}/verify + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: verification_response + group: Security + properties: + - _key: message + api_fieldname: message + description: Provides details in case of failure. + entity_fieldname: message + example: Message describing the verification failure + type: string + - _key: successful + api_fieldname: successful + description: Indicates whether the certificate issuer was verified successfully. + entity_fieldname: successful + example: false + type: boolean + type: object + - _key: '400' + description: Validation error + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '424' + description: The request failed due to customer configured external service. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: false + type: verification_response + return_type: verification_response + summary: Verify certificate issuer. + unaggregated: true + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - CertificateIssuerInfo + - CertificateIssuerInfoListResponse + - CertificateIssuerRequest + - CertificateIssuerUpdateRequest + - CertificateIssuerVerifyResponse + tags: + - Security and identity - certificate issuers +- _key: certificate_issuer_config + field_renames: [] + fields: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + example: 01648415a2a30242ac18000500000000 + readOnly: false + required: true + type: string + x-nullable: true + - _key: created_at + api_fieldname: created_at + description: Created UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + example: 01648415a2a30242ac18000500000000 + readOnly: false + required: true + type: string + - _key: reference + api_fieldname: reference + description: The certificate name to which the certificate issuer configuration + applies. + example: customer.dlms + readOnly: false + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Updated UTC time RFC3339. + example: '2017-02-01T00:00:00Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Security + methods: + - _key: create + 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```" + drop_fields: + - object + - etag + - type + - filter + - is_custom + - id + - created_at + - updated_at + field_renames: [] + fields: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + entity_fieldname: certificate_issuer_id + example: 01648415a2a30242ac18000500000000 + in: body + parameter_fieldname: certificate_issuer_id + required: false + type: string + x-nullable: true + - _key: reference + api_fieldname: reference + description: The certificate name to which the certificate issuer configuration + applies. + entity_fieldname: reference + example: customer.dlms + in: body + parameter_fieldname: reference + required: true + type: string + group_id: Security + method: post + mode: create + operation_id: createCertificateIssuerConfig + pagination: false + parameter_map: + certificate-issuer-configuration-id: id + path: /v3/certificate-issuer-configurations + request_body: json + request_content_type: application/json + responses: + - _key: '201' + description: OK. + schema: + foreign_key: + entity: certificate_issuer_config + group: Security + properties: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + entity_fieldname: certificate_issuer_id + example: 01648415a2a30242ac18000500000000 + type: string + x-nullable: true + - _key: created_at + api_fieldname: created_at + description: Created UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + entity_fieldname: id + example: 01648415a2a30242ac18000500000000 + type: string + - _key: is_custom + api_fieldname: is_custom + entity_fieldname: is_custom + example: true + type: boolean + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer-configuration + type: string + - _key: reference + api_fieldname: reference + description: The certificate name to which the certificate issuer configuration + applies. + entity_fieldname: reference + example: customer.dlms + type: string + - _key: updated_at + api_fieldname: updated_at + description: Updated UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-02-01T00:00:00Z' + format: date-time + type: string + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '409' + description: A certificate issuer configuration with this reference already + exists. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer_config + return_type: certificate_issuer_config + summary: Create certificate issuer configuration. + x_deprecation: null + x_filter: {} + - _key: delete + description: 'Delete certificate issuer configuration. + + You can only delete custom certificate configurations.' + drop_fields: + - object + - etag + - type + - filter + - is_custom + field_renames: [] + fields: + - _key: id + api_fieldname: certificate-issuer-configuration-id + description: Certificate issuer ID configuration. + entity_fieldname: id + external_param: false + in: path + name: certificate-issuer-configuration-id + parameter_fieldname: certificate-issuer-configuration-id + required: true + type: string + group_id: Security + method: delete + mode: delete + operation_id: deleteCertificateIssuerConfigByID + pagination: false + parameter_map: + certificate-issuer-configuration-id: id + path: /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: No content. + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer_config + return_type: certificate_issuer_config + summary: Delete certificate issuer configuration. + x_deprecation: null + x_filter: {} + - _key: get_default + description: 'Provides the configured certificate issuer used when creating device + + certificates for LwM2M.' + drop_fields: + - object + - etag + - type + - filter + - is_custom + - id + - certificate_issuer_id + - reference + - created_at + - updated_at + field_renames: [] + fields: [] + group_id: Security + method: get + mode: get_default + operation_id: getCertificateIssuerConfig + pagination: false + parameter_map: + certificate-issuer-configuration-id: id + path: /v3/certificate-issuer-configurations/lwm2m + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer_config + group: Security + properties: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + entity_fieldname: certificate_issuer_id + example: 01648415a2a30242ac18000500000000 + type: string + x-nullable: true + - _key: created_at + api_fieldname: created_at + description: Created UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + entity_fieldname: id + example: 01648415a2a30242ac18000500000000 + type: string + - _key: is_custom + api_fieldname: is_custom + entity_fieldname: is_custom + example: true + type: boolean + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer-configuration + type: string + - _key: reference + api_fieldname: reference + description: The certificate name to which the certificate issuer configuration + applies. + entity_fieldname: reference + example: customer.dlms + type: string + - _key: updated_at + api_fieldname: updated_at + description: Updated UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-02-01T00:00:00Z' + format: date-time + type: string + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer_config + return_type: certificate_issuer_config + summary: Get certificate issuer configuration. + x_deprecation: null + x_filter: {} + - _key: list + description: 'Get certificate issuer configurations, optionally filtered by reference. + +
+ + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json;charset=UTF-8'' \ + + ``` + +
+ + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations?reference__eq=dlms + \ + + -H ''Authorization: Bearer '' \ + + -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`.' + drop_fields: + - object + - etag + - type + - filter + - is_custom + - has_more + - total_count + - data + - reference__eq + field_renames: [] + fields: + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: '01631667477600000000000100100374' + external_param: true + in: query + name: after + parameter_fieldname: after + required: false + type: string + - _key: include + api_fieldname: include + description: 'Comma-separated list of data fields 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: 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 + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: certificate_issuer_config + group: Security + foreign_key_priority: self + group_id: Security + method: get + mode: list + operation_id: getCertificateIssuerConfigs + pagination: true + parameter_map: + certificate-issuer-configuration-id: id + path: /v3/certificate-issuer-configurations + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer_config + group: Security + pagination: true + properties: + - _key: after + api_fieldname: after + description: An offset token for current page. + entity_fieldname: after + example: '01631667477600000000000100100374' + type: string + - _key: data + api_fieldname: data + description: List of certificate issuers. + entity_fieldname: data + items: + foreign_key: + entity: certificate_issuer_config + group: Security + properties: + - _key: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + example: 01648415a2a30242ac18000500000000 + type: string + x-nullable: true + - _key: created_at + description: Created UTC time RFC3339. + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: etag + description: Entity instance signature. + example: '1' + type: string + - _key: id + description: Certificate issuer ID. configuration. + example: 01648415a2a30242ac18000500000000 + type: string + - _key: is_custom + example: true + type: boolean + - _key: object + enum: + - certificate-issuer-configuration + type: string + - _key: reference + description: The certificate name to which the certificate issuer configuration + applies. + example: customer.dlms + type: string + - _key: updated_at + description: Updated UTC time RFC3339. + example: '2017-02-01T00:00:00Z' + format: date-time + type: string + type: object + type: array + - _key: has_more + api_fieldname: has_more + description: More results are available. + entity_fieldname: has_more + example: false + type: boolean + - _key: limit + api_fieldname: 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 + minimum: 2 + type: integer + - _key: object + api_fieldname: object + description: The type of this API object is `list`. + entity_fieldname: object + example: list + type: string + - _key: order + api_fieldname: order + description: Record order based on creation time. + entity_fieldname: order + example: DESC + type: string + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + example: 1 + format: integer + type: integer + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer_config + return_type: paginated_response(certificate_issuer_config) + summary: Get certificate issuer configurations. + x_deprecation: null + x_filter: + reference: + - eq + - _key: read + description: Provides the configured certificate issuer. + drop_fields: + - object + - etag + - type + - filter + - is_custom + - certificate_issuer_id + - reference + - created_at + - updated_at + field_renames: [] + fields: + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + entity_fieldname: id + example: 01648415a2a30242ac18000500000000 + in: path + parameter_fieldname: certificate-issuer-configuration-id + required: true + type: string + group_id: Security + method: get + mode: read + operation_id: getCertificateIssuerConfigByID + pagination: false + parameter_map: + certificate-issuer-configuration-id: id + path: /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer_config + group: Security + properties: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + entity_fieldname: certificate_issuer_id + example: 01648415a2a30242ac18000500000000 + type: string + x-nullable: true + - _key: created_at + api_fieldname: created_at + description: Created UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + entity_fieldname: id + example: 01648415a2a30242ac18000500000000 + type: string + - _key: is_custom + api_fieldname: is_custom + entity_fieldname: is_custom + example: true + type: boolean + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer-configuration + type: string + - _key: reference + api_fieldname: reference + description: The certificate name to which the certificate issuer configuration + applies. + entity_fieldname: reference + example: customer.dlms + type: string + - _key: updated_at + api_fieldname: updated_at + description: Updated UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-02-01T00:00:00Z' + format: date-time + type: string + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer_config + return_type: certificate_issuer_config + summary: Get certificate issuer configuration. + x_deprecation: null + x_filter: {} + - _key: update + additional_operations: + - notes: After retrieving the resource using the `lwm2m` method, it can modified + using using this SDK method. + operation_id: updateCertificateIssuerConfig + description: Update certificate issuer configuration. + drop_fields: + - object + - etag + - type + - filter + - is_custom + - reference + - created_at + - updated_at + field_renames: [] + fields: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + entity_fieldname: certificate_issuer_id + example: 01648415a2a30242ac18000500000000 + in: body + parameter_fieldname: certificate_issuer_id + required: false + type: string + x-nullable: true + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + entity_fieldname: id + example: 01648415a2a30242ac18000500000000 + in: path + parameter_fieldname: certificate-issuer-configuration-id + required: true + type: string + group_id: Security + method: put + mode: update + operation_id: updateCertificateIssuerConfigByID + pagination: false + parameter_map: + certificate-issuer-configuration-id: id + path: /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: OK. + schema: + foreign_key: + entity: certificate_issuer_config + group: Security + properties: + - _key: certificate_issuer_id + api_fieldname: certificate_issuer_id + description: 'Certificate issuer ID. + + Null if Device Management internal HSM is used.' + entity_fieldname: certificate_issuer_id + example: 01648415a2a30242ac18000500000000 + type: string + x-nullable: true + - _key: created_at + api_fieldname: created_at + description: Created UTC time RFC3339. + entity_fieldname: created_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Certificate issuer ID. configuration. + entity_fieldname: id + example: 01648415a2a30242ac18000500000000 + type: string + - _key: is_custom + api_fieldname: is_custom + entity_fieldname: is_custom + example: true + type: boolean + - _key: object + api_fieldname: object + entity_fieldname: object + enum: + - certificate-issuer-configuration + type: string + - _key: reference + api_fieldname: reference + description: The certificate name to which the certificate issuer configuration + applies. + entity_fieldname: reference + example: customer.dlms + type: string + - _key: updated_at + api_fieldname: updated_at + description: Updated UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-02-01T00:00:00Z' + format: date-time + type: string + type: object + - _key: '400' + description: Validation error. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '401' + description: Unauthorized. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '404' + description: Not found. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: certificate_issuer_config + return_type: certificate_issuer_config + summary: Update certificate issuer configuration. + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - CertificateIssuerConfigListResponse + - CertificateIssuerConfigRequest + - CertificateIssuerConfigResponse + - CreateCertificateIssuerConfig + tags: + - Security and identity - certificate issuer configurations +- _key: dark_theme_color + field_renames: [] + fields: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' + readOnly: false + required: false + type: string + x-nullable: true + - _key: reference + _override: true + api_fieldname: reference + 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 + enum_reference: dark_theme_color_reference_enum + is_primary_key: true + readOnly: false + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Branding + methods: + - _key: delete + description: 'Resets the branding color to its dark theme default. + + Note: 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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: The name of the branding color. + entity_fieldname: reference + enum: &id002 + - 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 + enum_reference: dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: delete + mode: delete + operation_id: resetDarkColor + pagination: false + path: /v3/branding-colors/dark/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Deleted successfully. + - _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: '404' + description: Color 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: true + self: false + type: void + return_type: void + spec: + return_type: void + summary: Reset branding color to default. + x_deprecation: null + x_filter: {} + - _key: list + description: 'Retrieve the dark theme branding colors. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - limit + - after + - order + - total_count + - has_more + - data + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + entity_fieldname: reference + is_primary_key: true + type: string + foreign_key: + entity: dark_theme_color + group: Branding + foreign_key_priority: self + group_id: Branding + method: get + mode: list + operation_id: getDarkColors + pagination: true + path: /v3/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 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: 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 + - DESC + type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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: dark_theme_color + return_type: paginated_response(dark_theme_color) + summary: Get dark theme branding colors. + x_deprecation: null + x_filter: {} + - _key: read + description: '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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - color + - updated_at + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id002 + enum_reference: dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: get + mode: read + operation_id: getDarkColor + pagination: false + path: /v3/branding-colors/dark/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: subtenant_light_theme_color + group: Branding + properties: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + type: string + x-nullable: true + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_color''' + entity_fieldname: object + enum: + - branding_color + readOnly: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + 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 + is_primary_key: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + 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: '404' + description: Color 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: dark_theme_color + return_type: dark_theme_color + summary: Get dark theme branding color. + x_deprecation: null + x_filter: {} + - _key: update + additional_operations: + - notes: Bulk operation is not appriate for SDK's entity model, this functionality + is covered by the update method. + operation_id: bulkSetDarkColors + description: 'Update a dark theme branding color. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "color": "#f3f93e" }'' + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + in: body + parameter_fieldname: color + required: false + type: string + x-nullable: true + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id002 + enum_reference: dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string + group_id: Branding + method: put + mode: update + operation_id: setDarkColor + pagination: false + path: /v3/branding-colors/dark/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Color has been set successfully. + schema: + foreign_key: + entity: subtenant_light_theme_color + group: Branding + properties: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + type: string + x-nullable: true + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_color''' + entity_fieldname: object + enum: + - branding_color + readOnly: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + 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 + is_primary_key: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + type: object + - _key: '400' + description: Error in input data format. + 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: '404' + description: Color 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: dark_theme_color + return_type: dark_theme_color + summary: Updates a dark theme branding color. + x_deprecation: null + x_filter: {} + primary_key_field: reference + swagger_models: + - BrandingColor + - BrandingColorList + tags: + - User interface configuration - colors +- _key: dark_theme_image + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: Name of the 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 + enum_reference: dark_theme_image_reference_enum + is_primary_key: true + readOnly: false + required: false + type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Branding + methods: + - _key: delete + description: 'Revert an account branding image to dark theme default. + + Note: 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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: Name of the branding images (icon or picture). + entity_fieldname: reference + enum: &id003 + - 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 + enum_reference: dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: post + mode: delete + operation_id: clearDarkImage + pagination: false + path: /v3/branding-images/dark/{reference}/clear + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Image reverted successfully. + - _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: - - end_market - - etag - - id - - object - - status - - tier + - name + - message 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}' + - _key: message + description: A human readable informative explanation + example: Validation error 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' + - _key: object + description: Entity name, always `error`. + enum: + - error 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 + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 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 + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string required: - - end_market - - etag - - id + - code + - message - object - - status - - tier + - request_id + - type type: object - - _key: '400' - description: Error in input data format. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -8262,8 +20959,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Authentication failure. + - _key: '404' + description: Unknown image reference. schema: properties: - _key: code @@ -8310,8 +21007,189 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + return_info: + custom: false + self: true + type: dark_theme_image + return_type: dark_theme_image + summary: Revert an image to dark theme default. + x_deprecation: null + x_filter: {} + - _key: list + description: '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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - limit + - after + - order + - total_count + - has_more + - data + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + entity_fieldname: reference + is_primary_key: true + type: string + foreign_key: + entity: dark_theme_image + group: Branding + foreign_key_priority: self + group_id: Branding + method: get + mode: list + operation_id: getAllDarkImageData + pagination: true + path: /v3/branding-images/dark + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: dark_theme_image + 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: dark_theme_image + group: Branding + properties: + - _key: object + description: 'Entity name: always ''branding_image''' + enum: + - branding_image + readOnly: true + type: string + - _key: reference + _override: true + description: Name of the 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 + is_primary_key: true + type: string + - _key: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: 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 + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -8358,8 +21236,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Account with the given ID not found. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -8409,286 +21287,131 @@ entities: return_info: custom: false self: true - type: account - return_type: account - summary: Update attributes of an existing account. + type: dark_theme_image + return_type: paginated_response(dark_theme_image) + summary: Get metadata of all dark theme images. x_deprecation: null x_filter: {} - - _key: user_invitations - description: 'Retrieve details of all active user invitations sent for new or - existing users. + - _key: read + description: 'Retrieve metadata for one account dark theme branding image. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/user-invitations + curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - - etag - - type - - groups - - filter - - sub_accounts - - total_count - - has_more - - data - - login_profiles__eq - field_renames: [] - fields: - - _key: after - api_fieldname: after - description: The entity ID to fetch 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: id - api_fieldname: account_id - description: Account ID. - entity_fieldname: id - external_param: false - in: path - name: account_id - parameter_fieldname: account_id - required: true - type: string - - _key: limit - api_fieldname: limit - 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: order - api_fieldname: order - default: ASC - description: 'Record order based on creation time. 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 - foreign_key: - entity: subtenant_user_invitation - group_id: Accounts - method: get - mode: user_invitations - notes: This lists the user invitations of the subtenant account. - operation_id: getAllAccountInvitations - pagination: true - parameter_map: - account_id: id - path: /v3/accounts/{account_id}/user-invitations - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: user_invitation - group: Accounts - pagination: true - properties: - - _key: after - api_fieldname: after - description: The entity ID to fetch 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 - description: A list of entities. - entity_fieldname: data - items: - description: Represents an user invitation in responses. - foreign_key: - entity: user_invitation - group: Accounts - properties: - - _key: account_id - description: The ID of the account the user is invited to. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: created_at - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' - format: date-time - type: string - - _key: email - description: Email address of the invited user. - example: friend@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - - _key: etag - description: API resource entity version. - example: '1' - type: string - - _key: expiration - description: Invitation expiration as UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - - _key: groups - description: A list of IDs of the groups the user is invited to. - items: - type: string - type: array - - _key: id - description: The ID of the invitation. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: login_profiles - description: A list of login profiles for the user. Specified as the - identity providers the user is associated with. - items: - description: Represents a user login profile in Device Management. - foreign_key: - entity: login_profile - group: Accounts - properties: - - _key: id - _override: true - api_fieldname: id - description: ID of the identity provider. - entity_fieldname: id - readOnly: false - type: string - - _key: name - _override: true - api_fieldname: name - description: Name of the identity provider. - entity_fieldname: name - readOnly: false - type: string - - _key: type - api_fieldname: type - description: Identity provider type. - entity_fieldname: type - enum: - - NATIVE - - MBED - - SAML2 - - OIDC - readOnly: true - type: string - required: - - id - type: object - type: array - x-nullable: true - - _key: object - description: 'Entity name: always ''user-invitation''' - enum: - - user-invitation - type: string - - _key: updated_at - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time - type: string - - _key: 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 - 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 - 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 + - etag + - type + - filter + - static_uri + - updated_at + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + entity_fieldname: reference + enum: *id003 + enum_reference: dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: get + mode: read + operation_id: getDarkImageData + pagination: false + path: /v3/branding-images/dark/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: subtenant_light_theme_image + group: Branding + properties: - _key: object api_fieldname: object - description: 'Entity name: always `list`.' + description: 'Entity name: always ''branding_image''' entity_fieldname: object enum: - - list + - branding_image + readOnly: true type: string - - _key: order - api_fieldname: order - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - entity_fieldname: order + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + entity_fieldname: reference enum: - - ASC - - DESC - enum_reference: user_invitation_order_enum - external_param: true - in: query - name: order - parameter_fieldname: order - required: false + - 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 + is_primary_key: true + type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true type: string - - _key: total_count - api_fieldname: total_count - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer - required: - - data - - has_more - - limit - - object - - total_count type: object - _key: '401' description: Authentication failure. @@ -8787,7 +21510,7 @@ entities: - type type: object - _key: '404' - description: An account with the specified ID does not exist. + description: Unknown image reference. schema: properties: - _key: code @@ -8836,538 +21559,752 @@ entities: type: object return_info: custom: false - self: false - type: subtenant_user_invitation - return_type: paginated_response(subtenant_user_invitation) - summary: Get the details of all user invitations. + self: true + type: dark_theme_image + return_type: dark_theme_image + summary: Get metadata of a dark theme image. x_deprecation: null - x_filter: - login_profiles: - - eq - - _key: users - description: 'Retrieve details of all users. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/users - \ - - -H ''Authorization: Bearer '' - - ```' - drop_fields: - - object - - etag - - type - - groups - - filter - - sub_accounts - - total_count - - has_more - - data - - email__eq - - status__eq - - status__in - - status__nin - - login_profiles__eq - field_renames: [] - fields: - - _key: after - api_fieldname: after - description: The entity ID to fetch 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: id - api_fieldname: account_id - description: Account ID. - entity_fieldname: id - external_param: false - in: path - name: account_id - parameter_fieldname: account_id - required: true - 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 - 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: order - api_fieldname: order - default: ASC - description: 'Record order based on creation time. 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 - foreign_key: - entity: subtenant_user - group_id: Accounts - method: get - mode: users - notes: This lists the users of the subtenant account. - operation_id: getAllAccountUsers - pagination: true - parameter_map: - account_id: id - path: /v3/accounts/{account_id}/users - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: user - group: Accounts - pagination: true - properties: - - _key: after - api_fieldname: after - description: The entity ID to fetch 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 - description: A list of entities. - entity_fieldname: data - items: - description: Represents a user in Device Management. - foreign_key: - entity: user - group: Accounts - properties: - - _key: account_id - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: active_sessions - description: List of active user sessions. - items: - description: Represents an active user session. - foreign_key: - entity: active_session - group: Accounts - properties: - - _key: account_id - api_fieldname: account_id - description: The UUID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: ip_address - api_fieldname: ip_address - description: IP address of the client. - entity_fieldname: ip_address - example: 127.0.0.1 - type: string - - _key: login_time - api_fieldname: login_time - description: The login time of the user. - entity_fieldname: login_time - example: '2018-02-14T17:52:07Z' - format: date-time - type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''user-session''' - entity_fieldname: object - enum: - - user-session - type: string - - _key: reference_token - api_fieldname: reference_token - description: The reference token. - entity_fieldname: reference_token - example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk - type: string - - _key: user_agent - api_fieldname: user_agent - description: User Agent header from the login request. - entity_fieldname: user_agent - 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 - type: array - - _key: address - description: Address. - example: 110 Fulbourn Rd, Cambridge, United Kingdom - 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: creation_time - description: A timestamp of the user creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 - type: integer - - _key: custom_fields - additionalProperties: - type: string - description: User's account-specific custom properties. The value is - a string. - type: object - x-nullable: true - - _key: email - description: The email address. - example: user@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - - _key: email_verified - description: A flag indicating whether the user's email address has - been verified or not. - example: true - type: boolean - - _key: etag - description: API resource entity version. - example: '1' - type: string - - _key: full_name - description: The full name of the user. - example: User Doe - maxLength: 100 - type: string - x-nullable: true - - _key: groups - description: A list of IDs of the groups this user belongs to. - items: - type: string - type: array - - _key: id - description: The ID of the user. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: is_gtc_accepted - description: A flag indicating that the user has accepted General Terms - and Conditions. - example: true - type: boolean - - _key: is_marketing_accepted - description: A flag indicating that the user has consented to receive - marketing information. - example: true - type: boolean - - _key: is_totp_enabled - description: A flag indicating whether two-factor authentication (TOTP) - has been enabled. - example: true - type: boolean - - _key: last_login_time - description: A timestamp of the latest login of the user, in milliseconds. - example: 1518630727688 - format: int64 - type: integer - - _key: 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: - description: Represents an entry in login history. - foreign_key: - entity: login_history - group: Accounts - properties: - - _key: date - api_fieldname: date - description: UTC time RFC3339 for this login attempt. - entity_fieldname: date - example: '2018-02-14T17:52:07Z' - format: date-time - type: string - - _key: ip_address - api_fieldname: ip_address - description: IP address of the client. - entity_fieldname: ip_address - example: 127.0.0.1 - type: string - - _key: success - api_fieldname: success - description: Flag indicating whether login attempt was successful - or not. - entity_fieldname: success - example: true - type: boolean - - _key: user_agent - api_fieldname: user_agent - description: User Agent header from the login request. - entity_fieldname: user_agent - 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 - maxItems: 5 - type: array - - _key: login_profiles - description: A list of login profiles for the user. Specified as the - identity providers the user is associated with. - items: - description: Represents a user login profile in Device Management. - foreign_key: - entity: login_profile - group: Accounts - properties: - - _key: id - _override: true - api_fieldname: id - description: ID of the identity provider. - entity_fieldname: id - readOnly: false - type: string - - _key: name - _override: true - api_fieldname: name - description: Name of the identity provider. - entity_fieldname: name - readOnly: false - type: string - - _key: type - api_fieldname: type - description: Identity provider type. - entity_fieldname: type - enum: - - NATIVE - - MBED - - SAML2 - - OIDC - readOnly: true - type: string - required: - - id - type: object - type: array - x-nullable: true - - _key: object - description: 'Entity name: always `user`.' - enum: - - user - type: string - - _key: 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 - - _key: password_changed_time - description: A timestamp of the latest change of the user password, - in milliseconds. - example: 1518630727688 - format: int64 - type: integer - - _key: phone_number - description: Phone number. - example: +44 (1223) 400 400 - maxLength: 100 + x_filter: {} + - _key: update + additional_operations: + - 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 + in PNG or JPEG format. + + Note: This endpoint is restricted to administrators.' + drop_fields: + - object + - etag + - type + - filter + - static_uri + - updated_at + field_renames: [] + fields: + - _key: image + api_fieldname: image + description: The image in PNG or JPEG format as multipart form data. + entity_fieldname: image + external_param: true + in: stream + name: image + parameter_fieldname: image + required: true + type: file + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + entity_fieldname: reference + enum: *id003 + enum_reference: dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: post + mode: update + operation_id: uploadDarkImageMultipart + pagination: false + path: /v3/branding-images/dark/{reference}/upload-multipart + request_body: file + request_content_type: multipart/form-data + responses: + - _key: '201' + description: Image uploaded successfully. + headers: + - _key: Content-Location + description: Location of the image metadata. + type: string + - _key: Location + description: Location of the image binary. + type: string + schema: + foreign_key: + entity: subtenant_light_theme_image + group: Branding + properties: + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_image''' + entity_fieldname: object + enum: + - branding_image + readOnly: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + 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 + is_primary_key: true + type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + type: object + - _key: '400' + description: Error in input data format, for example, image is 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 - x-nullable: true - - _key: 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 + - _key: name + description: Name of the field which caused the error. type: string - - _key: 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 - - _key: updated_at - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time + 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: username - description: A username. - example: admin - pattern: '[\w\-,._@+=]{4,30}' + - _key: name + description: Name of the field which caused the error. type: string - x-nullable: true required: - - account_id - - email - - etag - - id - - object - - status + - name + - message 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 - default: 50 - description: The number of results to return (2-1000). Default 50. - entity_fieldname: limit - example: 50 - external_param: true + - _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 - in: query - name: limit - parameter_fieldname: limit - required: false 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 - api_fieldname: object - description: 'Entity name: always `list`.' - entity_fieldname: object + description: Entity name, always `error`. enum: - - list + - error type: string - - _key: order - api_fieldname: order - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - entity_fieldname: order - enum: - - ASC - - DESC - enum_reference: user_order_enum - external_param: true - in: query - name: order - parameter_fieldname: order - required: false + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: total_count - api_fieldname: total_count - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 + - _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: Unknown image reference. + 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: - - data - - has_more - - limit + - code + - message - object - - total_count + - request_id + - type type: object - - _key: '401' - description: Authentication failure. + return_info: + custom: false + self: true + type: dark_theme_image + return_type: dark_theme_image + summary: Upload a dark theme image. + x_deprecation: null + x_filter: {} + primary_key_field: reference + swagger_models: + - BrandingImage + - BrandingImageList + tags: + - User interface configuration - images +- _key: developer_certificate + field_renames: + - _key: certificate + api_fieldname: developer_certificate + fields: + - _key: account_id + api_fieldname: account_id + description: Account to which the developer certificate belongs. + readOnly: true + required: false + type: string + - _key: certificate + api_fieldname: developer_certificate + description: PEM-format X.509 developer certificate. + readOnly: true + required: false + type: string + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + format: date-time + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + description: Description for the developer certificate. + readOnly: false + required: false + type: string + x-nullable: true + - _key: developer_private_key + api_fieldname: developer_private_key + description: PEM-format developer private key associated with the certificate. + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: ID that uniquely identifies the developer certificate. + in: path + parameter_fieldname: developerCertificateId + readOnly: false + required: true + type: string + - _key: name + api_fieldname: name + description: Name of the developer certificate. + readOnly: false + required: true + type: string + - _key: security_file_content + api_fieldname: security_file_content + description: Content of the `security.c` file flashed to the device to provide + security credentials. + readOnly: true + required: false + type: string + group_id: Security + methods: + - _key: create + description: '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://www.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 " \ + + -H "content-type: application/json" \ + + -d { "name": "", "description": "" + } + + ```' + drop_fields: + - object + - etag + - type + - filter + - id + - created_at + - account_id + - developer_private_key + - security_file_content + - certificate + field_renames: + - _key: certificate + api_fieldname: developer_certificate + fields: + - _key: description + api_fieldname: description + description: Description for the developer certificate. + entity_fieldname: description + in: body + parameter_fieldname: description + required: false + type: string + x-nullable: true + - _key: name + api_fieldname: name + description: Name of the developer certificate. + entity_fieldname: name + in: body + parameter_fieldname: name + required: true + type: string + group_id: Security + method: post + mode: create + operation_id: createDeveloperCertificate + pagination: false + parameter_map: + developerCertificateId: id + path: /v3/developer-certificates + request_body: json + request_content_type: application/json + responses: + - _key: '201' + description: Developer certificate created successfully. + examples: + - _key: Success + account_id: 015fee5d9b3538c98640fbfb00000000 + created_at: '2017-12-11T14:22:20.009Z' + 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' + etag: '1' + id: 015fee4431fd38c98640fbfb00000000 + name: DeveloperCertificate + object: trusted-cert + 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' schema: + foreign_key: + entity: subtenant_trusted_certificate + group: Security 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 + - _key: account_id + api_fieldname: account_id + description: Account to which the developer certificate belongs. + entity_fieldname: account_id type: string - - _key: object - description: Entity name, always `error`. - enum: - - error + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + format: date-time type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + - _key: description + api_fieldname: description + description: Description for the developer certificate. + entity_fieldname: description type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + x-nullable: true + - _key: developer_certificate + api_fieldname: developer_certificate + description: PEM-format X.509 developer certificate. + entity_fieldname: certificate + type: string + - _key: developer_private_key + api_fieldname: developer_private_key + description: PEM-format developer private key associated with the certificate. + entity_fieldname: developer_private_key + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + type: string + - _key: id + api_fieldname: id + description: ID that uniquely identifies the developer certificate. + entity_fieldname: id + in: path + parameter_fieldname: developerCertificateId + required: true + type: string + - _key: name + api_fieldname: name + description: Name of the developer certificate. + entity_fieldname: name + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always `trusted-cert`.' + entity_fieldname: object + type: string + - _key: security_file_content + api_fieldname: security_file_content + description: Content of the `security.c` file flashed to the device to provide + security credentials. + entity_fieldname: security_file_content type: string - required: - - code - - message - - object - - request_id - - type type: object - - _key: '403' - description: Forbidden. + - _key: '400' + description: Bad request. + examples: + - _key: Bad Request Error + code: 400 + fields: + message: Missing certificate name. + name: name + message: Bad Request. Missing certificate name. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: validation_error schema: properties: - _key: code @@ -9414,8 +22351,15 @@ entities: - request_id - type type: object - - _key: '404' - description: An account with the given ID does not exist. + - _key: '401' + description: Invalid access token. + examples: + - _key: Authentication Error + code: 401 + message: Invalid access token. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: invalid_auth schema: properties: - _key: code @@ -9462,360 +22406,180 @@ entities: - request_id - type type: object - return_info: - custom: false - self: false - type: subtenant_user - return_type: paginated_response(subtenant_user) - summary: Get the details of all users. - x_deprecation: null - x_filter: - email: - - eq - login_profiles: - - eq - status: - - eq - - in - - nin - primary_key_field: id - swagger_models: - - AccountCreationReq - - AccountInfo - - AccountInfoList - - AccountUpdateRootReq - - ApiKeyInfoRespList - - BrandingColorList - - BrandingImageList - - TrustedCertificateRespList - - UserInfoRespList - - UserInvitationRespList - 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 -- _key: active_session - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: The UUID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - readOnly: true - required: false - type: string - - _key: ip_address - api_fieldname: ip_address - description: IP address of the client. - example: 127.0.0.1 - readOnly: true - required: false - type: string - - _key: login_time - api_fieldname: login_time - description: The login time of the user. - example: '2018-02-14T17:52:07Z' - format: date-time - readOnly: true - required: false - type: string - - _key: reference_token - api_fieldname: reference_token - description: The reference token. - example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk - readOnly: true - required: false - type: string - - _key: user_agent - api_fieldname: 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 - readOnly: true - required: false - type: string - group_id: Accounts - methods: [] - primary_key_field: null - swagger_models: - - ActiveSession - tags: [] -- _key: api_key - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - readOnly: true - required: false - type: string - - _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: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 - readOnly: true - required: false - type: integer - - _key: id - api_fieldname: id - description: The ID of the API key. - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - readOnly: false - required: true - type: string - - _key: key - api_fieldname: key - description: The API key. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - readOnly: true - required: false - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - example: 1518630727688 - format: int64 - readOnly: true - required: false - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - example: API key gorgon - maxLength: 100 - readOnly: false - required: true - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - readOnly: false - required: false - type: string - - _key: status - api_fieldname: status - description: The status of the API key. - enum: - - ACTIVE - - INACTIVE - enum_reference: api_key_status_enum - example: ACTIVE - readOnly: false - 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: - - _key: create - description: 'Create a new API key. + - _key: '403' + description: The maximum number of developer certificates for the given account + has already been reached. + examples: + - _key: Account Limit Exceeded Error + code: 403 + fields: + message: '10' + name: cert-count + message: Forbidden. Limit for the number of certificates exceeded. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: account_limit_exceeded + 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: Certificate with the given name already exists. + examples: + - _key: Duplicate Error + code: 409 + fields: + message: Certificate already exists. + name: certificate + message: Conflict. Certificate already exists. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: duplicate + 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: developer_certificate + return_type: developer_certificate + summary: Create a new developer certificate to connect to the bootstrap server. + x_deprecation: null + x_filter: {} + - _key: delete + description: 'Delete a trusted certificate. **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/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - id - - created_at - - updated_at - - key - - creation_time - - last_login_time - - account_id - field_renames: [] + field_renames: + - _key: certificate + api_fieldname: developer_certificate fields: - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - in: body - maxLength: 100 - parameter_fieldname: name + - _key: id + api_fieldname: cert_id + description: The ID of the trusted certificate to delete. + entity_fieldname: id + external_param: false + in: path + name: cert_id + parameter_fieldname: cert_id required: true type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 - in: body - parameter_fieldname: owner - pattern: '[a-f0-9]{32}' - required: false - type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: &id001 - - ACTIVE - - INACTIVE - enum_reference: api_key_status_enum - example: ACTIVE - in: body - parameter_fieldname: status - required: false - type: string - group_id: Accounts - method: post - mode: create - operation_id: createApiKey + group_id: Security + method: delete + mode: delete + operation_id: deleteCertificate pagination: false parameter_map: - apikey_id: id - path: /v3/api-keys + cert_id: id + developerCertificateId: id + path: /v3/trusted-certificates/{cert_id} request_body: json request_content_type: application/json responses: - - _key: '201' - description: New entity created. - schema: - description: Represents an API key in Device Management. - foreign_key: - entity: subtenant_api_key - group: Accounts - properties: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _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 - type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 - type: integer - - _key: etag - api_fieldname: etag - description: API resource entity version. - entity_fieldname: etag - example: '1' - type: string - - _key: groups - api_fieldname: groups - description: A list of group IDs this API key belongs to. - entity_fieldname: groups - items: - type: string - type: array - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - maxLength: 100 - type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''api-key''' - entity_fieldname: object - enum: - - api-key - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: - - ACTIVE - - INACTIVE - example: ACTIVE - 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 - required: - - etag - - id - - key - - name - - object - type: object - - _key: '400' - description: Error in input data, for example, missing display name. + - _key: '204' + description: Deleted successfully. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -9862,8 +22626,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Authentication failure. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -9910,8 +22674,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: A certificate not found. schema: properties: - _key: code @@ -9952,64 +22716,244 @@ entities: example: validation_error type: string required: - - code - - message + - code + - message + - object + - request_id + - type + type: object + return_info: + custom: false + self: true + type: developer_certificate + return_type: developer_certificate + summary: Delete a trusted certificate by ID. + x_deprecation: null + x_filter: {} + - _key: get_trusted_certificate_info + description: 'Retrieve a trusted certificate. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - 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 + field_renames: + - _key: certificate + api_fieldname: developer_certificate + fields: + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: cert_id + pattern: '[a-f0-9]{32}' + required: true + type: string + foreign_key: + entity: trusted_certificate + group: Security + group_id: Security + method: get + mode: get_trusted_certificate_info + operation_id: getCertificate + pagination: false + parameter_map: + cert_id: id + developerCertificateId: id + path: /v3/trusted-certificates/{cert_id} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + description: Represents a trusted certificate in responses. + foreign_key: + entity: developer_certificate + group: Security + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: certificate + api_fieldname: certificate + description: X509.v3 trusted certificate in PEM format. + entity_fieldname: certificate + example: '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----' + type: string + - _key: certificate_fingerprint + api_fieldname: certificate_fingerprint + description: A SHA-256 fingerprint of the certificate. + entity_fieldname: certificate_fingerprint + example: a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1 + type: string + - _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 + type: string + - _key: description + api_fieldname: description + description: Human readable description of this certificate. + entity_fieldname: description + example: Certificate created by me. + maxLength: 500 + type: string + x-nullable: true + - _key: device_execution_mode + api_fieldname: device_execution_mode + description: Device execution mode where 1 means a developer certificate. + entity_fieldname: device_execution_mode + example: 1 + format: int32 + type: integer + - _key: enrollment_mode + api_fieldname: enrollment_mode + 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. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: issuer + api_fieldname: issuer + description: Issuer of the certificate. + entity_fieldname: issuer + example: CN=issuer + type: string + - _key: name + api_fieldname: name + description: Certificate name. + entity_fieldname: name + example: My certificate + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''trusted-cert''' + entity_fieldname: object + enum: + - trusted-cert + type: string + - _key: owner_id + api_fieldname: owner_id + description: The ID of the owner. + entity_fieldname: owner_id + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + x-nullable: true + - _key: service + api_fieldname: service + description: Service name where the certificate is used. + entity_fieldname: service + enum: + - lwm2m + - bootstrap + type: string + - _key: status + api_fieldname: status + description: Status of the certificate. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + type: string + - _key: subject + api_fieldname: subject + description: Subject of the certificate. + entity_fieldname: subject + example: CN=subject + 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: valid + api_fieldname: valid + description: This read-only flag indicates whether the certificate is valid + or not. + entity_fieldname: valid + example: true + readOnly: true + type: boolean + - _key: validity + api_fieldname: validity + description: Expiration time in UTC formatted as RFC3339. + entity_fieldname: validity + example: '2038-02-14T15:24:14Z' + format: date-time + type: string + required: + - account_id + - certificate + - certificate_fingerprint + - etag + - id + - issuer + - name - object - - request_id - - type + - service + - subject + - validity type: object - return_info: - custom: false - self: true - type: api_key - return_type: api_key - summary: Create a new API key. - x_deprecation: null - x_filter: {} - - _key: delete - description: 'Delete the API key. - - - **Example:** - - ``` - - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - - -H ''Authorization: Bearer '' - - ```' - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: [] - fields: - - _key: id - api_fieldname: apikey_id - description: The ID of the API key to delete. - entity_fieldname: id - external_param: false - in: path - name: apikey_id - parameter_fieldname: apikey_id - required: true - type: string - group_id: Accounts - method: delete - mode: delete - operation_id: deleteApiKey - pagination: false - parameter_map: - apikey_id: id - path: /v3/api-keys/{apikey_id} - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Deleted successfully. - _key: '401' description: Authentication failure. schema: @@ -10107,7 +23051,7 @@ entities: - type type: object - _key: '404' - description: The API key with the specified ID does not exist. + description: A certificate not found. schema: properties: - _key: code @@ -10156,249 +23100,380 @@ entities: type: object return_info: custom: false - self: true - type: api_key - return_type: api_key - summary: Delete API key. + self: false + type: trusted_certificate + return_type: trusted_certificate + summary: Get a trusted certificate. + unaggregated: true x_deprecation: null x_filter: {} - - _key: list - description: 'Retrieve API keys in an array, optionally filtered by the owner. + - _key: read + description: 'Return an existing developer certificate (a certificate that can + be flashed to multiple devices to connect to bootstrap server). **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys \ + curl -X GET http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID + \ - -H ''Authorization: Bearer '' + -H "Authorization: Bearer " ```' drop_fields: - object - etag - type - - groups - filter - - total_count - - has_more - - data - - key__eq - - owner__eq - field_renames: [] + - created_at + - account_id + - name + - description + - developer_private_key + - security_file_content + - certificate + field_renames: + - _key: certificate + api_fieldname: developer_certificate fields: - - _key: after - api_fieldname: after - description: The entity ID to fetch 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: 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 - 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: order - api_fieldname: order - default: ASC - description: 'Record order based on creation time. Acceptable values: ASC, DESC. - Default: ASC.' - entity_fieldname: order - enum: - - ASC - - DESC - enum_reference: api_key_order_enum - external_param: true - in: query - name: order - parameter_fieldname: order - required: false + - _key: id + api_fieldname: id + description: ID that uniquely identifies the developer certificate. + entity_fieldname: id + in: path + parameter_fieldname: developerCertificateId + required: true type: string - foreign_key: - entity: api_key - group: Accounts - foreign_key_priority: self - group_id: Accounts + group_id: Security method: get - mode: list - operation_id: getAllApiKeys - pagination: true + mode: read + operation_id: getDeveloperCertificate + pagination: false parameter_map: - apikey_id: id - path: /v3/api-keys + developerCertificateId: id + path: /v3/developer-certificates/{developerCertificateId} request_body: json request_content_type: application/json responses: - _key: '200' - description: Successful operation. + description: Developer certificate returned successfully. + examples: + - _key: Success + account_id: 015fee5d9b3538c98640fbfb00000000 + created_at: '2017-12-11T14:22:20.009Z' + 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' + etag: '1' + id: 015fee4431fd38c98640fbfb00000000 + name: DeveloperCertificate + object: trusted-cert + 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' schema: foreign_key: - entity: api_key - group: Accounts - pagination: true + entity: developer_certificate + group: Security 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}' + - _key: account_id + api_fieldname: account_id + description: Account to which the developer certificate belongs. + entity_fieldname: account_id type: string - - _key: data - api_fieldname: data - description: A list of entities. - entity_fieldname: data - items: - description: Represents an API key in Device Management. - foreign_key: - entity: api_key - group: Accounts - properties: - - _key: account_id - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: created_at - description: Creation UTC time RFC3339. - example: '2018-02-13T09:35:20Z' - format: date-time - type: string - - _key: creation_time - description: The timestamp of the API key creation in the storage, in - milliseconds. - example: 1518630727683 - format: int64 - type: integer - - _key: etag - description: API resource entity version. - example: '1' - type: string - - _key: groups - description: A list of group IDs this API key belongs to. - items: - type: string - type: array - - _key: id - description: The ID of the API key. - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: key - description: The API key. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - example: 1518630727688 - format: int64 - type: integer - - _key: name - description: The display name for the API key. - example: API key gorgon - maxLength: 100 - type: string - - _key: object - description: 'Entity name: always ''api-key''' - enum: - - api-key - type: string - - _key: owner - description: The owner of this API key, who is the creator by default. - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: status - description: The status of the API key. - enum: - - ACTIVE - - INACTIVE - example: ACTIVE + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + format: date-time + type: string + - _key: description + api_fieldname: description + description: Description for the developer certificate. + entity_fieldname: description + type: string + x-nullable: true + - _key: developer_certificate + api_fieldname: developer_certificate + description: PEM-format X.509 developer certificate. + entity_fieldname: developer_certificate + type: string + - _key: developer_private_key + api_fieldname: developer_private_key + description: PEM-format developer private key associated with the certificate. + entity_fieldname: developer_private_key + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + type: string + - _key: id + api_fieldname: id + description: ID that uniquely identifies the developer certificate. + entity_fieldname: id + type: string + - _key: name + api_fieldname: name + description: Name of the developer certificate. + entity_fieldname: name + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always `trusted-cert`.' + entity_fieldname: object + type: string + - _key: security_file_content + api_fieldname: security_file_content + description: Content of the `security.c` file flashed to the device to provide + security credentials. + entity_fieldname: security_file_content + type: string + type: object + - _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: updated_at - description: Last update UTC time RFC3339. - example: '2018-02-14T15:24:14Z' - format: date-time + - _key: name + description: Name of the field which caused the error. type: string required: - - etag - - id - - key - name - - object + - message 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: message + description: A human readable informative explanation + example: Validation error + type: string - _key: object - api_fieldname: object - description: 'Entity name: always `list`.' - entity_fieldname: object + description: Entity name, always `error`. enum: - - list + - error 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 + - _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 - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer required: - - data - - has_more - - limit + - code + - message - object - - total_count + - request_id + - type type: object - _key: '401' - description: Authentication failure. + description: Invalid access token. + examples: + - _key: Authentication Error + code: 401 + message: Invalid access token. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: invalid_auth schema: properties: - _key: code @@ -10445,8 +23520,15 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: Developer certificate not found with given ID. + examples: + - _key: Authentication Error + code: 404 + message: 'Not Found. Not found: 016006724ff53ade90ed948d03c00001' + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: not_found schema: properties: - _key: code @@ -10496,167 +23578,509 @@ entities: return_info: custom: false self: true - type: api_key - return_type: paginated_response(api_key) - summary: Get all API keys. + type: developer_certificate + return_type: developer_certificate + summary: Fetch an existing developer certificate to connect to the bootstrap server. x_deprecation: null - x_filter: - key: - - eq - owner: - - eq - - _key: me - description: 'Retrieve API key details. + x_filter: {} + primary_key_field: id + swagger_models: + - DeveloperCertificateRequestData + - DeveloperCertificateResponseData + - TrustedCertificateResp + tags: + - Security and identity - developer class certificates + - Security and identity - certificates +- _key: device + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the associated account. + example: '00000000000000000000000000000000' + readOnly: true + required: false + type: string + - _key: auto_update + api_fieldname: auto_update + description: 'DEPRECATED: Mark this device for automatic firmware update.' + readOnly: false + required: false + type: boolean + - _key: bootstrap_expiration_date + api_fieldname: bootstrap_expiration_date + description: The expiration date of the certificate used to connect to bootstrap + server. + format: date + readOnly: false + required: false + type: string + x-nullable: true + - _key: bootstrapped_timestamp + api_fieldname: bootstrapped_timestamp + description: The timestamp of the device's most recent bootstrap process. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: ca_id + api_fieldname: ca_id + description: The certificate issuer's ID. + example: '00000000000000000000000000000000' + maxLength: 500 + 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. + format: date + readOnly: false + required: false + type: string + x-nullable: true + - _key: created_at + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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 + readOnly: false + required: false + type: object + - _key: deployed_state + api_fieldname: deployed_state + description: 'DEPRECATED: The state of the device''s deployment.' + enum: + - development + - production + enum_reference: device_deployed_state_enum + readOnly: true + required: false + type: string + - _key: deployment + api_fieldname: deployment + description: 'DEPRECATED: The last deployment used on the device.' + example: '' + readOnly: false + required: false + type: string + - _key: description + api_fieldname: description + description: The description of the device. + example: Temperature measuring device + maxLength: 2000 + readOnly: false + required: false + type: string + - _key: device_class + api_fieldname: device_class + description: An ID representing the model and hardware revision of the device. + example: '' + maxLength: 32 + readOnly: false + required: false + type: string + - _key: device_execution_mode + api_fieldname: device_execution_mode + 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 + readOnly: false + required: false + type: integer + - _key: device_key + api_fieldname: 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 + readOnly: false + required: false + type: string + - _key: endpoint_name + api_fieldname: 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 + required: false + type: string + - _key: endpoint_type + api_fieldname: endpoint_type + description: The endpoint type of the device. For example, the device is a gateway. + example: '' + maxLength: 64 + readOnly: false + required: false + type: string + - _key: enrolment_list_timestamp + api_fieldname: enrolment_list_timestamp + description: The claim date/time. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: firmware_checksum + api_fieldname: firmware_checksum + description: The SHA256 checksum of the current firmware image. + example: '0000000000000000000000000000000000000000000000000000000000000000' + readOnly: true + required: false + type: string + - _key: groups + api_fieldname: groups + description: An array containing an ID of each group this device belongs to. + items: + example: '00000000000000000000000000000000' + type: string + readOnly: true + required: false + type: array + - _key: host_gateway + api_fieldname: host_gateway + description: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. + example: '' + readOnly: false + required: false + type: string + - _key: id + api_fieldname: id + description: The ID of the device. The device ID is used across all Device Management + APIs. + example: '00000000000000000000000000000000' + readOnly: false + required: true + type: string + - _key: issuer_fingerprint + api_fieldname: issuer_fingerprint + description: SHA256 fingerprint of the certificate used to validate the signature + of the device certificate. + example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 + pattern: '[A-Fa-f0-9]{64}' + readOnly: false + required: false + type: string + x-nullable: true + - _key: last_operator_suspended_category + api_fieldname: last_operator_suspended_category + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' + readOnly: true + required: false + type: string + - _key: last_operator_suspended_description + api_fieldname: last_operator_suspended_description + description: The most recent description why the device was suspended or returned + to service. + example: Suspended for maintenance. + maxLength: 2000 + readOnly: true + required: false + type: string + - _key: last_operator_suspended_updated_at + api_fieldname: last_operator_suspended_updated_at + description: The timestamp of the most recent suspension activity. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: last_system_suspended_category + api_fieldname: last_system_suspended_category + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' + readOnly: true + required: false + type: string + - _key: last_system_suspended_description + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: last_system_suspended_updated_at + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: lifecycle_status + api_fieldname: lifecycle_status + description: 'The lifecycle status of the device. + * Enabled: The device is allowed to connect to Pelion Device Management. - **Example:** + * Blocked: The device is prevented from connecting to Pelion Device Management. + Device can be, for example, ''suspended''.' + enum: + - enabled + - blocked + enum_reference: device_lifecycle_status_enum + example: enabled + readOnly: true + required: false + type: string + - _key: manifest + api_fieldname: manifest + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' + readOnly: false + required: false + type: string + - _key: manifest_timestamp + api_fieldname: manifest_timestamp + description: The timestamp of the current manifest version. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: mechanism + api_fieldname: mechanism + description: 'NOT USED: The ID of the channel used to communicate with the device.' + enum: + - connector + - direct + enum_reference: device_mechanism_enum + readOnly: false + required: false + type: string + - _key: mechanism_url + api_fieldname: mechanism_url + 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 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: Device has been suspended by operator. + readOnly: true + required: false + type: boolean + - _key: serial_number + api_fieldname: serial_number + description: The [serial number](https://www.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. - ``` + * Unenrolled: The device has been created, but has not yet bootstrapped or connected + to Device Management. - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/me \ + * 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. - -H ''Authorization: Bearer '' + * 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://www.pelion.com/docs/device-management-api/connect/) can be + queued. The device sends events for [subscribed](https://www.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 + enum_reference: device_state_enum + readOnly: false + required: false + type: string + - _key: system_suspended + api_fieldname: system_suspended + description: Is the device suspended by the system? + readOnly: true + required: false + type: boolean + - _key: updated_at + api_fieldname: updated_at + description: The time this data object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: vendor_id + api_fieldname: vendor_id + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 + readOnly: false + required: false + type: string + group_id: Devices + methods: + - _key: add_to_group + description: Add one device to a group. A device can be in multiple groups. drop_fields: - object - etag - type - - groups - filter - - id - - created_at - - updated_at - - key - - name - - owner - - status - - creation_time - - last_login_time - - account_id field_renames: [] - fields: [] - group_id: Accounts - method: get - mode: me - notes: This is provided by the SDK to avoid listing to retrieve the user's own - API Key. - operation_id: getMyApiKey + fields: + - _key: device-group-id + api_fieldname: device-group-id + description: The ID of the group. + entity_fieldname: device-group-id + external_param: true + in: path + name: device-group-id + parameter_fieldname: device-group-id + required: true + type: string + - _key: id + api_fieldname: device_id + entity_fieldname: id + example: '00000000000000000000000000000000' + external_param: false + in: body + name: device_id + parameter_fieldname: device_id + required: true + schema_param: true + type: string + group_id: Devices + method: post + mode: add_to_group + operation_id: Group_members_add pagination: false parameter_map: - apikey_id: id - path: /v3/api-keys/me + device_id: id + path: /v3/device-groups/{device-group-id}/devices/add/ request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. + - _key: '204' + description: Success - device added. + - _key: '400' + description: Bad request. schema: - description: Represents an API key in Device Management. - foreign_key: - entity: subtenant_api_key - group: Accounts - properties: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _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 - type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 type: integer - - _key: etag - api_fieldname: etag - description: API resource entity version. - entity_fieldname: etag - example: '1' - type: string - - _key: groups - api_fieldname: groups - description: A list of group IDs this API key belongs to. - entity_fieldname: groups + - _key: fields + description: Request fields which failed validation. items: - type: string + 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: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - maxLength: 100 + - _key: message + description: A human readable informative explanation + example: Validation error type: string - _key: object - api_fieldname: object - description: 'Entity name: always ''api-key''' - entity_fieldname: object + description: Entity name, always `error`. enum: - - api-key - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' + - error type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: - - ACTIVE - - INACTIVE - example: ACTIVE + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 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 + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string required: - - etag - - id - - key - - name + - code + - message - object + - request_id + - type type: object - _key: '401' - description: Authentication failure. + description: Unauthorized. schema: properties: - _key: code @@ -10703,8 +24127,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: Not found. schema: properties: - _key: code @@ -10752,1395 +24176,2066 @@ entities: - type type: object return_info: - custom: false - self: true - type: api_key - return_type: api_key - summary: Get API key details. + custom: true + self: false + type: void + return_type: void + spec: + return_type: void + summary: Add a device to a group. x_deprecation: null x_filter: {} - - _key: read - description: 'Retrieve API key details. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ - - -H ''Authorization: Bearer '' - - ```' + - _key: create + 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 - type - - groups - 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 + - component_attributes - created_at + - deployed_state + - id + - firmware_checksum + - manifest_timestamp + - net_id - updated_at - - key - - name - - owner - - status - - creation_time - - last_login_time - - account_id + - enrolment_list_timestamp field_renames: [] fields: - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' - required: true + - _key: auto_update + api_fieldname: auto_update + description: 'DEPRECATED: Mark this device for automatic firmware update.' + entity_fieldname: auto_update + in: body + parameter_fieldname: auto_update + required: false + type: boolean + - _key: bootstrap_expiration_date + api_fieldname: bootstrap_expiration_date + description: The expiration date of the certificate used to connect to bootstrap + server. + entity_fieldname: bootstrap_expiration_date + format: date + in: body + parameter_fieldname: bootstrap_expiration_date + required: false type: string - group_id: Accounts - method: get - mode: read - operation_id: getApiKey + x-nullable: true + - _key: ca_id + api_fieldname: ca_id + description: The certificate issuer's ID. + entity_fieldname: ca_id + example: '00000000000000000000000000000000' + in: body + maxLength: 500 + parameter_fieldname: ca_id + required: false + type: string + - _key: connector_expiration_date + api_fieldname: connector_expiration_date + description: The expiration date of the certificate used to connect to LwM2M + server. + entity_fieldname: connector_expiration_date + format: date + in: body + parameter_fieldname: connector_expiration_date + required: false + type: string + x-nullable: true + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + in: body + maxProperties: 5 + parameter_fieldname: custom_attributes + required: false + type: object + - _key: deployment + api_fieldname: deployment + description: 'DEPRECATED: The last deployment used on the device.' + entity_fieldname: deployment + example: '' + in: body + parameter_fieldname: deployment + required: false + type: string + - _key: description + api_fieldname: description + description: The description of the device. + entity_fieldname: description + example: Temperature measuring device + in: body + maxLength: 2000 + parameter_fieldname: description + required: false + type: string + - _key: device_class + api_fieldname: device_class + description: An ID representing the model and hardware revision of the device. + entity_fieldname: device_class + example: '' + in: body + maxLength: 32 + parameter_fieldname: device_class + required: false + type: string + - _key: device_execution_mode + api_fieldname: device_execution_mode + 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." + entity_fieldname: device_execution_mode + enum: + - 0 + - 1 + - 5 + example: 0 + in: body + parameter_fieldname: device_execution_mode + required: false + type: integer + - _key: device_key + api_fieldname: device_key + description: The fingerprint of the device certificate. + entity_fieldname: device_key + 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 + in: body + maxLength: 512 + parameter_fieldname: device_key + required: false + type: string + - _key: endpoint_name + api_fieldname: endpoint_name + 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 + parameter_fieldname: endpoint_name + readOnly: true + required: false + type: string + - _key: endpoint_type + api_fieldname: endpoint_type + description: The endpoint type of the device. For example, the device is a gateway. + entity_fieldname: endpoint_type + example: '' + in: body + maxLength: 64 + parameter_fieldname: endpoint_type + required: false + type: string + - _key: host_gateway + api_fieldname: host_gateway + 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 + parameter_fieldname: host_gateway + required: false + type: string + - _key: issuer_fingerprint + api_fieldname: issuer_fingerprint + description: SHA256 fingerprint of the certificate used to validate the signature + of the device certificate. + entity_fieldname: issuer_fingerprint + example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 + in: body + parameter_fieldname: issuer_fingerprint + pattern: '[A-Fa-f0-9]{64}' + required: false + type: string + x-nullable: true + - _key: manifest + api_fieldname: manifest + description: 'DEPRECATED: The URL for the current device manifest.' + entity_fieldname: manifest + example: '' + in: body + parameter_fieldname: manifest + required: false + type: string + - _key: mechanism + api_fieldname: mechanism + description: 'NOT USED: The ID of the channel used to communicate with the device.' + entity_fieldname: mechanism + enum: + - connector + - direct + enum_reference: device_mechanism_enum + in: body + parameter_fieldname: mechanism + required: false + type: string + - _key: mechanism_url + api_fieldname: mechanism_url + description: 'NOT USED: The address of the connector to use.' + entity_fieldname: mechanism_url + example: '' + in: body + parameter_fieldname: mechanism_url + required: false + type: string + - _key: name + api_fieldname: name + 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 + maxLength: 128 + parameter_fieldname: name + required: false + type: string + - _key: serial_number + api_fieldname: serial_number + description: The [serial number](https://www.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 + parameter_fieldname: serial_number + required: false + type: string + - _key: state + api_fieldname: 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://www.pelion.com/docs/device-management-api/connect/) can + be queued. The device sends events for [subscribed](https://www.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 + - cloud_enrolling + - bootstrapped + - registered + - deregistered + enum_reference: device_state_enum + in: body + parameter_fieldname: state + required: false + type: string + - _key: vendor_id + api_fieldname: vendor_id + description: The device vendor ID. + entity_fieldname: vendor_id + example: 00000000-0000-0000-0000-000000000000 + in: body + parameter_fieldname: vendor_id + required: false + type: string + group_id: Devices + method: post + mode: create + operation_id: Device_create pagination: false - parameter_map: - apikey_id: id - path: /v3/api-keys/{apikey_id} + path: /v3/devices/ request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. + - _key: '201' + description: Device created. schema: - description: Represents an API key in Device Management. - foreign_key: - entity: subtenant_api_key - group: Accounts - properties: - - _key: account_id + - _key: foreign_key + entity: device + group: Devices + - _key: properties + account_id: api_fieldname: account_id - description: The ID of the account. + description: The ID of the associated account. entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' + example: '00000000000000000000000000000000' + type: string + auto_update: + api_fieldname: auto_update + description: 'DEPRECATED: Mark this device for automatic firmware update.' + entity_fieldname: auto_update + type: boolean + bootstrap_expiration_date: + api_fieldname: bootstrap_expiration_date + description: The expiration date of the certificate used to connect to bootstrap + server. + entity_fieldname: bootstrap_expiration_date + format: date + type: string + x-nullable: true + bootstrapped_timestamp: + api_fieldname: bootstrapped_timestamp + description: The timestamp of the device's most recent bootstrap process. + entity_fieldname: bootstrapped_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + ca_id: + api_fieldname: ca_id + description: The certificate issuer's ID. + entity_fieldname: ca_id + 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 + server. + entity_fieldname: connector_expiration_date + format: date + type: string + x-nullable: true + created_at: + api_fieldname: created_at + description: The timestamp of when the device was created in the device + directory. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + custom_attributes: + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + maxProperties: 5 + type: object + deployed_state: + api_fieldname: deployed_state + description: 'DEPRECATED: The state of the device''s deployment.' + entity_fieldname: deployed_state + enum: + - development + - production + type: string + deployment: + api_fieldname: deployment + description: 'DEPRECATED: The last deployment used on the device.' + entity_fieldname: deployment + example: '' + type: string + description: + api_fieldname: description + description: The description of the device. + entity_fieldname: description + example: Temperature measuring device + maxLength: 2000 + type: string + device_class: + api_fieldname: device_class + description: An ID representing the model and hardware revision of the device. + entity_fieldname: device_class + example: '' + maxLength: 32 + type: string + device_execution_mode: + api_fieldname: device_execution_mode + 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." + entity_fieldname: device_execution_mode + enum: + - 0 + - 1 + - 5 + example: 0 + type: integer + device_key: + api_fieldname: device_key + description: The fingerprint of the device certificate. + entity_fieldname: device_key + 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 - - _key: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - entity_fieldname: created_at - example: '2018-02-13T09:35:20Z' + endpoint_name: + api_fieldname: endpoint_name + 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 + type: string + endpoint_type: + api_fieldname: endpoint_type + description: The endpoint type of the device. For example, the device is + a gateway. + entity_fieldname: endpoint_type + example: '' + maxLength: 64 + type: string + enrolment_list_timestamp: + api_fieldname: enrolment_list_timestamp + description: The claim date/time. + entity_fieldname: enrolment_list_timestamp + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 - type: integer - - _key: etag + etag: api_fieldname: etag - description: API resource entity version. + description: The entity instance signature. entity_fieldname: etag - example: '1' + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: groups + firmware_checksum: + api_fieldname: firmware_checksum + description: The SHA256 checksum of the current firmware image. + entity_fieldname: firmware_checksum + example: '0000000000000000000000000000000000000000000000000000000000000000' + type: string + groups: api_fieldname: groups - description: A list of group IDs this API key belongs to. + description: An array containing an ID of each group this device belongs + to. entity_fieldname: groups items: + example: '00000000000000000000000000000000' type: string type: array - - _key: id + host_gateway: + api_fieldname: host_gateway + 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 + id: api_fieldname: id - description: The ID of the API key. + description: The ID of the device. The device ID is used across all Device + Management APIs. entity_fieldname: id - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + example: '00000000000000000000000000000000' type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - maxLength: 100 + issuer_fingerprint: + api_fieldname: issuer_fingerprint + description: SHA256 fingerprint of the certificate used to validate the + signature of the device certificate. + entity_fieldname: issuer_fingerprint + example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 + pattern: '[A-Fa-f0-9]{64}' type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''api-key''' - entity_fieldname: object - enum: - - api-key + x-nullable: true + last_operator_suspended_category: + api_fieldname: last_operator_suspended_category + description: The reference of the block category. + entity_fieldname: last_operator_suspended_category + example: maintenance + pattern: '[a-f0-9_]{32}' + type: string + last_operator_suspended_description: + api_fieldname: last_operator_suspended_description + description: The most recent description why the device was suspended or + returned to service. + entity_fieldname: last_operator_suspended_description + example: Suspended for maintenance. + maxLength: 2000 type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' + last_operator_suspended_updated_at: + api_fieldname: last_operator_suspended_updated_at + description: The timestamp of the most recent suspension activity. + entity_fieldname: last_operator_suspended_updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: - - ACTIVE - - INACTIVE - example: ACTIVE + last_system_suspended_category: + api_fieldname: last_system_suspended_category + description: The reference of the block category. + entity_fieldname: last_system_suspended_category + example: maintenance + pattern: '[a-f0-9_]{32}' + type: string + last_system_suspended_description: + api_fieldname: last_system_suspended_description + description: The most recent description of why the device was blocked or + unblocked by the system. + entity_fieldname: last_system_suspended_description + example: A certificate in the device's certificate chain was blacklisted + by the system. + maxLength: 2000 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' + last_system_suspended_updated_at: + api_fieldname: last_system_suspended_updated_at + description: The timestamp of the most recent system block activity. + entity_fieldname: last_system_suspended_updated_at + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - required: - - etag - - id - - key - - name - - object - 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`. + lifecycle_status: + api_fieldname: 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''.' + entity_fieldname: lifecycle_status enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + - enabled + - blocked + example: enabled type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + manifest: + api_fieldname: manifest + description: 'DEPRECATED: The URL for the current device manifest.' + entity_fieldname: manifest + example: '' 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 + manifest_timestamp: + api_fieldname: manifest_timestamp + description: The timestamp of the current manifest version. + entity_fieldname: manifest_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: object - description: Entity name, always `error`. + mechanism: + api_fieldname: mechanism + description: 'NOT USED: The ID of the channel used to communicate with the + device.' + entity_fieldname: mechanism enum: - - error + - connector + - direct type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + mechanism_url: + api_fieldname: mechanism_url + description: 'NOT USED: The address of the connector to use.' + entity_fieldname: mechanism_url + example: '' type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + name: + api_fieldname: name + 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 - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '404' - description: API key with the specified ID does not exist. - 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 + 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 - - _key: object - description: Entity name, always `error`. + object: + api_fieldname: object + description: The API resource entity. + entity_fieldname: object + example: device + type: string + operator_suspended: + api_fieldname: operator_suspended + description: Device has been suspended by operator. + entity_fieldname: operator_suspended + type: boolean + serial_number: + api_fieldname: serial_number + description: The [serial number](https://www.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. + + * 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://www.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://www.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: - - error + - unenrolled + - cloud_enrolling + - bootstrapped + - registered + - deregistered type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + system_suspended: + api_fieldname: system_suspended + description: Is the device suspended by the system? + entity_fieldname: system_suspended + type: boolean + updated_at: + api_fieldname: updated_at + description: The time this data object was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + vendor_id: + api_fieldname: vendor_id + description: The device vendor ID. + entity_fieldname: vendor_id + example: 00000000-0000-0000-0000-000000000000 type: string - required: - - code - - message - - object - - request_id - - type - type: object + - _key: '400' + description: 'Validation error: The data used to create the device did not validate.' + - _key: '401' + description: Not authenticated. + - _key: '403' + description: Account limit reached. Could not create device. + - _key: '409' + description: Unique-constrained fields are used by other resources. return_info: custom: false self: true - type: api_key - return_type: api_key - summary: Get API key details. + type: device + return_type: device + summary: Create a device. x_deprecation: null x_filter: {} - - _key: update - additional_operations: - - notes: After retrieving the resource using the `me` method, it can modified - using using this SDK method. - operation_id: updateMyApiKey - description: 'Update API key details. + - _key: delete + description: Delete device. Only available for devices with a developer certificate. + Attempting to delete a device with a production certificate returns a 400 response. + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: id + api_fieldname: id + description: The [Device ID](https://www.pelion.com/docs/device-management/current/connecting/device-identity.html) + created by Device Management. + 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: Device_destroy + pagination: false + path: /v3/devices/{id}/ + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Device deleted. + - _key: '400' + description: Bad request. + - _key: '401' + description: Not authenticated. + - _key: '404' + description: Unable to delete device because it can't be found. + return_info: + custom: false + self: true + type: device + return_type: device + summary: Delete a device. + x_deprecation: null + x_filter: {} + - _key: list + description: 'List all devices enrolled to Device Management for the account. **Example:** - `curl -X PUT https://api.us-east-1.mbedcloud.com/v3/api-keys/{apikey_id} \ + Following example filters devices according to state field and returns only + devices in ''registered'' state: - -H ''Authorization: Bearer '' \ + ``` - -H ''content-type: application/json'' \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/devices?filter=state%3Dregistered + \ - -d ''{"name": "TestApiKey25"}'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - created_at - - updated_at - - key - - creation_time - - last_login_time - - account_id + - 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 field_renames: [] fields: - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' - required: true - type: string - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - in: body - maxLength: 100 - parameter_fieldname: name - required: true + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: '01631667477600000000000100100374' + external_param: true + in: query + name: after + parameter_fieldname: after + required: false type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 - in: body - parameter_fieldname: owner - pattern: '[a-f0-9]{32}' + - _key: include + api_fieldname: include + description: 'Comma-separated list of data fields to return. Currently supported: + `total_count`.' + entity_fieldname: include + external_param: true + in: query + name: include + parameter_fieldname: include required: false type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: *id001 - enum_reference: api_key_status_enum - example: ACTIVE - in: body - parameter_fieldname: status + - _key: limit + api_fieldname: limit + description: How many objects to retrieve in the page (2-1000). Limit values + outside of this 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 + type: integer + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order required: false type: string - group_id: Accounts - method: put - mode: update - operation_id: updateApiKey - pagination: false - parameter_map: - apikey_id: id - path: /v3/api-keys/{apikey_id} + foreign_key: + entity: device + group: Devices + foreign_key_priority: self + group_id: Devices + method: get + mode: list + operation_id: Device_list + pagination: true + path: /v3/devices/ request_body: json request_content_type: application/json responses: - _key: '200' - description: Successful operation. + description: Request successful. schema: - description: Represents an API key in Device Management. foreign_key: - entity: subtenant_api_key - group: Accounts + entity: device + group: Devices + pagination: true properties: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _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 - type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 - type: integer - - _key: etag - api_fieldname: etag - description: API resource entity version. - entity_fieldname: etag - example: '1' - type: string - - _key: groups - api_fieldname: groups - description: A list of group IDs this API key belongs to. - entity_fieldname: groups - items: - type: string - type: array - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - maxLength: 100 - type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''api-key''' - entity_fieldname: object - enum: - - api-key - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: - - ACTIVE - - INACTIVE - example: ACTIVE - 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 + - _key: after + api_fieldname: after + description: An offset token for current page. + entity_fieldname: after + example: '01631667477600000000000100100374' type: string - required: - - etag - - id - - key - - name - - object - type: object - - _key: '400' - description: Error in input data, for example, missing display name. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. + - _key: data + api_fieldname: data + entity_fieldname: data items: - properties: - - _key: message - description: Message describing the error condition. + - _key: foreign_key + entity: device + group: Devices + - _key: properties + account_id: + description: The ID of the associated account. + example: '00000000000000000000000000000000' type: string - - _key: name - description: Name of the field which caused the error. + 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 - 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. + 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 - - _key: name - description: Name of the field which caused the error. + ca_id: + description: The certificate issuer's ID. + example: '00000000000000000000000000000000' + maxLength: 500 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. + 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. + 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: + 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 + issuer_fingerprint: + 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 + x-nullable: true + last_operator_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' + 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 + 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 + type: string + last_system_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' + 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 + type: string + 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 + 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 + manifest: + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' + 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: 'NOT USED: The ID of the channel used to communicate with + the device.' + enum: + - connector + - direct + type: string + mechanism_url: + description: 'NOT USED: The address of the connector to use.' + example: '' + type: string + name: + 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: Device has been suspended by operator. + type: boolean + serial_number: + description: The [serial number](https://www.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://www.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://www.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 this data object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: name - description: Name of the field which caused the error. + vendor_id: + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 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: The API key with the specified ID does not exist. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 + - _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 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 + api_fieldname: object + description: The type of this API object is a "list". + entity_fieldname: object + example: list type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + - _key: order + api_fieldname: order + description: The order of the records based on creation time, `ASC` or `DESC`; + by default `ASC`. + entity_fieldname: order + example: DESC type: string - required: - - code - - message - - object - - request_id - - type - type: object + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + example: 1 + format: integer + type: integer + - _key: '400' + description: Bad request. + - _key: '401' + description: Not authenticated. + - _key: '404' + description: Unable to find page. return_info: custom: false self: true - type: api_key - return_type: api_key - summary: Update API key details. + type: device + return_type: paginated_response(device) + summary: List all devices. x_deprecation: null - x_filter: {} - primary_key_field: id - swagger_models: - - ApiKeyInfoReq - - ApiKeyInfoResp - - ApiKeyInfoRespList - - ApiKeyUpdateReq - tags: - - Account - API keys -- _key: campaign_device_metadata - field_renames: - - _key: campaign_id - api_fieldname: campaign - fields: - - _key: campaign_id - api_fieldname: campaign - description: The device's campaign ID - example: 015bf72fccda00000000000100100280 - readOnly: false - required: true - type: string - - _key: created_at - api_fieldname: created_at - description: The time the campaign was created - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: deployment_state - api_fieldname: deployment_state - description: The state of the update campaign on the device - enum: - - pending - - updated_connector_channel - - failed_connector_channel_update - - deployed - - manifestremoved - - deregistered - enum_reference: campaign_device_metadata_deployment_state_enum - readOnly: true - required: false - type: string - - _key: description - api_fieldname: description - description: Description - example: '' - maxLength: 2000 - readOnly: true - required: false - type: string - - _key: device_id - api_fieldname: device_id - description: The device ID - example: 015c2fec9bba0000000000010010036f - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: The metadata record ID - example: 015c3029f6f7000000000001001000c3 - readOnly: false - required: true - type: string - - _key: mechanism - api_fieldname: mechanism - description: How the firmware is delivered (connector or direct) - example: connector - readOnly: true - required: false - type: string - - _key: mechanism_url - api_fieldname: mechanism_url - description: The Device Management Connect URL - example: '' - readOnly: true - required: false - type: string - - _key: name - api_fieldname: name - description: The record name - example: default_object_name - maxLength: 128 - readOnly: true - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: 'The record was modified in the database format: date-time' - example: '2017-05-22T12:37:58.776736Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Device_Update - methods: + x_filter: + 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 + last_operator_suspended_category: + - eq + - neq + - in + - nin + last_operator_suspended_updated_at: + - in + - nin + - lte + - gte + last_system_suspended_category: + - eq + - neq + - in + - nin + last_system_suspended_updated_at: + - in + - nin + - lte + - gte + lifecycle_status: + - 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 + operator_suspended: + - eq + - neq + serial_number: + - eq + - neq + - in + - nin + state: + - eq + - neq + - in + - nin + system_suspended: + - eq + - neq + updated_at: + - in + - nin + - lte + - gte + vendor_id: + - eq + - neq + - in + - nin - _key: read - description: Get update campaign metadata. + description: 'Retrieve information about a specific device. This API returns [DeviceData](https://www.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://www.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/ \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - 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 - - deployment_state + - custom_attributes + - deployed_state + - deployment - description - - device_id + - 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 - field_renames: - - _key: campaign_id - api_fieldname: campaign + - vendor_id + - enrolment_list_timestamp + field_renames: [] fields: - - _key: campaign_id - api_fieldname: campaign - description: The device's campaign ID - entity_fieldname: campaign_id - example: 015bf72fccda00000000000100100280 - in: path - parameter_fieldname: campaign_id - required: true - type: string - _key: id api_fieldname: id - description: The metadata record ID + description: The ID of the device. The device ID is used across all Device Management + APIs. entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 + example: '00000000000000000000000000000000' in: path - parameter_fieldname: campaign_device_metadata_id + parameter_fieldname: id required: true type: string - group_id: Device_Update + group_id: Devices method: get mode: read - operation_id: Update_Campaign_Metadata_retrieve + operation_id: Device_retrieve pagination: false - parameter_map: - campaign_device_metadata_id: id - path: /v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}/ + path: /v3/devices/{id}/ request_body: json request_content_type: application/json responses: - _key: '200' - description: Request successful + description: Retrieved result successfully. schema: - foreign_key: - entity: campaign_device_metadata - group: Device_Update - properties: - - _key: campaign - api_fieldname: campaign - description: The device's campaign ID - entity_fieldname: campaign_id - example: 015bf72fccda00000000000100100280 + - _key: foreign_key + entity: device + group: Devices + - _key: properties + account_id: + api_fieldname: account_id + description: The ID of the associated account. + entity_fieldname: account_id + example: '00000000000000000000000000000000' type: string - - _key: created_at + auto_update: + api_fieldname: auto_update + description: 'DEPRECATED: Mark this device for automatic firmware update.' + entity_fieldname: auto_update + type: boolean + bootstrap_expiration_date: + api_fieldname: bootstrap_expiration_date + description: The expiration date of the certificate used to connect to bootstrap + server. + entity_fieldname: bootstrap_expiration_date + format: date + type: string + x-nullable: true + bootstrapped_timestamp: + api_fieldname: bootstrapped_timestamp + description: The timestamp of the device's most recent bootstrap process. + entity_fieldname: bootstrapped_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + ca_id: + api_fieldname: ca_id + description: The certificate issuer's ID. + entity_fieldname: ca_id + 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 + server. + entity_fieldname: connector_expiration_date + format: date + type: string + x-nullable: true + created_at: api_fieldname: created_at - description: The time the campaign was created + description: The timestamp of when the device was created in the device + directory. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - - _key: deployment_state - api_fieldname: deployment_state - description: The state of the update campaign on the device - entity_fieldname: deployment_state + custom_attributes: + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + maxProperties: 5 + type: object + deployed_state: + api_fieldname: deployed_state + description: 'DEPRECATED: The state of the device''s deployment.' + entity_fieldname: deployed_state enum: - - pending - - updated_connector_channel - - failed_connector_channel_update - - deployed - - manifestremoved - - deregistered + - development + - production type: string - - _key: description + deployment: + api_fieldname: deployment + description: 'DEPRECATED: The last deployment used on the device.' + entity_fieldname: deployment + example: '' + type: string + description: api_fieldname: description - description: Description + description: The description of the device. entity_fieldname: description - example: '' + example: Temperature measuring device maxLength: 2000 type: string - - _key: device_id - api_fieldname: device_id - description: The device ID - entity_fieldname: device_id - example: 015c2fec9bba0000000000010010036f + device_class: + api_fieldname: device_class + description: An ID representing the model and hardware revision of the device. + entity_fieldname: device_class + example: '' + maxLength: 32 type: string - - _key: etag + device_execution_mode: + api_fieldname: device_execution_mode + 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." + entity_fieldname: device_execution_mode + enum: + - 0 + - 1 + - 5 + example: 0 + type: integer + device_key: + api_fieldname: device_key + description: The fingerprint of the device certificate. + entity_fieldname: device_key + 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: + api_fieldname: endpoint_name + 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 + type: string + endpoint_type: + api_fieldname: endpoint_type + description: The endpoint type of the device. For example, the device is + a gateway. + entity_fieldname: endpoint_type + example: '' + maxLength: 64 + type: string + enrolment_list_timestamp: + api_fieldname: enrolment_list_timestamp + description: The claim date/time. + entity_fieldname: enrolment_list_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + etag: api_fieldname: etag - description: API resource entity version + description: The entity instance signature. entity_fieldname: etag - example: '2017-05-22T12:37:58.753425Z' + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: id + firmware_checksum: + api_fieldname: firmware_checksum + description: The SHA256 checksum of the current firmware image. + entity_fieldname: firmware_checksum + example: '0000000000000000000000000000000000000000000000000000000000000000' + type: string + groups: + api_fieldname: groups + description: An array containing an ID of each group this device belongs + to. + entity_fieldname: groups + items: + example: '00000000000000000000000000000000' + type: string + type: array + host_gateway: + api_fieldname: host_gateway + 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 + id: api_fieldname: id - description: The metadata record ID + description: The ID of the device. The device ID is used across all Device + Management APIs. entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 + example: '00000000000000000000000000000000' type: string - - _key: mechanism + issuer_fingerprint: + api_fieldname: issuer_fingerprint + description: SHA256 fingerprint of the certificate used to validate the + signature of the device certificate. + entity_fieldname: issuer_fingerprint + example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 + pattern: '[A-Fa-f0-9]{64}' + type: string + x-nullable: true + last_operator_suspended_category: + api_fieldname: last_operator_suspended_category + description: The reference of the block category. + entity_fieldname: last_operator_suspended_category + example: maintenance + pattern: '[a-f0-9_]{32}' + type: string + last_operator_suspended_description: + api_fieldname: last_operator_suspended_description + description: The most recent description why the device was suspended or + returned to service. + entity_fieldname: last_operator_suspended_description + example: Suspended for maintenance. + maxLength: 2000 + type: string + last_operator_suspended_updated_at: + api_fieldname: last_operator_suspended_updated_at + description: The timestamp of the most recent suspension activity. + entity_fieldname: last_operator_suspended_updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + last_system_suspended_category: + api_fieldname: last_system_suspended_category + description: The reference of the block category. + entity_fieldname: last_system_suspended_category + example: maintenance + pattern: '[a-f0-9_]{32}' + type: string + last_system_suspended_description: + api_fieldname: last_system_suspended_description + description: The most recent description of why the device was blocked or + unblocked by the system. + entity_fieldname: last_system_suspended_description + example: A certificate in the device's certificate chain was blacklisted + by the system. + maxLength: 2000 + type: string + last_system_suspended_updated_at: + api_fieldname: last_system_suspended_updated_at + description: The timestamp of the most recent system block activity. + entity_fieldname: last_system_suspended_updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + lifecycle_status: + api_fieldname: 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''.' + entity_fieldname: lifecycle_status + enum: + - enabled + - blocked + example: enabled + type: string + manifest: + api_fieldname: manifest + description: 'DEPRECATED: The URL for the current device manifest.' + entity_fieldname: manifest + example: '' + type: string + manifest_timestamp: + api_fieldname: manifest_timestamp + description: The timestamp of the current manifest version. + entity_fieldname: manifest_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + mechanism: api_fieldname: mechanism - description: How the firmware is delivered (connector or direct) + description: 'NOT USED: The ID of the channel used to communicate with the + device.' entity_fieldname: mechanism - example: connector + enum: + - connector + - direct type: string - - _key: mechanism_url + mechanism_url: api_fieldname: mechanism_url - description: The Device Management Connect URL + description: 'NOT USED: The address of the connector to use.' entity_fieldname: mechanism_url example: '' type: string - - _key: name + name: api_fieldname: name - description: The record name + description: The name given by the web application for the device. Device + itself provides only the endpoint_name. entity_fieldname: name - example: default_object_name + example: 00000000-0000-0000-0000-000000000000 maxLength: 128 type: string - - _key: object + 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 entity name: always ''update-campaign-device-metadata''' + description: The API resource entity. entity_fieldname: object - example: update-campaign-device-metadata + example: device type: string - - _key: updated_at + operator_suspended: + api_fieldname: operator_suspended + description: Device has been suspended by operator. + entity_fieldname: operator_suspended + type: boolean + serial_number: + api_fieldname: serial_number + description: The [serial number](https://www.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. + + * 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://www.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://www.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 + - cloud_enrolling + - bootstrapped + - registered + - deregistered + type: string + system_suspended: + api_fieldname: system_suspended + description: Is the device suspended by the system? + entity_fieldname: system_suspended + type: boolean + updated_at: api_fieldname: updated_at - description: 'The record was modified in the database format: date-time' + description: The time this data object was updated. entity_fieldname: updated_at - example: '2017-05-22T12:37:58.776736Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - type: object + vendor_id: + api_fieldname: vendor_id + description: The device vendor ID. + entity_fieldname: vendor_id + example: 00000000-0000-0000-0000-000000000000 + type: string + - _key: '400' + description: Bad request. - _key: '401' - description: Unauthorized + description: Not authenticated. - _key: '404' - description: Not Found + description: Unable to find device. return_info: custom: false self: true - type: campaign_device_metadata - return_type: campaign_device_metadata - summary: Get a campaign device metadata + type: device + return_type: device + summary: Get a device. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - CampaignDeviceMetadata - tags: [] -- _key: campaign_statistics - field_renames: [] - fields: - - _key: campaign_id - api_fieldname: campaign_id - description: ID of the associated campaign. - example: '00000000000000000000000000000000' - readOnly: false - required: true - type: string - - _key: count - api_fieldname: count - example: 10 - readOnly: true - required: false - type: integer - - _key: created_at - api_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: ID of the event type description - enum: - - fail - - success - - info - - skipped - enum_reference: campaign_statistics_id_enum - example: fail - readOnly: false - required: true - type: string - - _key: summary_status - api_fieldname: summary_status - description: The event type description. - enum: - - FAIL - - SUCCESS - - INFO - - SKIPPED - enum_reference: campaign_statistics_summary_status_enum - example: FAIL - readOnly: true - required: false - type: string - group_id: Device_Update - methods: - - _key: events - description: Get a list of events grouped by summary + - _key: remove_from_group + description: Remove one device from a group. drop_fields: - object - etag - type - - groups - 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 + - _key: device-group-id + api_fieldname: device-group-id + description: The ID of the group. + entity_fieldname: device-group-id + external_param: true in: path - name: campaign_id - parameter_fieldname: campaign_id + name: device-group-id + parameter_fieldname: device-group-id required: true type: string - _key: id - api_fieldname: summary_status_id - description: The summary status. For example, fail + api_fieldname: device_id entity_fieldname: id + example: '00000000000000000000000000000000' external_param: false - in: path - name: summary_status_id - parameter_fieldname: summary_status_id - required: true - type: string - foreign_key: - entity: campaign_statistics_events - group: Device_Update - group_id: Device_Update - method: get - mode: events - operation_id: Update_Campaign_event_types_list - pagination: true - parameter_map: - summary_status_id: id - path: /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/ - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: OK - schema: - foreign_key: - entity: campaign_statistics_events - 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_events - 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: description - example: Update error, nonspecific network error - type: string - - _key: event_type - example: UPD4_FAIL_101 - type: string - - _key: id - example: upd_fail_101 - type: string - - _key: object - example: event-type - type: string - - _key: summary_status - example: FAIL - type: string - - _key: summary_status_id - 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: 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 - drop_fields: - - object - - etag - - type - - groups - - 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 + in: body + name: device_id + parameter_fieldname: device_id required: true + schema_param: 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 + group_id: Devices + method: post + mode: remove_from_group + operation_id: Group_members_remove + pagination: false parameter_map: - summary_status_id: id - path: /v3/update-campaigns/{campaign_id}/statistics/ + device_id: id + path: /v3/device-groups/{device-group-id}/devices/remove/ request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK + - _key: '204' + description: Success - device removed. + - _key: '400' + description: Bad request. 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 + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. 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 - example: summary_status + - _key: message + description: Message describing the error condition. type: string - - _key: summary_status - description: The event type description. - enum: - - FAIL - - SUCCESS - - INFO - - SKIPPED - example: FAIL + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message 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 + - _key: message + description: A human readable informative explanation + example: Validation error type: string - - _key: order - api_fieldname: order - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' - entity_fieldname: order + - _key: object + description: Entity name, always `error`. enum: - - ASC - - DESC - example: ASC + - error 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 + - _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 + description: Unauthorized. schema: properties: - _key: code @@ -12188,7 +26283,7 @@ entities: - type type: object - _key: '404' - description: Not Found + description: Not found. schema: properties: - _key: code @@ -12236,204 +26331,404 @@ entities: - type type: object return_info: - custom: false - self: true - type: campaign_statistics - return_type: paginated_response(campaign_statistics) - summary: Get a list of statistics for a campaign + custom: true + self: false + type: void + return_type: void + spec: + return_type: void + summary: Remove a device from a group. x_deprecation: null x_filter: {} - - _key: read - description: Get a summary status + - _key: renew_certificate + description: '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 '' \ + + -H ''content-length: 0'' + + ```' drop_fields: - object - etag - type - - groups - filter - - summary_status - - count - created_at + - device_id + - enroll_status + - enroll_result + - enroll_result_detail + - updated_at field_renames: [] fields: - - _key: campaign_id - api_fieldname: campaign_id - description: ID of the associated campaign. - entity_fieldname: campaign_id - example: '00000000000000000000000000000000' + - _key: certificate_name + api_fieldname: certificate-name + description: The certificate name. + entity_fieldname: certificate_name + example: customer.dlms + external_param: true in: path - parameter_fieldname: campaign_id + maxLength: 50 + name: certificate-name + parameter_fieldname: certificate-name + pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' required: true type: string - _key: id api_fieldname: id - description: ID of the event type description + description: The certificate enrollment ID. entity_fieldname: id - enum: - - fail - - success - - info - - skipped - enum_reference: campaign_statistics_id_enum - example: fail + example: 01612df56f3b0a580a010fc700000000 in: path - parameter_fieldname: summary_status_id + parameter_fieldname: device-id required: true type: string - group_id: Device_Update - method: get - mode: read - operation_id: Update_Campaign_statistics_retrieve + foreign_key: + entity: certificate_enrollment + group: Security + group_id: Devices + method: post + mode: renew_certificate + operation_id: RequestCertificateRenewal pagination: false parameter_map: - summary_status_id: id - path: /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id} + certificate-name: certificate_name + device-id: id + path: /v3/devices/{device-id}/certificates/{certificate-name}/renew request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK + - _key: '201' + description: Created. schema: foreign_key: - entity: campaign_statistics - group: Device_Update + entity: certificate_enrollment + group: Security properties: - - _key: campaign_id - api_fieldname: campaign_id - description: ID of the associated campaign. - entity_fieldname: campaign_id - example: '00000000000000000000000000000000' + - _key: certificate_name + api_fieldname: certificate_name + description: The certificate name. + entity_fieldname: certificate_name + example: customer.dlms + maxLength: 50 type: string - - _key: count - api_fieldname: count - entity_fieldname: count - example: 10 - type: integer - _key: created_at api_fieldname: created_at + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' + example: '2017-01-01T00:00:00Z' format: date-time type: string + - _key: device_id + api_fieldname: device_id + description: The device ID. + entity_fieldname: device_id + example: 01625daa23230a580a0100bd00000000 + type: string + - _key: enroll_result + api_fieldname: enroll_result + description: The result of certificate enrollment request. + entity_fieldname: enroll_result + enum: + - success + - failure + example: success + type: string + - _key: enroll_result_detail + api_fieldname: enroll_result_detail + description: Additional information in case of failure. + entity_fieldname: enroll_result_detail + example: The device is currently processing too many certificate renewals. + type: string + - _key: enroll_status + api_fieldname: enroll_status + description: The status of certificate enrollment request. + entity_fieldname: enroll_status + enum: + - new + - completed + type: string + - _key: etag + api_fieldname: etag + description: Entity instance signature. + entity_fieldname: etag + example: '1' + type: string - _key: id api_fieldname: id - description: ID of the event type description + description: The certificate enrollment ID. entity_fieldname: id - enum: - - fail - - success - - info - - skipped - example: fail + example: 01612df56f3b0a580a010fc700000000 type: string - _key: object api_fieldname: object entity_fieldname: object - example: summary_status - type: string - - _key: summary_status - api_fieldname: summary_status - description: The event type description. - entity_fieldname: summary_status enum: - - FAIL - - SUCCESS - - INFO - - SKIPPED - example: FAIL + - certificate-enrollment + type: string + - _key: updated_at + api_fieldname: updated_at + description: Update UTC time RFC3339. + entity_fieldname: updated_at + example: '2017-01-01T00:00:00Z' + format: date-time + type: string + required: + - created_at + - etag + - id + - device_id + - certificate_name + type: object + - _key: '400' + description: 'Validation error: There is no certificate issuer configured for + this certificate.' + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. type: string + required: + - code + - fields + - message + - object + - request_id + - type type: object - _key: '401' - description: Not Authenticated + description: You are not authorized to perform the action. schema: properties: - _key: code - description: HTTP response code - example: 400 + description: Error code. Correlates with response status code. format: int32 type: integer - _key: fields - description: Request fields which failed validation. + description: A list of request fields that failed validation. items: properties: + - _key: field + description: Field name. + type: string - _key: message - description: Message describing the error condition. + description: Error message related to the field. type: string - - _key: name - description: Name of the field which caused the error. + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '403' + description: Forbidden. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. type: string - required: - - name - - message type: object type: array - _key: message - description: A human readable informative explanation - example: Validation error + description: Error message. type: string - _key: object - description: Entity name, always `error`. - enum: - - error + description: 'Entity name: `error`.' type: string - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + description: Request ID from JWT. type: string - _key: type - description: Error type used to categorise the error. - example: validation_error + description: Error type. type: string required: - code + - fields - message - object - request_id - type type: object - _key: '404' - description: Not Found + description: The device ID or certificate name is not found. schema: properties: - _key: code - description: HTTP response code - example: 400 + description: Error code. Correlates with response status code. format: int32 type: integer - _key: fields - description: Request fields which failed validation. + description: A list of request fields that failed validation. items: properties: + - _key: field + description: Field name. + type: string - _key: message - description: Message describing the error condition. + description: Error message related to the field. type: string - - _key: name - description: Name of the field which caused the error. + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '409' + description: Conflict. A renewal request for this certificate is in progress. + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. + type: string + type: object + type: array + - _key: message + description: Error message. + type: string + - _key: object + description: 'Entity name: `error`.' + type: string + - _key: request_id + description: Request ID from JWT. + type: string + - _key: type + description: Error type. + type: string + required: + - code + - fields + - message + - object + - request_id + - type + type: object + - _key: '423' + description: 'Either: + + - Operation not supported for this device. + + - The device is not connected.' + schema: + properties: + - _key: code + description: Error code. Correlates with response status code. + format: int32 + type: integer + - _key: fields + description: A list of request fields that failed validation. + items: + properties: + - _key: field + description: Field name. + type: string + - _key: message + description: Error message related to the field. type: string - required: - - name - - message type: object type: array - _key: message - description: A human readable informative explanation - example: Validation error + description: Error message. type: string - _key: object - description: Entity name, always `error`. - enum: - - error + description: 'Entity name: `error`.' type: string - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + description: Request ID from JWT. type: string - _key: type - description: Error type used to categorise the error. - example: validation_error + description: Error type. type: string required: - code + - fields - message - object - request_id @@ -12441,732 +26736,920 @@ entities: type: object return_info: custom: false - self: true - type: campaign_statistics - return_type: campaign_statistics - summary: Get a summary status + self: false + type: certificate_enrollment + return_type: certificate_enrollment + summary: Request certificate renewal. + unaggregated: true x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - EventTypeList - - EventTypeSummary - - EventTypeSummaryList - tags: [] -- _key: campaign_statistics_events - field_renames: [] - fields: - - _key: campaign_id - api_fieldname: campaign_id - description: ID of the associated campaign. - example: '00000000000000000000000000000000' - readOnly: false - required: true - type: string - - _key: count - api_fieldname: count - example: 10 - readOnly: true - required: false - type: integer - - _key: created_at - api_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: description - api_fieldname: description - example: Update error, nonspecific network error - readOnly: true - required: false - type: string - - _key: event_type - api_fieldname: event_type - example: UPD4_FAIL_101 - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - example: upd_fail_101 - readOnly: false - required: true - type: string - - _key: summary_status - api_fieldname: summary_status - example: FAIL - readOnly: true - required: false - type: string - - _key: summary_status_id - api_fieldname: summary_status_id - example: fail - readOnly: false - required: true - type: string - group_id: Device_Update - methods: - - _key: read - description: Get an event type for a campaign + - _key: update + description: 'Update a specific device. + + + **Example:** + + Following example will update the specific devices description field to contain + "Testing description field". + + ``` + + curl -X PUT https://api.us-east-1.mbedcloud.com/v3/devices/ \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"description": "Testing description field"}'' + + ```' drop_fields: - object - etag - type - - groups - 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 - - event_type - - description - - summary_status - - count + - 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 field_renames: [] fields: - - _key: campaign_id - api_fieldname: campaign_id - description: ID of the associated campaign. - entity_fieldname: campaign_id + - _key: auto_update + api_fieldname: auto_update + description: 'DEPRECATED: Mark this device for automatic firmware update.' + entity_fieldname: auto_update + in: body + parameter_fieldname: auto_update + required: false + type: boolean + - _key: ca_id + api_fieldname: ca_id + description: The certificate issuer's ID. + entity_fieldname: ca_id example: '00000000000000000000000000000000' - in: path - parameter_fieldname: campaign_id - required: true + in: body + maxLength: 500 + parameter_fieldname: ca_id + required: false + type: string + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + in: body + maxProperties: 5 + parameter_fieldname: custom_attributes + required: false + type: object + - _key: description + api_fieldname: description + description: The description of the device. + entity_fieldname: description + example: Temperature measuring device + in: body + maxLength: 2000 + parameter_fieldname: description + required: false + type: string + - _key: device_key + api_fieldname: device_key + description: The fingerprint of the device certificate. + entity_fieldname: device_key + 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 + in: body + maxLength: 512 + parameter_fieldname: device_key + required: false + type: string + - _key: endpoint_name + api_fieldname: endpoint_name + 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 + parameter_fieldname: endpoint_name + readOnly: true + required: false + type: string + - _key: endpoint_type + api_fieldname: endpoint_type + description: The endpoint type of the device. For example, the device is a gateway. + entity_fieldname: endpoint_type + example: '' + in: body + maxLength: 64 + parameter_fieldname: endpoint_type + required: false + type: string + - _key: host_gateway + api_fieldname: host_gateway + 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 + parameter_fieldname: host_gateway + required: false type: string - _key: id api_fieldname: id + description: The ID of the device. The device ID is used across all Device Management + APIs. entity_fieldname: id - example: upd_fail_101 + example: '00000000000000000000000000000000' in: path - parameter_fieldname: event_type_id + parameter_fieldname: id required: true type: string - - _key: summary_status_id - api_fieldname: summary_status_id - entity_fieldname: summary_status_id - example: fail - in: path - parameter_fieldname: summary_status_id - required: true + - _key: name + api_fieldname: name + 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 + maxLength: 128 + parameter_fieldname: name + required: false type: string - group_id: Device_Update - method: get - mode: read - operation_id: Update_Campaign_event_types_retrieve + group_id: Devices + method: put + mode: update + operation_id: Device_update pagination: false - parameter_map: - event_type_id: id - path: /v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/{event_type_id} + path: /v3/devices/{id}/ request_body: json request_content_type: application/json responses: - _key: '200' - description: OK + description: Device updated. schema: - foreign_key: - entity: campaign_statistics_events - group: Device_Update - properties: - - _key: campaign_id - api_fieldname: campaign_id - description: ID of the associated campaign. - entity_fieldname: campaign_id + - _key: foreign_key + entity: device + group: Devices + - _key: properties + account_id: + api_fieldname: account_id + description: The ID of the associated account. + entity_fieldname: account_id example: '00000000000000000000000000000000' type: string - - _key: count - api_fieldname: count - entity_fieldname: count - example: 10 - type: integer - - _key: created_at + auto_update: + api_fieldname: auto_update + description: 'DEPRECATED: Mark this device for automatic firmware update.' + entity_fieldname: auto_update + type: boolean + bootstrap_expiration_date: + api_fieldname: bootstrap_expiration_date + description: The expiration date of the certificate used to connect to bootstrap + server. + entity_fieldname: bootstrap_expiration_date + format: date + type: string + x-nullable: true + bootstrapped_timestamp: + api_fieldname: bootstrapped_timestamp + description: The timestamp of the device's most recent bootstrap process. + entity_fieldname: bootstrapped_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + ca_id: + api_fieldname: ca_id + description: The certificate issuer's ID. + entity_fieldname: ca_id + 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 + server. + entity_fieldname: connector_expiration_date + format: date + type: string + x-nullable: true + created_at: api_fieldname: created_at + description: The timestamp of when the device was created in the device + directory. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - - _key: description + custom_attributes: + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + maxProperties: 5 + type: object + deployed_state: + api_fieldname: deployed_state + description: 'DEPRECATED: The state of the device''s deployment.' + entity_fieldname: deployed_state + enum: + - development + - production + type: string + deployment: + api_fieldname: deployment + description: 'DEPRECATED: The last deployment used on the device.' + entity_fieldname: deployment + example: '' + type: string + description: api_fieldname: description + description: The description of the device. entity_fieldname: description - example: Update error, nonspecific network error + example: Temperature measuring device + maxLength: 2000 type: string - - _key: event_type - api_fieldname: event_type - entity_fieldname: event_type - example: UPD4_FAIL_101 + device_class: + api_fieldname: device_class + description: An ID representing the model and hardware revision of the device. + entity_fieldname: device_class + example: '' + maxLength: 32 type: string - - _key: id - api_fieldname: id - entity_fieldname: id - example: upd_fail_101 + device_execution_mode: + api_fieldname: device_execution_mode + 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." + entity_fieldname: device_execution_mode + enum: + - 0 + - 1 + - 5 + example: 0 + type: integer + device_key: + api_fieldname: device_key + description: The fingerprint of the device certificate. + entity_fieldname: device_key + 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 - - _key: object - api_fieldname: object - entity_fieldname: object - example: event-type + endpoint_name: + api_fieldname: endpoint_name + 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 type: string - - _key: summary_status - api_fieldname: summary_status - entity_fieldname: summary_status - example: FAIL + endpoint_type: + api_fieldname: endpoint_type + description: The endpoint type of the device. For example, the device is + a gateway. + entity_fieldname: endpoint_type + example: '' + maxLength: 64 type: string - - _key: summary_status_id - api_fieldname: summary_status_id - entity_fieldname: summary_status_id - example: fail + enrolment_list_timestamp: + api_fieldname: enrolment_list_timestamp + description: The claim date/time. + entity_fieldname: enrolment_list_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - 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. + etag: + api_fieldname: etag + description: The entity instance signature. + entity_fieldname: etag + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + firmware_checksum: + api_fieldname: firmware_checksum + description: The SHA256 checksum of the current firmware image. + entity_fieldname: firmware_checksum + example: '0000000000000000000000000000000000000000000000000000000000000000' + type: string + groups: + api_fieldname: groups + description: An array containing an ID of each group this device belongs + to. + entity_fieldname: groups 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 + example: '00000000000000000000000000000000' + type: string type: array - - _key: message - description: A human readable informative explanation - example: Validation error + host_gateway: + api_fieldname: host_gateway + 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 - - _key: object - description: Entity name, always `error`. + id: + api_fieldname: id + description: The ID of the device. The device ID is used across all Device + Management APIs. + entity_fieldname: id + example: '00000000000000000000000000000000' + type: string + issuer_fingerprint: + api_fieldname: issuer_fingerprint + description: SHA256 fingerprint of the certificate used to validate the + signature of the device certificate. + entity_fieldname: issuer_fingerprint + example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 + pattern: '[A-Fa-f0-9]{64}' + type: string + x-nullable: true + last_operator_suspended_category: + api_fieldname: last_operator_suspended_category + description: The reference of the block category. + entity_fieldname: last_operator_suspended_category + example: maintenance + pattern: '[a-f0-9_]{32}' + type: string + last_operator_suspended_description: + api_fieldname: last_operator_suspended_description + description: The most recent description why the device was suspended or + returned to service. + entity_fieldname: last_operator_suspended_description + example: Suspended for maintenance. + maxLength: 2000 + type: string + last_operator_suspended_updated_at: + api_fieldname: last_operator_suspended_updated_at + description: The timestamp of the most recent suspension activity. + entity_fieldname: last_operator_suspended_updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + last_system_suspended_category: + api_fieldname: last_system_suspended_category + description: The reference of the block category. + entity_fieldname: last_system_suspended_category + example: maintenance + pattern: '[a-f0-9_]{32}' + type: string + last_system_suspended_description: + api_fieldname: last_system_suspended_description + description: The most recent description of why the device was blocked or + unblocked by the system. + entity_fieldname: last_system_suspended_description + example: A certificate in the device's certificate chain was blacklisted + by the system. + maxLength: 2000 + type: string + last_system_suspended_updated_at: + api_fieldname: last_system_suspended_updated_at + description: The timestamp of the most recent system block activity. + entity_fieldname: last_system_suspended_updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + lifecycle_status: + api_fieldname: 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''.' + entity_fieldname: lifecycle_status enum: - - error + - enabled + - blocked + example: enabled + type: string + manifest: + api_fieldname: manifest + description: 'DEPRECATED: The URL for the current device manifest.' + entity_fieldname: manifest + example: '' + type: string + manifest_timestamp: + api_fieldname: manifest_timestamp + description: The timestamp of the current manifest version. + entity_fieldname: manifest_timestamp + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + mechanism: + api_fieldname: mechanism + description: 'NOT USED: The ID of the channel used to communicate with the + device.' + entity_fieldname: mechanism + enum: + - connector + - direct + type: string + mechanism_url: + api_fieldname: mechanism_url + description: 'NOT USED: The address of the connector to use.' + entity_fieldname: mechanism_url + example: '' type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + name: + api_fieldname: name + 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 - - _key: type - description: Error type used to categorise the error. - example: validation_error + 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 - 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 + object: + api_fieldname: object + description: The API resource entity. + entity_fieldname: object + example: device type: string - - _key: object - description: Entity name, always `error`. + operator_suspended: + api_fieldname: operator_suspended + description: Device has been suspended by operator. + entity_fieldname: operator_suspended + type: boolean + serial_number: + api_fieldname: serial_number + description: The [serial number](https://www.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. + + * 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://www.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://www.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: - - error + - unenrolled + - cloud_enrolling + - bootstrapped + - registered + - deregistered type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + system_suspended: + api_fieldname: system_suspended + description: Is the device suspended by the system? + entity_fieldname: system_suspended + type: boolean + updated_at: + api_fieldname: updated_at + description: The time this data object was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + vendor_id: + api_fieldname: vendor_id + description: The device vendor ID. + entity_fieldname: vendor_id + example: 00000000-0000-0000-0000-000000000000 type: string - required: - - code - - message - - object - - request_id - - type - type: object + - _key: '400' + description: 'Validation error: The data used to update the device did not validate.' + - _key: '401' + description: Not authenticated. + - _key: '404' + description: Unable to update device because it can't be found. return_info: custom: false self: true - type: campaign_statistics_events - return_type: campaign_statistics_events - summary: Get an event type for a campaign + type: device + return_type: device + summary: Update a device. x_deprecation: null x_filter: {} primary_key_field: id swagger_models: - - EventType - tags: [] -- _key: certificate_enrollment + - CertificateEnrollment + - DeviceData + - DeviceDataPostRequest + - DeviceDataPutRequest + - DeviceGroupManipulation + - DevicePage + tags: + - Device directory - devices + - Device security - device certificate renewals + - Device directory - groups +- _key: device_enrollment field_renames: [] fields: - - _key: certificate_name - api_fieldname: certificate_name - description: The certificate name. - example: customer.dlms - external_param: true - in: path - maxLength: 50 - name: certificate-name - parameter_fieldname: certificate-name - pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' + - _key: account_id + api_fieldname: account_id + description: ID + example: 00005a4e027f0a580a01081c00000000 readOnly: true required: false type: string - - _key: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + - _key: claimed_at + api_fieldname: claimed_at + description: The time the device was claimed. format: date-time readOnly: true required: false type: string - - _key: device_id - api_fieldname: device_id - description: The device ID. - example: 01625daa23230a580a0100bd00000000 + - _key: created_at + api_fieldname: created_at + description: The time of the enrollment identity creation. + format: date-time readOnly: true required: false type: string - - _key: enroll_result - api_fieldname: enroll_result - description: The result of certificate enrollment request. - enum: - - success - - failure - enum_reference: certificate_enrollment_enroll_result_enum - example: success + - _key: enrolled_device_id + api_fieldname: 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} readOnly: true required: false type: string - - _key: enroll_result_detail - api_fieldname: enroll_result_detail - description: Additional information in case of failure. - example: The device is currently processing too many certificate renewals. - readOnly: true - required: false + - _key: enrollment_identity + api_fieldname: 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}$ + readOnly: false + required: true type: string - - _key: enroll_status - api_fieldname: enroll_status - description: The status of certificate enrollment request. - enum: - - new - - completed - enum_reference: certificate_enrollment_enroll_status_enum + - _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. + format: date-time readOnly: true required: false type: string - _key: id api_fieldname: id - description: The certificate enrollment ID. - example: 01612df56f3b0a580a010fc700000000 - in: path - parameter_fieldname: device-id + description: Enrollment identity. + example: 00005a4e027f0a580a01081c00000000 + pattern: ^[A-Za-z0-9]{32} readOnly: false required: true type: string - - _key: updated_at - api_fieldname: updated_at - description: Update UTC time RFC3339. - example: '2017-01-01T00:00:00Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Security + group_id: Devices methods: - - _key: list - description: 'Get certificate enrollments list, optionally filtered. - + - _key: create + description: 'When the device connects to the bootstrap server and provides the + enrollment ID, it is assigned to your account. - **Examples:** +
+ **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments \ - - -H ''Authorization: Bearer '' - - ``` + curl -X POST \ + -H ''Authorization: Bearer '' \ - ``` + -H ''content-type: application/json'' \ - curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments?device_id__eq=01612df56f3b0a580a010fc700000000 - \ + https://api.us-east-1.mbedcloud.com/v3/device-enrollments \ - -H ''Authorization: Bearer '' + -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"}'' ```' drop_fields: - object - etag - type - - groups - 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 + - id + - created_at + - claimed_at + - account_id + - expires_at + - enrolled_device_id field_renames: [] fields: - - _key: after - api_fieldname: after - description: The ID of the item after which to retrieve the next page. - entity_fieldname: after - example: 01625daa23230a580a0100bd00000000 - external_param: true - in: query - name: after - parameter_fieldname: after - pattern: '[0-9a-fA-F]{32}' - required: false - type: string - - _key: include - api_fieldname: include - description: a comma-separated list of data fields to return. - entity_fieldname: include - enum: - - total_count - enum_reference: certificate_enrollment_include_enum - external_param: true - in: query - name: include - parameter_fieldname: include - required: false - type: string - - _key: limit - api_fieldname: limit - description: The number of results to return (2-1000). - entity_fieldname: limit - external_param: true - format: int32 - in: query - name: limit - parameter_fieldname: limit - required: false - type: integer - - _key: order - api_fieldname: order - description: The order of results. - entity_fieldname: order - enum: - - ASC - - DESC - enum_reference: certificate_enrollment_order_enum - external_param: true - in: query - name: order - parameter_fieldname: order - required: false + - _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 + in: body + parameter_fieldname: enrollment_identity + pattern: ^A-[A-Za-z0-9:]{95}$ + required: true type: string - foreign_key: - entity: certificate_enrollment - group: Security - foreign_key_priority: self - group_id: Security - method: get - mode: list - operation_id: getCertificateEnrollments - pagination: true - parameter_map: - certificate-enrollment-id: id - path: /v3/certificate-enrollments + group_id: Devices + method: post + mode: create + operation_id: createDeviceEnrollment + pagination: false + path: /v3/device-enrollments request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK. + - _key: '201' + description: Created. The enrollment claim has been created and is waiting for + the device to connect. schema: foreign_key: - entity: certificate_enrollment - group: Security - pagination: true + entity: device_enrollment + group: Devices properties: - - _key: after - api_fieldname: after - description: The entity ID to fetch after the given one. - entity_fieldname: after - example: 01625daa23230a580a0100bd00000000 + - _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: data - api_fieldname: data - description: List of certificate enrollments. - entity_fieldname: data - items: - foreign_key: - entity: certificate_enrollment - group: Security - properties: - - _key: certificate_name - api_fieldname: certificate-name - description: The certificate name. - entity_fieldname: certificate_name - example: customer.dlms - external_param: true - in: path - maxLength: 50 - name: certificate-name - parameter_fieldname: certificate-name - pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' - required: true - type: string - - _key: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - - _key: device_id - api_fieldname: device_id - description: The device ID. - entity_fieldname: device_id - example: 01625daa23230a580a0100bd00000000 - type: string - - _key: enroll_result - api_fieldname: enroll_result - description: The result of certificate enrollment request. - entity_fieldname: enroll_result - enum: - - success - - failure - example: success - type: string - - _key: enroll_result_detail - api_fieldname: enroll_result_detail - description: Additional information in case of failure. - entity_fieldname: enroll_result_detail - example: The device is currently processing too many certificate renewals. - type: string - - _key: enroll_status - api_fieldname: enroll_status - description: The status of certificate enrollment request. - entity_fieldname: enroll_status - enum: - - new - - completed - type: string - - _key: etag - api_fieldname: etag - description: Entity instance signature. - entity_fieldname: etag - example: '1' - type: string - - _key: id - api_fieldname: id - description: The certificate enrollment ID. - entity_fieldname: id - example: 01612df56f3b0a580a010fc700000000 - in: path - parameter_fieldname: device-id - required: true - type: string - - _key: object - api_fieldname: object - entity_fieldname: object - enum: - - certificate-enrollment - type: string - - _key: updated_at - api_fieldname: updated_at - description: Update UTC time RFC3339. - entity_fieldname: updated_at - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - required: - - created_at - - etag - - id - - device_id - - certificate_name - type: object - type: array - - _key: has_more - api_fieldname: has_more - description: Flag indicating whether there are more results. - entity_fieldname: has_more - type: boolean - - _key: limit - api_fieldname: limit - description: The number of results to return. - entity_fieldname: limit - format: int32 - type: integer - _key: object api_fieldname: object - description: Describes the type of objects in the list. entity_fieldname: object enum: - - list - type: string - - _key: order - api_fieldname: order - description: 'Record order based on creation time. Acceptable values: ASC, - DESC. Default: ASC.' - entity_fieldname: order - enum: - - ASC - - DESC - type: string - - _key: total_count - api_fieldname: total_count - description: The total number of records. - entity_fieldname: total_count - format: int32 - type: integer + - 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: Validation error. + description: Bad request. The enrollment identity is not valid. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - _key: '401' - description: Unauthorized. + description: The provided access token is not valid. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '409' + description: Conflict. The requested identity to add already exists on this + or another account. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -13175,283 +27658,659 @@ entities: return_info: custom: false self: true - type: certificate_enrollment - return_type: paginated_response(certificate_enrollment) - summary: Get certificate enrollments list. + type: device_enrollment + return_type: device_enrollment + summary: Create a single enrollment. x_deprecation: null - x_filter: - certificate_name: - - eq - created_at: - - lte - - gte - device_id: - - eq - enroll_result: - - neq - - eq - enroll_status: - - neq - - eq - updated_at: - - lte - - gte - - _key: read - description: 'Get a certificate enrollment by ID. + 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](https://www.pelion.com/docs/device-management/current/connecting/device-ownership-first-to-claim-by-enrollment-list.html). +
**Example:** - ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/certificate-enrollments/01612df56f3b0a580a010fc700000000 - \ + curl -X DELETE \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} ```' drop_fields: - object - etag - type - - groups - filter - - created_at - - device_id - - certificate_name - - enroll_status - - enroll_result - - enroll_result_detail - - updated_at field_renames: [] fields: - _key: id api_fieldname: id - description: The certificate enrollment ID. + description: Enrollment identity. entity_fieldname: id - example: 01612df56f3b0a580a010fc700000000 + external_param: false in: path - parameter_fieldname: certificate-enrollment-id + name: id + parameter_fieldname: id required: true type: string - group_id: Security - method: get - mode: read - operation_id: getCertificateEnrollment + group_id: Devices + method: delete + mode: delete + operation_id: deleteDeviceEnrollment pagination: false - parameter_map: - certificate-enrollment-id: id - path: /v3/certificate-enrollments/{certificate-enrollment-id} + path: /v3/device-enrollments/{id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK. + - _key: '204' + description: No content. The enrollment claim has been deleted. + - _key: '400' + description: Bad request. Invalid enrollment identity. schema: - foreign_key: - entity: device - group: Devices properties: - - _key: certificate_name - api_fieldname: certificate_name - description: The certificate name. - entity_fieldname: certificate_name - example: customer.dlms - external_param: true - in: path - maxLength: 50 - name: certificate-name - parameter_fieldname: certificate-name - pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' - required: true + - _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: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' - format: date-time + - _key: object + description: Entity name, always `error`. + enum: + - error type: string - - _key: device_id - api_fieldname: device_id - description: The device ID. - entity_fieldname: device_id - example: 01625daa23230a580a0100bd00000000 + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: enroll_result - api_fieldname: enroll_result - description: The result of certificate enrollment request. - entity_fieldname: enroll_result - enum: - - success - - failure - example: success + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - - _key: enroll_result_detail - api_fieldname: enroll_result_detail - description: Additional information in case of failure. - entity_fieldname: enroll_result_detail - example: The device is currently processing too many certificate renewals. + 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: enroll_status - api_fieldname: enroll_status - description: The status of certificate enrollment request. - entity_fieldname: enroll_status + - _key: object + description: Entity name, always `error`. enum: - - new - - completed + - error type: string - - _key: etag - api_fieldname: etag - description: Entity instance signature. - entity_fieldname: etag - example: '1' + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: id - api_fieldname: id - description: The certificate enrollment ID. - entity_fieldname: id - example: 01612df56f3b0a580a010fc700000000 - in: path - parameter_fieldname: device-id - required: true + - _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} + 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: - - certificate-enrollment + - list + example: list type: string - - _key: updated_at - api_fieldname: updated_at - description: Update UTC time RFC3339. - entity_fieldname: updated_at - example: '2017-01-01T00:00:00Z' - format: date-time + - _key: order + api_fieldname: order + default: ASC + entity_fieldname: order + enum: + - ASC + - DESC + example: ASC type: string + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + example: 100 + format: int32 + minimum: 1 + type: integer required: - - created_at - - etag - - id - - device_id - - certificate_name + - object + - limit + - after + - order + - has_more + - total_count + - data type: object - _key: '400' - description: Validation error. + description: Bad request. The access token could not be read. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - _key: '401' - description: Unauthorized. + description: The provided access token is not valid. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + return_info: + custom: false + self: true + 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: 'Check detailed enrollment info, for example, date of claim or expiration + date. + + + **Example:** + + ``` + + curl -X GET \ + + -H ''Authorization: Bearer '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} + + ```' + drop_fields: + - object + - 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 + in: path + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} + required: true + type: string + group_id: Devices + method: get + mode: read + operation_id: getDeviceEnrollment + 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: '400' + description: Bad request. Invalid enrollment identity. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -13462,36 +28321,44 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -13500,486 +28367,379 @@ entities: return_info: custom: false self: true - type: certificate_enrollment - return_type: certificate_enrollment - summary: Get a certificate enrollment by ID. + 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: - - CertificateEnrollment - - CertificateEnrollmentListResponse + - EnrollmentId + - EnrollmentIdentities + - EnrollmentIdentity tags: - - Device security - device certificate renewals -- _key: certificate_issuer + - Device ownership - enrollments +- _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. + + Null when creating bulk upload or delete.' + format: date-time + readOnly: true + required: false + type: string - _key: created_at api_fieldname: created_at - description: Creation UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + description: The time of receiving the bulk creation task. format: date-time readOnly: true required: false type: string - - _key: description - api_fieldname: description - description: General description for the certificate issuer. - example: GlobalSign sample issuer - maxLength: 100 - readOnly: false + - _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: The ID of the certificate issuer. - example: 01234567890ABCDEF01234567890ABCDEF + description: Bulk ID + pattern: ^[A-Za-z0-9]{32} readOnly: false required: true type: string - - _key: issuer_attributes - additionalProperties: - type: string - 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. - - ' - example: [] - readOnly: false + - _key: processed_count + api_fieldname: processed_count + description: The number of enrollment identities processed until now. + example: 0 + readOnly: true 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" + 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: - - GLOBAL_SIGN - - CFSSL_AUTH - enum_reference: certificate_issuer_type_enum - example: GLOBAL_SIGN - readOnly: false - required: true - type: string - - _key: name - api_fieldname: name - description: Certificate issuer name, unique per account. - example: GS Issuer - maxLength: 50 - readOnly: false - required: true + - new + - processing + - completed + enum_reference: device_enrollment_bulk_create_status_enum + example: new + readOnly: true + required: false type: string - group_id: Security + - _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: "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" - drop_fields: - - object - - etag - - type - - groups - - filter - - created_at - - id - field_renames: [] - fields: - - _key: description - api_fieldname: description - description: General description for the certificate issuer. - entity_fieldname: description - example: GlobalSign sample issuer - in: body - maxLength: 100 - parameter_fieldname: description - required: false - type: string - x-nullable: true - - _key: issuer_attributes - additionalProperties: - type: string - 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. - - ' - entity_fieldname: issuer_attributes - example: [] - in: body - parameter_fieldname: issuer_attributes - required: false - type: object - - _key: issuer_credentials - additionalProperties: - type: string - api_fieldname: issuer_credentials - 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. - - ' - entity_fieldname: issuer_credentials - example: [] + 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```" + 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 + 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 external_param: true - in: body - name: issuer_credentials - parameter_fieldname: issuer_credentials - required: true - schema_param: true - 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" - entity_fieldname: issuer_type - enum: - - GLOBAL_SIGN - - CFSSL_AUTH - enum_reference: certificate_issuer_type_enum - example: GLOBAL_SIGN - in: body - parameter_fieldname: issuer_type + in: stream + name: enrollment_identities + parameter_fieldname: enrollment_identities required: true - type: string - - _key: name - api_fieldname: name - description: Certificate issuer name, unique per account. - entity_fieldname: name - example: GS Issuer - in: body - maxLength: 50 - parameter_fieldname: name - required: false - type: string - group_id: Security + type: file + group_id: Devices method: post mode: create - operation_id: createCertificateIssuer + operation_id: createBulkDeviceEnrollment pagination: false - parameter_map: - certificate-issuer-id: id - path: /v3/certificate-issuers - request_body: json - request_content_type: application/json + path: /v3/device-enrollments-bulk-uploads + request_body: file + request_content_type: multipart/form-data responses: - _key: '201' - description: Created. + description: Bulk upload data received and asynchronous processing started. schema: foreign_key: - entity: certificate_issuer - group: Security + 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: Creation UTC time RFC3339. + description: The time of receiving the bulk creation task. entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' format: date-time type: string - - _key: description - api_fieldname: description - description: General description for the certificate issuer. - entity_fieldname: description - example: GlobalSign sample issuer - maxLength: 100 + - _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: Entity instance signature. + 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: The ID of the certificate issuer. + description: Bulk ID entity_fieldname: id - example: 01234567890ABCDEF01234567890ABCDEF - type: string - - _key: issuer_attributes - additionalProperties: - type: string - 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. - - ' - 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" - entity_fieldname: issuer_type - enum: - - GLOBAL_SIGN - - CFSSL_AUTH - example: GLOBAL_SIGN - type: string - - _key: name - api_fieldname: name - description: Certificate issuer name, unique per account. - entity_fieldname: name - example: GS Issuer - maxLength: 50 + pattern: ^[A-Za-z0-9]{32} type: string - _key: object api_fieldname: object entity_fieldname: object enum: - - certificate-issuer + - enrollment-identity-bulk-uploads + example: enrollment-identity-bulk-uploads type: string - required: - - issuer_type - type: object - - _key: '400' - description: 'Validation error: The data used to create the certificate issuer - failed validation. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 + - _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: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. + - _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 - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '401' - description: You are not authorized to view the resource. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 + - _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 - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string required: - - code - - fields - - message - object - - request_id - - type + - id + - etag + - created_at + - account_id + - status + - total_count + - processed_count + - errors_count + - completet_at + - full_report_file + - errors_report_file type: object - - _key: '403' - description: Forbidden. + - _key: '400' + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '409' - description: 'Conflict. A certificate issuer with this name already exists. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + description: Message describing the error condition. type: string - - _key: message - description: Error message related to the field. + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message type: object type: array - _key: message - description: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '424' - description: 'The request failed due to customer configured external service. - - ' + - _key: '401' + description: Invalid access token. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -13988,182 +28748,358 @@ entities: return_info: custom: false self: true - type: certificate_issuer - return_type: certificate_issuer - summary: Create certificate issuer. + type: device_enrollment_bulk_create + return_type: device_enrollment_bulk_create + summary: Bulk upload. x_deprecation: null x_filter: {} - - _key: delete - description: 'Delete a certificate issuer by ID. + - _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. + 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. -
- **Example usage:** + **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: ``` - curl -X DELETE \ + "entity__id","entity__created_at","error__code","error__type","error__message","error__fields" - -H ''authorization: '' \ + "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","","","","" - https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/0162155dc77d507b9d48a91b00000000 + "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 '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} + + ```' drop_fields: - object - etag - type - - groups - filter + - account_id + - created_at + - status + - total_count + - processed_count + - errors_count + - completed_at + - full_report_file + - errors_report_file field_renames: [] - fields: - - _key: id - api_fieldname: certificate-issuer-id - description: 'Certificate issuer ID.
The ID of the certificate issuer. - - An active certificate issuer may not be deleted. - - ' + fields: + - _key: id + api_fieldname: id + description: Bulk ID entity_fieldname: id - external_param: false in: path - name: certificate-issuer-id - parameter_fieldname: certificate-issuer-id + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} required: true type: string - group_id: Security - method: delete - mode: delete - operation_id: deleteCertificateIssuer + group_id: Devices + method: get + mode: read + operation_id: getBulkDeviceEnrollment pagination: false - parameter_map: - certificate-issuer-id: id - path: /v3/certificate-issuers/{certificate-issuer-id} + path: /v3/device-enrollments-bulk-uploads/{id} request_body: json request_content_type: application/json responses: - - _key: '204' - description: Certificate issuer deleted. - - _key: '400' - description: 'Validation error: An active certificate issuer cannot be deleted. - - ' + - _key: '200' + description: Bulk upload entity found. schema: + foreign_key: + entity: device_enrollment_bulk_delete + group: Devices properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 + - _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: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. + - _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: object - description: 'Entity name: `error`.' + 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: request_id - description: Request ID from JWT. + - _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: type - description: Error type. + x-nullable: true + - _key: id + api_fieldname: id + description: Bulk ID + entity_fieldname: id + 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 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: - - code - - fields - - message - object - - request_id - - type + - 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: Unauthorized. + - _key: '400' + description: Bad request. Invalid bulk identity. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Invalid access token. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -14174,36 +29110,44 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -14212,295 +29156,382 @@ entities: return_info: custom: false self: true - type: certificate_issuer - return_type: certificate_issuer - summary: Delete certificate issuer. + type: device_enrollment_bulk_create + return_type: device_enrollment_bulk_create + summary: Get bulk upload entity. 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. + primary_key_field: id + swagger_models: + - BulkResponse + tags: + - Device ownership - enrollments +- _key: device_enrollment_bulk_delete + 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. - ' + 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 + 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: 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: 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: 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 - - groups - filter - - has_more + - id + - account_id + - created_at + - status - total_count - - data + - processed_count + - errors_count + - completed_at + - full_report_file + - errors_report_file field_renames: [] fields: - - _key: after - api_fieldname: after - description: The ID of The item after which to retrieve the next page. - entity_fieldname: after - example: '01631667477600000000000100100374' - external_param: true - in: query - name: after - parameter_fieldname: after - required: false - type: string - - _key: include - api_fieldname: include - description: 'Comma-separated list of data fields 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: 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 - external_param: true - in: query - maximum: 1000 - minimum: 2 - name: limit - parameter_fieldname: limit - required: false - type: integer - - _key: order - api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - entity_fieldname: order - example: DESC - external_param: true - in: query - name: order - parameter_fieldname: order - required: false - type: string - foreign_key: - entity: certificate_issuer - group: Security - foreign_key_priority: self - group_id: Security - method: get - mode: list - operation_id: getCertificateIssuers - pagination: true - parameter_map: - certificate-issuer-id: id - path: /v3/certificate-issuers - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: OK. - schema: - foreign_key: - entity: certificate_issuer - group: Security - pagination: true - properties: - - _key: after - api_fieldname: after - description: The ID of The item after which to retrieve the next page. - entity_fieldname: after - example: '01631667477600000000000100100374' - external_param: true - in: query - name: after - parameter_fieldname: after - required: false - type: string - - _key: data - api_fieldname: data - description: List of certificate issuers. - entity_fieldname: data - items: - foreign_key: - entity: certificate_issuer - group: Security - properties: - - _key: created_at - description: Creation UTC time RFC3339. - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - - _key: description - description: General description for the certificate issuer. - example: GlobalSign sample issuer - maxLength: 100 - type: string - x-nullable: true - - _key: etag - description: Entity instance signature. - example: '1' - type: string - - _key: id - description: The ID of the certificate issuer. - example: 01234567890ABCDEF01234567890ABCDEF - type: string - - _key: issuer_attributes - additionalProperties: - type: string - description: 'General attributes for connecting the certificate issuer. + - _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: stream + name: enrollment_identities + parameter_fieldname: enrollment_identities + required: true + type: file + group_id: Devices + 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: '201' + description: Bulk delete data received and asynchronous processing started. + schema: + foreign_key: + entity: device_enrollment_bulk_create + 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. - When the issuer_type is GLOBAL_SIGN, the value shall be empty. + 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. - When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. + 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. - ' - 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" - enum: - - GLOBAL_SIGN - - CFSSL_AUTH - example: GLOBAL_SIGN - type: string - - _key: name - description: Certificate issuer name, unique per account. - example: GS Issuer - maxLength: 50 - type: string - - _key: object - enum: - - certificate-issuer - type: string - required: - - issuer_type - type: 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 - external_param: true - in: query - maximum: 1000 - minimum: 2 - name: limit - parameter_fieldname: limit - required: false - type: integer + 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 order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - entity_fieldname: order - example: DESC - external_param: true - in: query - name: order - parameter_fieldname: order - required: false + - _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: 1 - format: integer + 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 - - _key: '401' - description: Unauthorized. + - _key: '400' + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Invalid access token. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -14509,241 +29540,361 @@ entities: return_info: custom: false self: true - type: certificate_issuer - return_type: paginated_response(certificate_issuer) - summary: Get certificate issuers list. + type: device_enrollment_bulk_delete + return_type: device_enrollment_bulk_delete + summary: Bulk delete. + 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 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: (No description provided) + 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). + + + 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 '' \ + + https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} + + ```' drop_fields: - object - etag - type - - groups - filter + - account_id - created_at - - issuer_type - - name - - description - - issuer_attributes + - status + - total_count + - processed_count + - errors_count + - completed_at + - full_report_file + - errors_report_file field_renames: [] fields: - _key: id api_fieldname: id - description: The ID of the certificate issuer. + description: Bulk ID entity_fieldname: id - example: 01234567890ABCDEF01234567890ABCDEF in: path - parameter_fieldname: certificate-issuer-id + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} required: true type: string - group_id: Security + group_id: Devices method: get mode: read - operation_id: getCertificateIssuer + operation_id: getBulkDeviceEnrollmentDelete pagination: false - parameter_map: - certificate-issuer-id: id - path: /v3/certificate-issuers/{certificate-issuer-id} + path: /v3/device-enrollments-bulk-deletes/{id} request_body: json request_content_type: application/json responses: - _key: '200' - description: OK. + description: Bulk delete entity found. schema: foreign_key: - entity: certificate_issuer - group: Security + entity: device_enrollment_bulk_create + 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: Creation UTC time RFC3339. + description: The time of receiving the bulk creation task. entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' format: date-time type: string - - _key: description - api_fieldname: description - description: General description for the certificate issuer. - entity_fieldname: description - example: GlobalSign sample issuer - maxLength: 100 + - _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: Entity instance signature. + 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: The ID of the certificate issuer. + description: Bulk ID entity_fieldname: id - example: 01234567890ABCDEF01234567890ABCDEF - type: string - - _key: issuer_attributes - additionalProperties: - type: string - 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. - - ' - 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" - entity_fieldname: issuer_type - enum: - - GLOBAL_SIGN - - CFSSL_AUTH - example: GLOBAL_SIGN - type: string - - _key: name - api_fieldname: name - description: Certificate issuer name, unique per account. - entity_fieldname: name - example: GS Issuer - maxLength: 50 + in: path + parameter_fieldname: id + pattern: ^[A-Za-z0-9]{32} + required: true type: string - _key: object api_fieldname: object entity_fieldname: object enum: - - certificate-issuer - type: string - required: - - issuer_type - type: object - - _key: '400' - description: 'Validation error: The data used to get the certificate issuer - failed validation. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. + - enrollment-identity-bulk-uploads + example: enrollment-identity-bulk-uploads type: string - - _key: type - description: Error type. + - _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: - - code - - fields - - message - object - - request_id - - type + - 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: Unauthorized. + - _key: '400' + description: Bad request. Invalid bulk identity. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Invalid access token. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -14754,36 +29905,44 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -14792,565 +29951,674 @@ entities: return_info: custom: false self: true - type: certificate_issuer - return_type: certificate_issuer - summary: Get certificate issuer by ID. + type: device_enrollment_bulk_delete + return_type: device_enrollment_bulk_delete + summary: Get bulk delete entity. 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\ - \ \\\n-d '{\n \"description\": \"Sample GlobalSign certificate issuer - updated.\"\ - ,\n \"name\": \"GlobalSign Issuer\"\n}'\n```\n" + primary_key_field: id + swagger_models: + - BulkResponse + tags: + - Device ownership - enrollments +- _key: device_events + field_renames: [] + fields: + - _key: changes + additionalProperties: + type: object + api_fieldname: changes + example: [] + readOnly: true + required: false + 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: [] + - _key: created_at + api_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: data + additionalProperties: + type: string + api_fieldname: data + description: Additional data relevant to the event. + example: + campaign_id: '00000000000000000000000000000000' + readOnly: true + required: false + type: object + - _key: date_time + api_fieldname: date_time + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + example: Device record created + readOnly: true + required: false + type: string + - _key: device_id + api_fieldname: device_id + example: '00000000000000000000000000000000' + readOnly: true + required: false + type: string + - _key: event_type + api_fieldname: event_type + description: Event code + example: UPD2_100 + maxLength: 100 + readOnly: true + required: false + type: string + - _key: event_type_category + api_fieldname: event_type_category + description: Category code that groups the event type by a summary category. + example: FAIL_MANIFEST_REJECTED + readOnly: true + required: false + type: string + - _key: event_type_description + api_fieldname: event_type_description + description: Generic description of the event. + example: FAIL + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + example: '00000000000000000000000000000000' + readOnly: false + required: true + type: string + - _key: state_change + api_fieldname: state_change + readOnly: true + required: false + type: boolean + group_id: Devices + methods: + - _key: list + 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://www.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 - type - - groups - filter - - created_at - - issuer_type + - data + - has_more + - total_count + - date_time__in + - date_time__nin + - date_time__lte + - date_time__gte + - description__eq + - description__neq + - description__in + - description__nin + - id__eq + - id__neq + - id__in + - id__nin + - device_id__eq + - device_id__neq + - device_id__in + - device_id__nin + - event_type__eq + - event_type__neq + - event_type__in + - event_type__nin + - state_change__eq + - state_change__neq field_renames: [] fields: - - _key: description - api_fieldname: description - description: General description for the certificate issuer. - entity_fieldname: description - example: GlobalSign sample issuer - in: body - maxLength: 100 - parameter_fieldname: description + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: null + external_param: true + in: query + name: after + parameter_fieldname: after required: false type: string - x-nullable: true - - _key: id - api_fieldname: id - description: The ID of the certificate issuer. - entity_fieldname: id - example: 01234567890ABCDEF01234567890ABCDEF - in: path - parameter_fieldname: certificate-issuer-id - required: true - type: string - - _key: issuer_attributes - additionalProperties: - type: string - 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. - - ' - entity_fieldname: issuer_attributes - example: [] - in: body - parameter_fieldname: issuer_attributes + - _key: include + api_fieldname: include + description: 'Comma-separated list of data fields to return. Currently supported: + `total_count`.' + entity_fieldname: include + external_param: true + in: query + name: include + parameter_fieldname: include required: false - type: object - - _key: issuer_credentials - additionalProperties: - type: string - api_fieldname: issuer_credentials - 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. - - ' - entity_fieldname: issuer_credentials - example: [] + type: string + - _key: limit + api_fieldname: limit + description: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. + entity_fieldname: limit + example: 1000 external_param: true - in: body - name: issuer_credentials - parameter_fieldname: issuer_credentials + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit required: false - schema_param: true - type: object - - _key: name - api_fieldname: name - description: Certificate issuer name, unique per account. - entity_fieldname: name - example: GS Issuer - in: body - maxLength: 50 - parameter_fieldname: name + type: integer + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order required: false type: string - group_id: Security - method: put - mode: update - operation_id: updateCertificateIssuer + foreign_key: + entity: device_events + group: Devices + foreign_key_priority: self + group_id: Devices + method: get + mode: list + operation_id: Device_Event_list + pagination: true + path: /v3/device-events/ + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Request successful. + schema: + foreign_key: + entity: device_events + group: Devices + pagination: true + properties: + - _key: after + api_fieldname: after + entity_fieldname: after + example: null + type: string + - _key: data + api_fieldname: data + entity_fieldname: data + example: '[]' + items: + foreign_key: + entity: device_events + group: Devices + properties: + - _key: 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: [] + - _key: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: data + additionalProperties: + type: string + description: Additional data relevant to the event. + example: + campaign_id: '00000000000000000000000000000000' + type: object + - _key: date_time + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: description + example: Device record created + type: string + - _key: device_id + example: '00000000000000000000000000000000' + type: string + - _key: etag + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: event_type + description: Event code + example: UPD2_100 + maxLength: 100 + type: string + - _key: event_type_category + description: Category code that groups the event type by a summary category. + example: FAIL_MANIFEST_REJECTED + type: string + - _key: event_type_description + description: Generic description of the event. + example: FAIL + type: string + - _key: id + example: '00000000000000000000000000000000' + type: string + - _key: object + description: The API resource entity. + example: device-event + type: string + - _key: state_change + type: boolean + required: + - date_time + - id + type: array + - _key: has_more + api_fieldname: has_more + entity_fieldname: has_more + example: false + type: boolean + - _key: limit + api_fieldname: limit + entity_fieldname: limit + example: 1000 + type: integer + - _key: object + api_fieldname: object + entity_fieldname: object + example: list + type: string + - _key: order + api_fieldname: order + entity_fieldname: order + example: DESC + type: string + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + example: 1 + type: integer + - _key: '400' + description: Bad request. + - _key: '401' + description: Not authenticated. + - _key: '404' + description: Unable to find page. + return_info: + custom: false + self: true + type: device_events + return_type: paginated_response(device_events) + summary: List all device events. + x_deprecation: null + x_filter: + date_time: + - in + - nin + - lte + - gte + description: + - eq + - neq + - in + - nin + device_id: + - eq + - neq + - in + - nin + event_type: + - eq + - neq + - in + - nin + id: + - eq + - neq + - in + - nin + state_change: + - eq + - neq + - _key: read + 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 from ''/v3/device-events''. + Form of ''016c03d40a4e000000000001001003b4'' + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/device-events/ + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - created_at + - changes + - data + - date_time + - description + - device_id + - event_type + - event_type_category + - event_type_description + - state_change + field_renames: [] + fields: + - _key: id + api_fieldname: id + entity_fieldname: id + example: '00000000000000000000000000000000' + in: path + parameter_fieldname: device_event_id + required: true + type: string + group_id: Devices + method: get + mode: read + operation_id: Device_Event_retrieve pagination: false parameter_map: - certificate-issuer-id: id - path: /v3/certificate-issuers/{certificate-issuer-id} + device_event_id: id + path: /v3/device-events/{device_event_id}/ request_body: json request_content_type: application/json responses: - _key: '200' - description: OK. + description: Retrieved result successfully. schema: foreign_key: - entity: certificate_issuer - group: Security + entity: device_events + group: Devices properties: + - _key: changes + additionalProperties: + type: object + api_fieldname: changes + entity_fieldname: changes + 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: [] - _key: created_at api_fieldname: created_at - description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: data + additionalProperties: + type: string + api_fieldname: data + description: Additional data relevant to the event. + entity_fieldname: data + example: + campaign_id: '00000000000000000000000000000000' + type: object + - _key: date_time + api_fieldname: date_time + entity_fieldname: date_time + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - _key: description api_fieldname: description - description: General description for the certificate issuer. entity_fieldname: description - example: GlobalSign sample issuer - maxLength: 100 + example: Device record created + type: string + - _key: device_id + api_fieldname: device_id + entity_fieldname: device_id + example: '00000000000000000000000000000000' type: string - x-nullable: true - _key: etag api_fieldname: etag - description: Entity instance signature. entity_fieldname: etag - example: '1' + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: event_type + api_fieldname: event_type + description: Event code + entity_fieldname: event_type + example: UPD2_100 + maxLength: 100 + type: string + - _key: event_type_category + api_fieldname: event_type_category + description: Category code that groups the event type by a summary category. + entity_fieldname: event_type_category + example: FAIL_MANIFEST_REJECTED + type: string + - _key: event_type_description + api_fieldname: event_type_description + description: Generic description of the event. + entity_fieldname: event_type_description + example: FAIL type: string - _key: id api_fieldname: id - description: The ID of the certificate issuer. entity_fieldname: id - example: 01234567890ABCDEF01234567890ABCDEF - type: string - - _key: issuer_attributes - additionalProperties: - type: string - 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. - - ' - 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" - entity_fieldname: issuer_type - enum: - - GLOBAL_SIGN - - CFSSL_AUTH - example: GLOBAL_SIGN - type: string - - _key: name - api_fieldname: name - description: Certificate issuer name, unique per account. - entity_fieldname: name - example: GS Issuer - maxLength: 50 + example: '00000000000000000000000000000000' type: string - _key: object api_fieldname: object + description: The API resource entity. entity_fieldname: object - enum: - - certificate-issuer + example: device-event type: string + - _key: state_change + api_fieldname: state_change + entity_fieldname: state_change + type: boolean required: - - issuer_type - type: object + - date_time + - id - _key: '400' - description: 'Validation error: The data used to update the certificate issuer - failed validation. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object + description: Bad request. - _key: '401' - description: Unauthorized. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object + description: Not authenticated. - _key: '404' - description: Not found. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '409' - description: 'Conflict. A certificate issuer with this name already exists. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '424' - description: 'The request failed due to customer configured external service. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object + description: Unable to find device. return_info: custom: false self: true - type: certificate_issuer - return_type: certificate_issuer - summary: Update certificate issuer. + type: device_events + return_type: device_events + summary: Retrieve a device event. 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. - -
- - **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. - -
- - **Example usage:** - - - ``` - - curl -X POST \ - - -H ''authorization: '' \ - - -H ''content-type: application/json;charset=UTF-8'' \ - - https://api.us-east-1.mbedcloud.com/v3/certificate-issuers/01621a36719d507b9d48a91b00000000/verify - - ``` - - ' + primary_key_field: id + swagger_models: + - DeviceEventData + - DeviceEventPage + tags: + - Device directory - events +- _key: device_group + field_renames: [] + fields: + - _key: created_at + api_fieldname: created_at + description: The time the group was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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 + readOnly: false + required: false + type: object + - _key: description + api_fieldname: description + description: The description of the group. + example: Devices on the factory floor. + maxLength: 1024 + readOnly: false + required: false + type: string + - _key: devices_count + api_fieldname: devices_count + description: The number of devices in this group. + example: 10 + readOnly: true + required: false + type: integer + - _key: id + api_fieldname: id + description: The group ID. + example: 015c3029f6f7000000000001001000c3 + readOnly: false + required: true + type: string + - _key: name + api_fieldname: name + description: Name of the group. + example: My devices + maxLength: 128 + readOnly: false + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: The time this object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Devices + methods: + - _key: add_device + description: Add one device to a group. A device can be in multiple groups. drop_fields: - object - etag - type - - groups - filter - - successful - - message field_renames: [] fields: + - _key: device_id + api_fieldname: device_id + entity_fieldname: device_id + example: '00000000000000000000000000000000' + external_param: true + in: body + name: device_id + parameter_fieldname: device_id + required: false + schema_param: true + type: string - _key: id - api_fieldname: certificate-issuer-id - description: 'Certificate issuer ID.
The ID of the certificate issuer. - - ' + api_fieldname: device-group-id + description: The ID of the group. entity_fieldname: id external_param: false in: path - name: certificate-issuer-id - parameter_fieldname: certificate-issuer-id + name: device-group-id + parameter_fieldname: device-group-id required: true type: string - foreign_key: - entity: verification_response - group: Security - group_id: Security + group_id: Devices method: post - mode: verify - operation_id: verifyCertificateIssuer + mode: add_device + operation_id: Group_members_add pagination: false parameter_map: - certificate-issuer-id: id - path: /v3/certificate-issuers/{certificate-issuer-id}/verify + device-group-id: id + path: /v3/device-groups/{device-group-id}/devices/add/ request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK. - schema: - foreign_key: - entity: verification_response - group: Security - properties: - - _key: message - api_fieldname: message - description: 'Provides details in case of failure. - - ' - entity_fieldname: message - example: message describing the verification failure - type: string - - _key: successful - api_fieldname: successful - description: 'Indicates whether the certificate issuer was verified successfully. - - ' - entity_fieldname: successful - example: false - type: boolean - type: object + - _key: '204' + description: Success - device added. - _key: '400' - description: Validation error + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -15361,76 +30629,44 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + description: Message describing the error condition. type: string - - _key: message - description: Error message related to the field. + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message type: object type: array - _key: message - description: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -15441,305 +30677,243 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '424' - description: 'The request failed due to customer configured external service. - - ' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + description: Message describing the error condition. type: string - - _key: message - description: Error message related to the field. + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message type: object type: array - _key: message - description: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object return_info: - custom: false + custom: true self: false - type: verification_response - return_type: verification_response - summary: Verify certificate issuer. - unaggregated: true + type: void + return_type: void + spec: + return_type: void + summary: Add a device to a group. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - CertificateIssuerInfo - - CertificateIssuerInfoListResponse - - CertificateIssuerRequest - - CertificateIssuerUpdateRequest - - CertificateIssuerVerifyResponse - tags: - - 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. - - ' - example: 01648415a2a30242ac18000500000000 - readOnly: false - required: true - type: string - x-nullable: true - - _key: created_at - api_fieldname: created_at - description: Created UTC time RFC3339. - example: '2017-01-01T00:00:00Z' - format: date-time - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' - example: 01648415a2a30242ac18000500000000 - readOnly: false - required: true - type: string - - _key: reference - api_fieldname: reference - description: The certificate name to which the certificate issuer configuration - applies. - example: customer.dlms - readOnly: false - required: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Updated UTC time RFC3339. - example: '2017-02-01T00:00:00Z' - format: date-time - readOnly: true - required: false - type: string - 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\ - \ \\\n-d '{\n \"reference\": \"customer.dlms\",\n \"certificate_issuer_id\"\ - : \"01621a36719d507b9d48a91b00000000\"\n}'\n```\n" + description: Create a group. drop_fields: - object - etag - type - - groups - filter - - is_custom - id + - devices_count - created_at - updated_at 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. - - ' - entity_fieldname: certificate_issuer_id - example: 01648415a2a30242ac18000500000000 + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value in: body - parameter_fieldname: certificate_issuer_id + maxProperties: 10 + name: custom_attributes + parameter_fieldname: custom_attributes + required: false + schema_param: true + type: object + - _key: description + api_fieldname: description + description: The description of the group. + entity_fieldname: description + example: Devices on the factory floor. + in: body + maxLength: 1024 + name: description + parameter_fieldname: description required: false + schema_param: true type: string - x-nullable: true - - _key: reference - api_fieldname: reference - description: The certificate name to which the certificate issuer configuration - applies. - entity_fieldname: reference - example: customer.dlms + - _key: name + api_fieldname: name + description: Name of the group. + entity_fieldname: name + example: My devices in: body - parameter_fieldname: reference - required: true + maxLength: 128 + name: name + parameter_fieldname: name + required: false + schema_param: true type: string - group_id: Security + group_id: Devices method: post mode: create - operation_id: createCertificateIssuerConfig + operation_id: Group_create pagination: false parameter_map: - certificate-issuer-configuration-id: id - path: /v3/certificate-issuer-configurations + device-group-id: id + path: /v3/device-groups/ request_body: json request_content_type: application/json responses: - _key: '201' - description: OK. + description: Created. schema: foreign_key: - entity: certificate_issuer_config - group: Security + entity: device_group + group: Devices 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. - - ' - entity_fieldname: certificate_issuer_id - example: 01648415a2a30242ac18000500000000 - type: string - x-nullable: true - _key: created_at api_fieldname: created_at - description: Created UTC time RFC3339. + description: The time the group was created. entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + maxProperties: 10 + type: object + - _key: description + api_fieldname: description + description: The description of the group. + entity_fieldname: description + example: Devices on the factory floor. + maxLength: 1024 + type: string + - _key: devices_count + api_fieldname: devices_count + description: The number of devices in this group. + entity_fieldname: devices_count + example: 10 + type: integer - _key: etag api_fieldname: etag - description: Entity instance signature. entity_fieldname: etag - example: '1' + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: The group ID. entity_fieldname: id - example: 01648415a2a30242ac18000500000000 + example: 015c3029f6f7000000000001001000c3 + type: string + - _key: name + api_fieldname: name + description: Name of the group. + entity_fieldname: name + example: My devices + maxLength: 128 type: string - - _key: is_custom - api_fieldname: is_custom - entity_fieldname: is_custom - example: true - type: boolean - _key: object api_fieldname: object + description: 'Entity name: always `device-group`.' entity_fieldname: object - enum: - - certificate-issuer-configuration - type: string - - _key: reference - api_fieldname: reference - description: The certificate name to which the certificate issuer configuration - applies. - entity_fieldname: reference - example: customer.dlms + example: device-group type: string - _key: updated_at api_fieldname: updated_at - description: Updated UTC time RFC3339. + description: The time this object was updated. entity_fieldname: updated_at - example: '2017-02-01T00:00:00Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string type: object - _key: '400' - description: Validation error. + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -15750,119 +30924,92 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + description: Message describing the error condition. type: string - - _key: message - description: Error message related to the field. + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message type: object type: array - _key: message - description: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - _key: '409' - description: 'A certificate issuer configuration with this reference already - exists. - - ' + description: Conflict - Group name already exists. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -15871,351 +31018,764 @@ entities: return_info: custom: false self: true - type: certificate_issuer_config - return_type: certificate_issuer_config - summary: Create certificate issuer configuration. + type: device_group + return_type: device_group + summary: Create a group. 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 a group. This deletes the group, but not the devices in the + group. drop_fields: - object - etag - type - - groups - filter - - is_custom field_renames: [] fields: - _key: id - api_fieldname: certificate-issuer-configuration-id - description: 'The ID of the certificate issuer configuration. - - ' + api_fieldname: device-group-id + description: The ID of the group. entity_fieldname: id external_param: false in: path - name: certificate-issuer-configuration-id - parameter_fieldname: certificate-issuer-configuration-id + name: device-group-id + parameter_fieldname: device-group-id required: true type: string - group_id: Security + group_id: Devices method: delete mode: delete - operation_id: deleteCertificateIssuerConfigByID + operation_id: Group_delete pagination: false parameter_map: - certificate-issuer-configuration-id: id - path: /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} + device-group-id: id + path: /v3/device-groups/{device-group-id}/ request_body: json request_content_type: application/json responses: - _key: '204' - description: No content. - - _key: '400' - description: Validation error. + description: Success - group deleted. + - _key: '401' + description: Unauthorized. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '401' - description: Unauthorized. + - _key: '404' + description: Not Found. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + return_info: + custom: false + self: true + type: device_group + return_type: device_group + summary: Delete a group. + x_deprecation: null + x_filter: {} + - _key: devices + description: Get a page of devices in a specified group. + 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 + - 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 + field_renames: [] + fields: + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: '01631667477600000000000100100374' + external_param: true + in: query + name: after + parameter_fieldname: after + required: false + type: string + - _key: id + api_fieldname: device-group-id + entity_fieldname: id + external_param: false + in: path + name: device-group-id + parameter_fieldname: device-group-id + required: true + type: string + - _key: include + api_fieldname: include + description: 'Comma-separated list of data fields 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: How many objects to retrieve in the page (2-1000). Limit values + outside of this 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 + type: integer + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: device + group: Devices + group_id: Devices + method: get + mode: devices + operation_id: Group_members_retrieve + pagination: true + parameter_map: + device-group-id: id + path: /v3/device-groups/{device-group-id}/devices/ + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Ok. schema: + foreign_key: + entity: device + group: Devices + pagination: true properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: '01631667477600000000000100100374' + external_param: true + in: query + name: after + parameter_fieldname: after + required: false + type: string + - _key: data + api_fieldname: data + entity_fieldname: data items: - properties: - - _key: field - description: Field name. + - _key: foreign_key + entity: device + group: Devices + - _key: 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. + 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: + 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: + 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 + issuer_fingerprint: + 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 + x-nullable: true + last_operator_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' + 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 + 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 + type: string + last_system_suspended_category: + description: The reference of the block category. + example: maintenance + pattern: '[a-f0-9_]{32}' type: string - - _key: message - description: Error message related to the field. + 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 - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '404' - description: Not found. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + 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 - - _key: message - description: Error message related to the field. + 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 - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - return_info: - custom: false - self: true - type: certificate_issuer_config - return_type: certificate_issuer_config - summary: Delete certificate issuer configuration. - x_deprecation: null - x_filter: {} - - _key: get_default - description: 'Provides the configured certificate issuer to be used when creating - device + manifest: + description: 'DEPRECATED: The URL for the current device manifest.' + example: '' + 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: 'NOT USED: The ID of the channel used to communicate with + the device.' + enum: + - connector + - direct + type: string + mechanism_url: + description: 'NOT USED: The address of the connector to use.' + example: '' + type: string + name: + 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: Device has been suspended by operator. + type: boolean + serial_number: + description: The [serial number](https://www.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. - certificates for LwM2M communication.
+ * Unenrolled: The device has been created, but has not yet bootstrapped + or connected to Device Management. - ' - drop_fields: - - object - - etag - - type - - groups - - filter - - is_custom - - id - - certificate_issuer_id - - reference - - created_at - - updated_at - field_renames: [] - fields: [] - group_id: Security - method: get - mode: get_default - operation_id: getCertificateIssuerConfig - pagination: false - parameter_map: - certificate-issuer-configuration-id: id - path: /v3/certificate-issuer-configurations/lwm2m - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: OK. - schema: - foreign_key: - entity: certificate_issuer_config - group: Security - properties: - - _key: certificate_issuer_id - api_fieldname: certificate_issuer_id - description: 'The ID of the certificate issuer. + * 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. - Null if Device Management internal HSM is used. + * Bootstrapped: The device has bootstrapped, and has credentials to + connect to Device Management. - ' - entity_fieldname: certificate_issuer_id - example: 01648415a2a30242ac18000500000000 - type: string - x-nullable: true - - _key: created_at - api_fieldname: created_at - description: Created UTC time RFC3339. - entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - - _key: etag - api_fieldname: etag - description: Entity instance signature. - entity_fieldname: etag - example: '1' - type: string - - _key: id - api_fieldname: id - description: 'The ID of the certificate issuer configuration. + * Registered: The device has registered with Pelion Device Management. + [Device commands](https://www.pelion.com/docs/device-management-api/connect/) + can be queued. The device sends events for [subscribed](https://www.pelion.com/docs/device-management/current/resources/handle-resource-webapp.html) + resources. - ' - entity_fieldname: id - example: 01648415a2a30242ac18000500000000 - type: string - - _key: is_custom - api_fieldname: is_custom - entity_fieldname: is_custom - example: true + * 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 this data object was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + vendor_id: + description: The device vendor ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + 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 (2-1000). Limit values + outside of this 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 + type: integer - _key: object api_fieldname: object + description: The type of this API object is a "list". entity_fieldname: object - enum: - - certificate-issuer-configuration - type: string - - _key: reference - api_fieldname: reference - description: The certificate name to which the certificate issuer configuration - applies. - entity_fieldname: reference - example: customer.dlms + example: list type: string - - _key: updated_at - api_fieldname: updated_at - description: Updated UTC time RFC3339. - entity_fieldname: updated_at - example: '2017-02-01T00:00:00Z' - format: date-time + - _key: order + api_fieldname: order + description: 'Record order. Acceptable values: ASC, DESC. Default: ASC.' + entity_fieldname: order + example: DESC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string - type: object + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + example: 1 + format: integer + type: integer - _key: '400' - description: Validation error. + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -16226,76 +31786,92 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: Not found. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -16303,65 +31879,223 @@ entities: type: object return_info: custom: false - self: true - type: certificate_issuer_config - return_type: certificate_issuer_config - summary: Get certificate issuer configuration. + self: false + type: device + return_type: paginated_response(device) + summary: Get a page of devices. x_deprecation: null - x_filter: {} - - _key: list - description: 'Get certificate issuer configurations, optionally filtered by reference. - -
- - **Example usage:** - - - ``` - - curl \ - - -H ''authorization: '' \ - - -H ''content-type: application/json;charset=UTF-8'' \ - - https://api.us-east-1.mbedcloud.com/v3/certificate-issuer-configurations \ - - ``` - - ``` - - curl \ - - -H ''authorization: '' \ - - -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. - - ' + x_filter: + 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 + last_operator_suspended_category: + - eq + - neq + - in + - nin + last_operator_suspended_updated_at: + - in + - nin + - lte + - gte + last_system_suspended_category: + - eq + - neq + - in + - nin + last_system_suspended_updated_at: + - in + - nin + - lte + - gte + lifecycle_status: + - 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 + operator_suspended: + - eq + - neq + serial_number: + - eq + - neq + - in + - nin + state: + - eq + - neq + - in + - nin + system_suspended: + - eq + - neq + updated_at: + - in + - nin + - lte + - gte + vendor_id: + - eq + - neq + - in + - nin + - _key: list + description: List all groups. drop_fields: - object - etag - type - - groups - filter - - is_custom + - data - has_more - total_count - - data - - reference__eq + - id__eq + - id__neq + - id__in + - id__nin + - devices_count__eq + - devices_count__neq + - devices_count__in + - devices_count__nin + - devices_count__lte + - devices_count__gte + - name__eq + - name__neq + - name__in + - name__nin + - created_at__in + - created_at__nin + - created_at__lte + - created_at__gte + - updated_at__in + - updated_at__nin + - updated_at__lte + - updated_at__gte field_renames: [] 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 @@ -16373,7 +32107,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 @@ -16383,9 +32117,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: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. entity_fieldname: limit example: 50 external_param: true @@ -16398,8 +32131,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 @@ -16409,26 +32141,26 @@ entities: required: false type: string foreign_key: - entity: certificate_issuer_config - group: Security + entity: device_group + group: Devices foreign_key_priority: self - group_id: Security + group_id: Devices method: get mode: list - operation_id: getCertificateIssuerConfigs + operation_id: Group_list pagination: true parameter_map: - certificate-issuer-configuration-id: id - path: /v3/certificate-issuer-configurations + device-group-id: id + path: /v3/device-groups/ request_body: json request_content_type: application/json responses: - _key: '200' - description: OK. + description: Ok. schema: foreign_key: - entity: certificate_issuer_config - group: Security + entity: device_group + group: Devices pagination: true properties: - _key: after @@ -16439,67 +32171,72 @@ entities: type: string - _key: data api_fieldname: data - description: List of certificate issuers. entity_fieldname: data items: foreign_key: - entity: certificate_issuer_config - group: Security + entity: device_group + group: Devices properties: - - _key: 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 - _key: created_at - description: Created UTC time RFC3339. - example: '2017-01-01T00:00:00Z' + description: The time the group was created. + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + - _key: custom_attributes + 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 + - _key: description + description: The description of the group. + example: Devices on the factory floor. + maxLength: 1024 + type: string + - _key: devices_count + description: The number of devices in this group. + example: 10 + type: integer - _key: etag - description: Entity instance signature. - example: '1' + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - _key: id - description: 'The ID of the certificate issuer configuration. - - ' - example: 01648415a2a30242ac18000500000000 + description: The group ID. + example: 015c3029f6f7000000000001001000c3 type: string - - _key: is_custom - example: true - type: boolean - - _key: object - enum: - - certificate-issuer-configuration + - _key: name + description: Name of the group. + example: My devices + maxLength: 128 type: string - - _key: reference - description: The certificate name to which the certificate issuer configuration - applies. - example: customer.dlms + - _key: object + description: 'Entity name: always `device-group`.' + example: device-group type: string - _key: updated_at - description: Updated UTC time RFC3339. - example: '2017-02-01T00:00:00Z' + description: The time this object was updated. + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string type: object 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: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. entity_fieldname: limit example: 50 maximum: 1000 @@ -16507,13 +32244,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 @@ -16524,121 +32261,97 @@ entities: format: integer type: integer type: object - - _key: '400' - description: Validation error. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - _key: '401' description: Unauthorized. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: Not Found. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -16647,152 +32360,192 @@ entities: return_info: custom: false self: true - type: certificate_issuer_config - return_type: paginated_response(certificate_issuer_config) - summary: Get certificate issuer configurations. + type: device_group + return_type: paginated_response(device_group) + summary: List all groups. x_deprecation: null x_filter: - reference: + created_at: + - in + - nin + - lte + - gte + devices_count: + - eq + - neq + - in + - nin + - lte + - gte + id: + - eq + - neq + - in + - nin + name: - eq + - neq + - in + - nin + updated_at: + - in + - nin + - lte + - gte - _key: read - description: 'Provides the configured certificate issuer. - - ' + description: Returns [DeviceGroup](https://www.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 - type - - groups - filter - - is_custom - - certificate_issuer_id - - reference + - name + - description + - custom_attributes + - devices_count - created_at - updated_at field_renames: [] fields: - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: The group ID. entity_fieldname: id - example: 01648415a2a30242ac18000500000000 + example: 015c3029f6f7000000000001001000c3 in: path - parameter_fieldname: certificate-issuer-configuration-id + parameter_fieldname: device-group-id required: true type: string - group_id: Security + group_id: Devices method: get mode: read - operation_id: getCertificateIssuerConfigByID + operation_id: Group_retrieve pagination: false parameter_map: - certificate-issuer-configuration-id: id - path: /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} + device-group-id: id + path: /v3/device-groups/{device-group-id}/ request_body: json request_content_type: application/json responses: - _key: '200' - description: OK. + description: Ok. schema: foreign_key: - entity: certificate_issuer_config - group: Security + entity: device_group + group: Devices 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. - - ' - entity_fieldname: certificate_issuer_id - example: 01648415a2a30242ac18000500000000 - type: string - x-nullable: true - _key: created_at api_fieldname: created_at - description: Created UTC time RFC3339. + description: The time the group was created. entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + maxProperties: 10 + type: object + - _key: description + api_fieldname: description + description: The description of the group. + entity_fieldname: description + example: Devices on the factory floor. + maxLength: 1024 + type: string + - _key: devices_count + api_fieldname: devices_count + description: The number of devices in this group. + entity_fieldname: devices_count + example: 10 + type: integer - _key: etag api_fieldname: etag - description: Entity instance signature. entity_fieldname: etag - example: '1' + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - _key: id api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + description: The group ID. entity_fieldname: id - example: 01648415a2a30242ac18000500000000 + example: 015c3029f6f7000000000001001000c3 + type: string + - _key: name + api_fieldname: name + description: Name of the group. + entity_fieldname: name + example: My devices + maxLength: 128 type: string - - _key: is_custom - api_fieldname: is_custom - entity_fieldname: is_custom - example: true - type: boolean - _key: object api_fieldname: object + description: 'Entity name: always `device-group`.' entity_fieldname: object - enum: - - certificate-issuer-configuration - type: string - - _key: reference - api_fieldname: reference - description: The certificate name to which the certificate issuer configuration - applies. - entity_fieldname: reference - example: customer.dlms + example: device-group type: string - _key: updated_at api_fieldname: updated_at - description: Updated UTC time RFC3339. + description: The time this object was updated. entity_fieldname: updated_at - example: '2017-02-01T00:00:00Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string type: object - _key: '400' - description: Validation error. + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -16803,116 +32556,92 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + description: Message describing the error condition. type: string - - _key: message - description: Error message related to the field. + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message type: object type: array - _key: message - description: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - _key: '404' - description: Not found. + description: Not Found. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -16921,167 +32650,97 @@ entities: return_info: custom: false self: true - type: certificate_issuer_config - return_type: certificate_issuer_config - summary: Get certificate issuer configuration. + type: device_group + return_type: device_group + summary: Get a group. x_deprecation: null x_filter: {} - - _key: update - additional_operations: - - 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. - - ' + - _key: remove_device + description: Remove one device from a group. drop_fields: - object - etag - type - - groups - filter - - is_custom - - reference - - created_at - - updated_at 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. - - ' - entity_fieldname: certificate_issuer_id - example: 01648415a2a30242ac18000500000000 + - _key: device_id + api_fieldname: device_id + entity_fieldname: device_id + example: '00000000000000000000000000000000' + external_param: true in: body - parameter_fieldname: certificate_issuer_id + name: device_id + parameter_fieldname: device_id required: false + schema_param: true type: string - x-nullable: true - _key: id - api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' + api_fieldname: device-group-id + description: The ID of the group. entity_fieldname: id - example: 01648415a2a30242ac18000500000000 + external_param: false in: path - parameter_fieldname: certificate-issuer-configuration-id + name: device-group-id + parameter_fieldname: device-group-id required: true type: string - group_id: Security - method: put - mode: update - operation_id: updateCertificateIssuerConfigByID + group_id: Devices + method: post + mode: remove_device + operation_id: Group_members_remove pagination: false parameter_map: - certificate-issuer-configuration-id: id - path: /v3/certificate-issuer-configurations/{certificate-issuer-configuration-id} + device-group-id: id + path: /v3/device-groups/{device-group-id}/devices/remove/ request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK. - schema: - foreign_key: - entity: certificate_issuer_config - group: Security - 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. - - ' - entity_fieldname: certificate_issuer_id - example: 01648415a2a30242ac18000500000000 - type: string - x-nullable: true - - _key: created_at - api_fieldname: created_at - description: Created UTC time RFC3339. - entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - - _key: etag - api_fieldname: etag - description: Entity instance signature. - entity_fieldname: etag - example: '1' - type: string - - _key: id - api_fieldname: id - description: 'The ID of the certificate issuer configuration. - - ' - entity_fieldname: id - example: 01648415a2a30242ac18000500000000 - type: string - - _key: is_custom - api_fieldname: is_custom - entity_fieldname: is_custom - example: true - type: boolean - - _key: object - api_fieldname: object - entity_fieldname: object - enum: - - certificate-issuer-configuration - type: string - - _key: reference - api_fieldname: reference - description: The certificate name to which the certificate issuer configuration - applies. - entity_fieldname: reference - example: customer.dlms - type: string - - _key: updated_at - api_fieldname: updated_at - description: Updated UTC time RFC3339. - entity_fieldname: updated_at - example: '2017-02-01T00:00:00Z' - format: date-time - type: string - type: object + - _key: '204' + description: Success - device removed. - _key: '400' - description: Validation error. + description: Bad request. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -17092,76 +32751,44 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. + description: Message describing the error condition. type: string - - _key: message - description: Error message related to the field. + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message type: object type: array - _key: message - description: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id @@ -17172,222 +32799,210 @@ entities: schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object return_info: - custom: false - self: true - type: certificate_issuer_config - return_type: certificate_issuer_config - summary: Update certificate issuer configuration. + custom: true + self: false + type: void + return_type: void + spec: + return_type: void + summary: Remove a device from a group. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - CertificateIssuerConfigListResponse - - CertificateIssuerConfigRequest - - CertificateIssuerConfigResponse - - CreateCertificateIssuerConfig - tags: - - Certificate Issuers Activation -- _key: dark_theme_color - field_renames: [] - fields: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - example: '#f3f93e' - readOnly: false - required: false - type: string - x-nullable: true - - _key: reference - _override: true - api_fieldname: reference - 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 - enum_reference: dark_theme_color_reference_enum - is_primary_key: true - readOnly: false - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Branding - methods: - - _key: delete - description: '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 '' - - ```' + - _key: update + description: Modify the attributes of a group, such as the description. drop_fields: - object - etag - type - - groups - filter - - color + - devices_count + - created_at - updated_at field_renames: [] fields: - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference - enum: &id002 - - 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 - enum_reference: dark_theme_color_reference_enum + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + in: body + maxProperties: 10 + name: custom_attributes + parameter_fieldname: custom_attributes + required: false + schema_param: true + type: object + - _key: description + api_fieldname: description + description: The description of the group. + entity_fieldname: description + example: Devices on the factory floor. + in: body + maxLength: 1024 + name: description + parameter_fieldname: description + required: false + schema_param: true + type: string + - _key: id + api_fieldname: id + description: The group ID. + entity_fieldname: id + example: 015c3029f6f7000000000001001000c3 in: path - is_primary_key: true - name: reference + parameter_fieldname: device-group-id required: true type: string - group_id: Branding - method: delete - mode: delete - operation_id: resetDarkColor + - _key: name + api_fieldname: name + description: Name of the group. + entity_fieldname: name + example: My devices + in: body + maxLength: 128 + name: name + parameter_fieldname: name + required: false + schema_param: true + type: string + group_id: Devices + method: put + mode: update + operation_id: Group_update pagination: false - path: /v3/branding-colors/dark/{reference} + parameter_map: + device-group-id: id + path: /v3/device-groups/{device-group-id}/ request_body: json request_content_type: application/json responses: - _key: '200' - description: Successful operation. + description: Ok. schema: foreign_key: - entity: subtenant_light_theme_color - group: Branding + entity: device_group + group: Devices properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' + - _key: created_at + api_fieldname: created_at + description: The time the group was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: custom_attributes + additionalProperties: + maxLength: 128 + pattern: ^[A-Za-z].* + type: string + api_fieldname: custom_attributes + 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. + entity_fieldname: custom_attributes + example: + key: value + maxProperties: 10 + type: object + - _key: description + api_fieldname: description + description: The description of the group. + entity_fieldname: description + example: Devices on the factory floor. + maxLength: 1024 + type: string + - _key: devices_count + api_fieldname: devices_count + description: The number of devices in this group. + entity_fieldname: devices_count + example: 10 + type: integer + - _key: etag + api_fieldname: etag + entity_fieldname: etag + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: id + api_fieldname: id + description: The group ID. + entity_fieldname: id + example: 015c3029f6f7000000000001001000c3 + type: string + - _key: name + api_fieldname: name + description: Name of the group. + entity_fieldname: name + example: My devices + maxLength: 128 type: string - x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always `device-group`.' entity_fieldname: object - enum: - - branding_color - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - 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 - is_primary_key: true + example: device-group type: string - _key: updated_at api_fieldname: updated_at - description: Last update time in UTC. + description: The time this object was updated. entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time - readOnly: true type: string type: object - - _key: '401' - description: Authentication failure. + - _key: '400' + description: Bad request. schema: properties: - _key: code @@ -17434,8 +33049,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Unauthorized. schema: properties: - _key: code @@ -17483,7 +33098,7 @@ entities: - type type: object - _key: '404' - description: Color not found. + description: Not Found. schema: properties: - _key: code @@ -17531,171 +33146,303 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Reset branding color to default. + custom: false + self: true + type: device_group + return_type: device_group + summary: Modify the attributes of a group. x_deprecation: null x_filter: {} - - _key: list - description: 'Retrieve the dark theme branding colors. + primary_key_field: id + swagger_models: + - DeviceGroup + - DeviceGroupManipulation + - DeviceGroupPage + - DevicePage + tags: + - Device directory - groups +- _key: firmware_image + field_renames: + - _key: datafile_url + api_fieldname: datafile + fields: + - _key: created_at + api_fieldname: created_at + description: The time the entity was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: datafile_checksum + api_fieldname: datafile_checksum + description: The checksum (sha256) generated for the datafile. + example: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e + readOnly: true + required: false + type: string + - _key: datafile_size + api_fieldname: datafile_size + description: The size of the datafile in bytes. + format: int64 + readOnly: true + required: false + type: integer + - _key: datafile_url + api_fieldname: datafile + description: The firmware image file URL. + example: http://bucket.com/myimage.elf + readOnly: true + required: false + type: string + - _key: description + api_fieldname: description + description: The description of the object. + example: a description + format: free text + maxLength: 2000 + readOnly: false + required: false + type: string + - _key: id + api_fieldname: id + description: The firmware image ID. + 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 + type: string + - _key: updated_at + api_fieldname: updated_at + description: The time the entity was updated. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Device_Update + methods: + - _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://www.pelion.com/docs/device-management/current/updating-firmware/uploading-a-large-firmware-image.html). - **Example:** +
+ + **Usage example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-images \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' \ - ```' + -H ''Content-Type: multipart/form-data'' \ + + -F ''datafile=@myimage.bin;type=application/octet-stream'' + + -F ''description=bla bla'' \ + + -F ''name=My Linux Image'' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - - limit - - after - - order - - total_count - - has_more - - data - field_renames: [] + - created_at + - updated_at + - datafile_checksum + - datafile_size + - id + - datafile_url + field_renames: + - _key: datafile_url + api_fieldname: datafile fields: - - _key: reference - _override: true - api_fieldname: reference - entity_fieldname: reference - is_primary_key: true + - _key: description + api_fieldname: description + description: The description of the object. + entity_fieldname: description + example: a description + format: free text + in: stream + maxLength: 2000 + parameter_fieldname: description + required: false type: string - foreign_key: - entity: dark_theme_color - group: Branding - foreign_key_priority: self - group_id: Branding - method: get - mode: list - operation_id: getDarkColors - pagination: true - path: /v3/branding-colors/dark - request_body: json - request_content_type: application/json + - _key: firmware_image_file + api_fieldname: datafile + 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 + type: file + - _key: name + api_fieldname: name + description: The firmware image name. + entity_fieldname: name + format: free text + in: stream + maxLength: 128 + parameter_fieldname: name + required: false + type: string + group_id: Device_Update + method: post + mode: create + notes: This is not a standard create method as it uploads a file which creates + an entity which contains URIs to the uploaded file. + operation_id: Firmware_Image_create + pagination: false + parameter_map: + datafile: firmware_image_file + image_id: id + path: /v3/firmware-images + request_body: file + request_content_type: multipart/form-data responses: - - _key: '200' - description: Successful operation. + - _key: '201' + description: Firmware image created. The API gateway enforces the account-specific + file size. 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}' + - _key: foreign_key + entity: firmware_image + group: Device_Update + - _key: properties + created_at: + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: data - api_fieldname: data - description: A list of entities. - entity_fieldname: data + datafile: + api_fieldname: datafile + description: The firmware image file URL. + entity_fieldname: datafile_url + 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: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e + type: string + datafile_size: + api_fieldname: datafile_size + description: The size of the datafile in bytes. + entity_fieldname: datafile_size + format: int64 + type: integer + description: + api_fieldname: description + description: The description of the object. + entity_fieldname: description + example: a description + format: free text + maxLength: 2000 + type: string + etag: + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' + type: string + id: + api_fieldname: id + description: The firmware image ID. + entity_fieldname: id + 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 + description: The time the entity was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + 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: - 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 + - _key: message + description: Message describing the error condition. type: string - - _key: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message 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: message + description: A human readable informative explanation + example: Validation error + type: string - _key: object - api_fieldname: object - description: 'Entity name: always `list`.' - entity_fieldname: object + description: Entity name, always `error`. enum: - - list + - error 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 + - _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 - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer required: - - data - - has_more - - limit + - code + - message - object - - total_count + - request_id + - type type: object - _key: '401' - description: Authentication failure. + description: Not authenticated. schema: properties: - _key: code @@ -17790,116 +33537,115 @@ entities: - 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 - type: dark_theme_color - return_type: paginated_response(dark_theme_color) - summary: Get dark theme branding colors. + type: firmware_image + return_type: firmware_image + summary: Create an image + unaggregated: true x_deprecation: null x_filter: {} - - _key: read - description: 'Retrieve the requested dark theme branding color. + - _key: delete + description: 'Delete a firmware image. +
- **Example:** + **Usage example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/{reference} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-images/11234567f9012ab56790120000789012 \ -H ''Authorization: Bearer '' - ```' + ``` + + ' drop_fields: - object - etag - type - - groups - filter - - color - - updated_at - field_renames: [] + field_renames: + - _key: datafile_url + api_fieldname: datafile fields: - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference - enum: *id002 - enum_reference: dark_theme_color_reference_enum + - _key: id + api_fieldname: image_id + description: The firmware image ID. + entity_fieldname: id + external_param: false in: path - is_primary_key: true - name: reference + name: image_id + parameter_fieldname: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - group_id: Branding - method: get - mode: read - operation_id: getDarkColor + group_id: Device_Update + method: delete + mode: delete + operation_id: Firmware_Image_destroy pagination: false - path: /v3/branding-colors/dark/{reference} + parameter_map: + image_id: id + path: /v3/firmware-images/{image_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: subtenant_light_theme_color - group: Branding - properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - type: string - x-nullable: true - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_color''' - entity_fieldname: object - enum: - - branding_color - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - 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 - is_primary_key: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - type: string - type: object - - _key: '401' - description: Authentication failure. + - _key: '204' + description: Firmware image deleted. + - _key: '400' + description: Bad Request. schema: properties: - _key: code @@ -17946,8 +33692,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Not authenticated. schema: properties: - _key: code @@ -17995,7 +33741,7 @@ entities: - type type: object - _key: '404' - description: Color not found. + description: Firmware image not found. schema: properties: - _key: code @@ -18045,184 +33791,244 @@ entities: return_info: custom: false self: true - type: dark_theme_color - return_type: dark_theme_color - summary: Get dark theme branding color. + type: firmware_image + return_type: firmware_image + summary: Delete an image x_deprecation: null x_filter: {} - - _key: update - description: 'Update a dark theme branding color. + - _key: list + description: 'List all firmware images. +
- **Example:** + **Usage example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/dark/primary - \ - - -H ''Authorization: Bearer '' \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images \ - -H ''content-type: application/json'' \ + -H ''Authorization: Bearer '' - -d ''{ "color": "#f3f93e" }'' + ``` - ```' + ' drop_fields: - object - etag - type - - groups - filter - field_renames: [] + - data + - has_more + - total_count + - created_at__in + - created_at__nin + - created_at__lte + - created_at__gte + - datafile__eq + - datafile__neq + - datafile__in + - datafile__nin + - datafile_checksum__eq + - datafile_checksum__neq + - datafile_checksum__in + - datafile_checksum__nin + - datafile_size__eq + - datafile_size__neq + - datafile_size__in + - datafile_size__nin + - description__eq + - description__neq + - description__in + - description__nin + - id__eq + - id__neq + - id__in + - id__nin + - name__eq + - name__neq + - name__in + - name__nin + - updated_at__in + - updated_at__nin + - updated_at__lte + - updated_at__gte + field_renames: + - _key: datafile_url + api_fieldname: datafile fields: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: null + external_param: true + in: query + name: after + parameter_fieldname: after required: false type: string - x-nullable: true - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference - enum: *id002 - enum_reference: dark_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true + - _key: include + api_fieldname: include + description: 'A comma-separated list of data fields to return. Currently supported: + total_count.' + entity_fieldname: include + external_param: true + in: query + name: include + parameter_fieldname: include + required: false type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true + - _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 + external_param: true + format: int32 + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: order + api_fieldname: order + description: ASC or DESC. + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: firmware_image_order_enum + example: ASC + external_param: true + in: query + name: order + parameter_fieldname: order required: false type: string - group_id: Branding - method: put - mode: update - operation_id: setDarkColor - pagination: false - path: /v3/branding-colors/dark/{reference} + foreign_key: + entity: firmware_image + group: Device_Update + foreign_key_priority: self + group_id: Device_Update + method: get + mode: list + operation_id: Firmware_Image_list + pagination: true + parameter_map: + image_id: id + path: /v3/firmware-images request_body: json request_content_type: application/json responses: - _key: '200' - description: Color has been set successfully. + description: Request successful. schema: foreign_key: - entity: subtenant_light_theme_color - group: Branding + entity: firmware_image + group: Device_Update + pagination: true properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' + - _key: after + api_fieldname: after + entity_fieldname: after + example: null type: string - x-nullable: true + - _key: data + api_fieldname: data + entity_fieldname: data + items: + - _key: foreign_key + entity: firmware_image + group: Device_Update + - _key: properties + created_at: + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + datafile: + 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: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e + 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 + format: free text + maxLength: 2000 + type: string + etag: + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' + type: string + id: + description: The firmware image ID. + 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 + description: The time the entity was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + type: array + - _key: has_more + api_fieldname: has_more + entity_fieldname: has_more + type: boolean + - _key: limit + api_fieldname: limit + entity_fieldname: limit + format: int32 + type: integer - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always ''list''.' entity_fieldname: object - enum: - - branding_color - readOnly: true + example: list type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference + - _key: order + api_fieldname: order + description: The order of the records based on creation time, `ASC` or `DESC`; + by default `ASC`. + entity_fieldname: order 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 - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - ASC + - DESC + example: ASC type: string - type: object - - _key: '400' - description: Error in input data format. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count 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. + - _key: '400' + description: Bad Request. schema: properties: - _key: code @@ -18269,8 +34075,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Not authenticated. schema: properties: - _key: code @@ -18318,7 +34124,7 @@ entities: - type type: object - _key: '404' - description: Color not found. + description: Unable to find content. schema: properties: - _key: code @@ -18368,169 +34174,180 @@ entities: return_info: custom: false self: true - type: dark_theme_color - return_type: dark_theme_color - summary: Updates a dark theme branding color. + type: firmware_image + return_type: paginated_response(firmware_image) + summary: List all images x_deprecation: null - x_filter: {} - primary_key_field: reference - swagger_models: - - BrandingColor - - BrandingColorList - tags: - - User interface configuration - colors -- _key: dark_theme_image - field_renames: [] - fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the 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 - enum_reference: dark_theme_image_reference_enum - is_primary_key: true - readOnly: false - required: false - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Branding - methods: - - _key: delete - description: 'Revert an account branding image to dark theme default. + x_filter: + created_at: + - in + - nin + - lte + - gte + datafile_checksum: + - eq + - neq + - in + - nin + datafile_size: + - eq + - neq + - in + - nin + datafile_url: + - eq + - neq + - in + - nin + description: + - eq + - neq + - in + - nin + id: + - eq + - neq + - in + - nin + name: + - eq + - neq + - in + - nin + updated_at: + - in + - nin + - lte + - gte + - _key: read + description: 'Retrieve a firmware image. +
- **Example:** + **Usage example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference}/clear + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-images/1123456f9012ab567890120000789012 \ -H ''Authorization: Bearer '' - ```' + ``` + + ' drop_fields: - object - etag - type - - groups - filter - field_renames: [] + - created_at + - updated_at + - datafile_checksum + - datafile_size + - description + - name + - datafile_url + field_renames: + - _key: datafile_url + api_fieldname: datafile fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the branding images (icon or picture). - entity_fieldname: reference - enum: &id003 - - 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 - enum_reference: dark_theme_image_reference_enum + - _key: id + api_fieldname: id + description: The firmware image ID. + entity_fieldname: id + example: 016e652be671000000000001001001e5 in: path - is_primary_key: true - name: reference + parameter_fieldname: image_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - group_id: Branding - method: post - mode: delete - operation_id: clearDarkImage + group_id: Device_Update + method: get + mode: read + operation_id: Firmware_Image_retrieve pagination: false - path: /v3/branding-images/dark/{reference}/clear + parameter_map: + image_id: id + path: /v3/firmware-images/{image_id} request_body: json request_content_type: application/json responses: - - _key: '204' - description: Image reverted successfully. - - _key: '401' - description: Authentication failure. + - _key: '200' + description: Retrieved result successfully. + schema: + - _key: foreign_key + entity: firmware_image + group: Device_Update + - _key: properties + created_at: + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + datafile: + api_fieldname: datafile + description: The firmware image file URL. + entity_fieldname: datafile_url + 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: e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e + type: string + datafile_size: + api_fieldname: datafile_size + description: The size of the datafile in bytes. + entity_fieldname: datafile_size + format: int64 + type: integer + description: + api_fieldname: description + description: The description of the object. + entity_fieldname: description + example: a description + format: free text + maxLength: 2000 + type: string + etag: + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' + type: string + id: + api_fieldname: id + description: The firmware image ID. + entity_fieldname: id + 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 + description: The time the entity was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: '400' + description: Bad Request. schema: properties: - _key: code @@ -18577,8 +34394,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Not authenticated. schema: properties: - _key: code @@ -18626,7 +34443,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference. + description: Firmware image can't be found. schema: properties: - _key: code @@ -18676,187 +34493,512 @@ entities: return_info: custom: false self: true - type: dark_theme_image - return_type: dark_theme_image - summary: Revert an image to dark theme default. + type: firmware_image + return_type: firmware_image + summary: Get an image. x_deprecation: null x_filter: {} - - _key: list - description: 'Retrieve metadata for all dark theme branding images. + primary_key_field: id + swagger_models: + - FirmwareImage + - FirmwareImagePage + tags: + - Device update - firmware images +- _key: firmware_manifest + field_renames: + - _key: datafile_url + api_fieldname: datafile + - _key: key_table_url + api_fieldname: key_table + fields: + - _key: created_at + api_fieldname: created_at + description: The time the entity was created. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: datafile_size + api_fieldname: datafile_size + 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 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 + - _key: description + 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 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 + - _key: id + 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/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 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. - **Example:** + Recommended for debugging only. - `curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark \ + ' + 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 + api_fieldname: timestamp + description: The firmware manifest version as a timestamp. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + 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. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Device_Update + methods: + - _key: create + description: 'Upload a firmware manifest. The API enforces a maximum manifest + size of 2KB. - -H ''Authorization: Bearer '' +
- ```' + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ + + -H ''Authorization: Bearer '' \ + + -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'' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - - limit - - after - - order - - total_count - - has_more - - data - field_renames: [] + - 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: + - _key: datafile_url + api_fieldname: datafile + - _key: key_table_url + api_fieldname: key_table fields: - - _key: reference - _override: true - api_fieldname: reference - entity_fieldname: reference - is_primary_key: true + - _key: description + api_fieldname: description + description: The description of the firmware manifest. + entity_fieldname: description + example: '' + format: free text + in: stream + maxLength: 2000 + parameter_fieldname: description + required: false type: string - foreign_key: - entity: dark_theme_image - group: Branding - foreign_key_priority: self - group_id: Branding - method: get - mode: list - operation_id: getAllDarkImageData - pagination: true - path: /v3/branding-images/dark - request_body: json - request_content_type: application/json + - _key: firmware_manifest_file + api_fieldname: datafile + description: The manifest file to create. The API gateway enforces the account-specific + file size. File name must not exceed 100 characters. + entity_fieldname: firmware_manifest_file + external_param: true + in: stream + name: datafile + parameter_fieldname: datafile + required: true + type: file + - _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. File name must not exceed 100 characters. + entity_fieldname: key_table_file + external_param: true + in: stream + name: key_table + parameter_fieldname: key_table + required: false + type: file + - _key: name + api_fieldname: name + description: The name of the manifest. + entity_fieldname: name + example: manifest_name + format: free text + in: stream + maxLength: 128 + parameter_fieldname: name + required: true + type: string + group_id: Device_Update + method: post + mode: create + notes: This is not a standard create method as it uploads a file (or files) which + creates an entity which contains URIs to the uploaded file(s). + operation_id: Firmware_Manifest_create + pagination: false + parameter_map: + datafile: firmware_manifest_file + key_table: key_table_file + manifest_id: id + path: /v3/firmware-manifests/ + request_body: file + request_content_type: multipart/form-data responses: - - _key: '200' - description: Successful operation. + - _key: '201' + description: Created. schema: - foreign_key: - entity: dark_theme_image - 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}' + - _key: foreign_key + entity: firmware_manifest + group: Device_Update + - _key: properties + created_at: + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: data - api_fieldname: data - description: A list of entities. - entity_fieldname: data + datafile: + api_fieldname: datafile + description: The URL of the ASN.1 DER-encoded firmware manifest binary. + entity_fieldname: datafile_url + example: http://bucket.com/mymanifest.manifest + format: uri + type: string + datafile_size: + api_fieldname: datafile_size + 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 device class ID. + entity_fieldname: device_class + 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 + description: API resource entity version. + entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' + type: string + id: + api_fieldname: id + 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/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 manifest. + entity_fieldname: 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 + description: The firmware manifest version as a timestamp. + entity_fieldname: timestamp + 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. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + - _key: '400' + description: 'Validation error. The data used to create the firmware manifest + 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: - foreign_key: - entity: dark_theme_image - group: Branding properties: - - _key: object - description: 'Entity name: always ''branding_image''' - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - description: Name of the 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 - is_primary_key: true - type: string - - _key: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true + - _key: message + description: Message describing the error condition. type: string - - _key: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message 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 + - _key: message + description: A human readable informative explanation + example: Validation error + type: string + - _key: object + description: Entity name, always `error`. enum: - - ASC - - DESC + - 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 - - _key: total_count - api_fieldname: total_count - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer required: - - data - - has_more - - limit + - code + - message - object - - total_count + - request_id + - type type: object - _key: '401' - description: Authentication failure. + description: Not authenticated. schema: properties: - _key: code @@ -18954,135 +35096,66 @@ entities: return_info: custom: false self: true - type: dark_theme_image - return_type: paginated_response(dark_theme_image) - summary: Get metadata of all dark theme images. + type: firmware_manifest + return_type: firmware_manifest + summary: Upload a manifest + unaggregated: true x_deprecation: null x_filter: {} - - _key: read - description: 'Retrieve metadata for one account dark theme branding image. + - _key: delete + description: 'Delete a firmware manifest. +
- **Example:** + **Usage example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/dark/{reference} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/11234567f9012ab56780120000789012 \ -H ''Authorization: Bearer '' - ```' + ``` + + ' drop_fields: - object - etag - type - - groups - filter - - static_uri - - updated_at - field_renames: [] + field_renames: + - _key: datafile_url + api_fieldname: datafile + - _key: key_table_url + api_fieldname: key_table fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id003 - enum_reference: dark_theme_image_reference_enum + - _key: id + api_fieldname: manifest_id + description: The firmware manifest ID. + entity_fieldname: id + external_param: false in: path - is_primary_key: true - name: reference + name: manifest_id + parameter_fieldname: manifest_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - group_id: Branding - method: get - mode: read - operation_id: getDarkImageData + group_id: Device_Update + method: delete + mode: delete + operation_id: Firmware_Manifest_destroy pagination: false - path: /v3/branding-images/dark/{reference} + parameter_map: + manifest_id: id + path: /v3/firmware-manifests/{manifest_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: subtenant_light_theme_image - group: Branding - properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - is_primary_key: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - type: string - type: object - - _key: '401' - description: Authentication failure. + - _key: '204' + description: Firmware manifest deleted. + - _key: '400' + description: Bad Request. schema: properties: - _key: code @@ -19129,8 +35202,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Not authenticated. schema: properties: - _key: code @@ -19178,7 +35251,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference. + description: Firmware manifest not found. schema: properties: - _key: code @@ -19228,193 +35301,316 @@ entities: return_info: custom: false self: true - type: dark_theme_image - return_type: dark_theme_image - summary: Get metadata of a dark theme image. + type: firmware_manifest + return_type: firmware_manifest + summary: Delete a manifest x_deprecation: null x_filter: {} - - _key: update - additional_operations: - - 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 - in PNG or JPEG format. + - _key: list + description: 'List all firmware manifests. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - - static_uri - - updated_at - field_renames: [] + - data + - has_more + - total_count + - created_at__in + - created_at__nin + - created_at__lte + - created_at__gte + - datafile__eq + - datafile__neq + - datafile__in + - datafile__nin + - datafile_size__eq + - datafile_size__neq + - datafile_size__in + - datafile_size__nin + - description__eq + - description__neq + - description__in + - description__nin + - device_class__eq + - device_class__neq + - device_class__in + - device_class__nin + - id__eq + - id__neq + - id__in + - id__nin + - name__eq + - name__neq + - name__in + - name__nin + - timestamp__in + - timestamp__nin + - timestamp__lte + - timestamp__gte + - updated_at__in + - updated_at__nin + - updated_at__lte + - updated_at__gte + field_renames: + - _key: datafile_url + api_fieldname: datafile + - _key: key_table_url + api_fieldname: key_table fields: - - _key: image - api_fieldname: image - description: The image in PNG or JPEG format as multipart form data. - entity_fieldname: image + - _key: after + api_fieldname: after + description: The ID of the item after which to retrieve the next page. + entity_fieldname: after + example: null external_param: true - in: stream - name: image - parameter_fieldname: image - required: true - type: file - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id003 - enum_reference: dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true + in: query + name: after + parameter_fieldname: after + required: false type: string - group_id: Branding - method: post - mode: update - operation_id: uploadDarkImageMultipart - pagination: false - path: /v3/branding-images/dark/{reference}/upload-multipart - request_body: file - request_content_type: multipart/form-data + - _key: include + api_fieldname: include + description: 'A comma-separated list of data fields 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: 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 + external_param: true + format: int32 + in: query + maximum: 1000 + minimum: 2 + name: limit + parameter_fieldname: limit + required: false + type: integer + - _key: order + api_fieldname: order + description: ASC or DESC. + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: firmware_manifest_order_enum + example: ASC + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: firmware_manifest + group: Device_Update + foreign_key_priority: self + group_id: Device_Update + method: get + mode: list + operation_id: Firmware_Manifest_list + pagination: true + parameter_map: + manifest_id: id + path: /v3/firmware-manifests/ + request_body: json + request_content_type: application/json responses: - - _key: '201' - description: Image uploaded successfully. - headers: - - _key: Content-Location - description: Location of the image metadata. - type: string - - _key: Location - description: Location of the image binary. - type: string + - _key: '200' + description: Request successful. schema: foreign_key: - entity: subtenant_light_theme_image - group: Branding + entity: firmware_manifest + group: Device_Update + pagination: true properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - is_primary_key: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: after + api_fieldname: after + entity_fieldname: after + example: null type: string - type: object - - _key: '400' - description: Error in input data format, for example, image is too large. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. + - _key: data + api_fieldname: data + entity_fieldname: data items: - properties: - - _key: message - description: Message describing the error condition. + - _key: foreign_key + entity: firmware_manifest + group: Device_Update + - _key: properties + created_at: + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - - _key: name - description: Name of the field which caused the error. + datafile: + description: The URL of the ASN.1 DER-encoded firmware manifest binary. + example: http://bucket.com/mymanifest.manifest + format: uri type: string - required: - - name - - message - type: object - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string + 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 + 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 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 + description: API resource entity version. + entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' + type: string + 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/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 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. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + type: array + - _key: has_more + api_fieldname: has_more + entity_fieldname: has_more + type: boolean + - _key: limit + api_fieldname: limit + entity_fieldname: limit + format: int32 + type: integer - _key: object - description: Entity name, always `error`. - enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + api_fieldname: object + description: 'Entity name: always ''list''.' + entity_fieldname: object + example: list type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + - _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 - required: - - code - - message - - object - - request_id - - type - type: object - - _key: '401' - description: Authentication failure. + - _key: total_count + api_fieldname: total_count + entity_fieldname: total_count + format: int32 + type: integer + - _key: '400' + description: Bad Request. schema: properties: - _key: code @@ -19461,8 +35657,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Not authenticated. schema: properties: - _key: code @@ -19510,7 +35706,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference. + description: Unable to find content. schema: properties: - _key: code @@ -19560,419 +35756,285 @@ entities: return_info: custom: false self: true - type: dark_theme_image - return_type: dark_theme_image - summary: Upload a dark theme image. + type: firmware_manifest + return_type: paginated_response(firmware_manifest) + summary: List all firmware manifests. x_deprecation: null - x_filter: {} - primary_key_field: reference - swagger_models: - - BrandingImage - - BrandingImageList - tags: - - User interface configuration - images -- _key: developer_certificate - field_renames: - - _key: certificate - api_fieldname: developer_certificate - fields: - - _key: account_id - api_fieldname: account_id - description: Account to which the developer certificate belongs. - readOnly: true - required: false - type: string - - _key: certificate - api_fieldname: developer_certificate - description: PEM-format X.509 developer certificate. - readOnly: true - required: false - type: string - - _key: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - format: date-time - readOnly: true - required: false - type: string - - _key: description - api_fieldname: description - description: Description for the developer certificate. - readOnly: false - required: false - type: string - x-nullable: true - - _key: developer_private_key - api_fieldname: developer_private_key - description: PEM-format developer private key associated with the certificate. - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: ID that uniquely identifies the developer certificate. - in: path - parameter_fieldname: developerCertificateId - readOnly: false - required: true - type: string - - _key: name - api_fieldname: name - description: Name of the developer certificate. - readOnly: false - required: true - type: string - - _key: security_file_content - api_fieldname: security_file_content - description: Content of the `security.c` file flashed to the device to provide - security credentials. - readOnly: true - required: false - type: string - group_id: Security - methods: - - _key: create - description: '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). + x_filter: + created_at: + - in + - nin + - lte + - gte + datafile_size: + - eq + - neq + - in + - nin + datafile_url: + - eq + - neq + - in + - nin + description: + - eq + - neq + - in + - nin + device_class: + - eq + - neq + - in + - nin + id: + - eq + - neq + - in + - nin + name: + - eq + - neq + - in + - nin + timestamp: + - in + - nin + - lte + - gte + updated_at: + - in + - nin + - lte + - gte + - _key: read + description: 'Retrieve a firmware manifest. +
- **Example:** + **Usage example:** ``` - curl -X POST http://api.us-east-1.mbedcloud.com/v3/developer-certificates \ - - -H "Authorization: Bearer " \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/firmware-manifests/1123467f9012ab567890120000789012 + \ - -H "content-type: application/json" \ + -H ''Authorization: Bearer '' - -d { "name": "", "description": "" - } + ``` - ```' + ' drop_fields: - object - etag - type - - groups - filter - - id - created_at - - account_id - - developer_private_key - - security_file_content - - certificate + - 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: - - _key: certificate - api_fieldname: developer_certificate + - _key: datafile_url + api_fieldname: datafile + - _key: key_table_url + api_fieldname: key_table fields: - - _key: description - api_fieldname: description - description: Description for the developer certificate. - entity_fieldname: description - in: body - parameter_fieldname: description - required: false - type: string - x-nullable: true - - _key: name - api_fieldname: name - description: Name of the developer certificate. - entity_fieldname: name - in: body - parameter_fieldname: name + - _key: id + api_fieldname: id + description: The firmware manifest ID. + entity_fieldname: id + example: '12345678901234567890123456789012' + in: path + parameter_fieldname: manifest_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - group_id: Security - method: post - mode: create - operation_id: createDeveloperCertificate + group_id: Device_Update + method: get + mode: read + operation_id: Firmware_Manifest_retrieve pagination: false parameter_map: - developerCertificateId: id - path: /v3/developer-certificates + manifest_id: id + path: /v3/firmware-manifests/{manifest_id} request_body: json request_content_type: application/json responses: - - _key: '201' - description: Developer certificate created successfully. - examples: - - _key: Success - account_id: 015fee5d9b3538c98640fbfb00000000 - created_at: '2017-12-11T14:22:20.009Z' - 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' - etag: '1' - id: 015fee4431fd38c98640fbfb00000000 - name: DeveloperCertificate - object: trusted-cert - 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: '200' + description: Retrieved result successfully. schema: - foreign_key: - entity: subtenant_trusted_certificate - group: Security - properties: - - _key: account_id - api_fieldname: account_id - description: Account to which the developer certificate belongs. - entity_fieldname: account_id - type: string - - _key: created_at + - _key: foreign_key + entity: firmware_manifest + group: Device_Update + - _key: properties + created_at: api_fieldname: created_at - description: Creation UTC time RFC3339. + description: The time the entity was created. entity_fieldname: created_at + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - - _key: description + datafile: + api_fieldname: datafile + description: The URL of the ASN.1 DER-encoded firmware manifest binary. + entity_fieldname: datafile_url + example: http://bucket.com/mymanifest.manifest + format: uri + type: string + datafile_size: + api_fieldname: datafile_size + 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: Description for the developer certificate. + description: The description of the firmware manifest. entity_fieldname: description + example: '' + format: free text + maxLength: 2000 type: string - x-nullable: true - - _key: developer_certificate - api_fieldname: developer_certificate - description: PEM-format X.509 developer certificate. - entity_fieldname: certificate + device_class: + api_fieldname: device_class + description: The device class ID. + entity_fieldname: device_class + example: 42c4d8de-704d-546e-b9d3-1ce1eb316167 + format: uuid type: string - - _key: developer_private_key - api_fieldname: developer_private_key - description: PEM-format developer private key associated with the certificate. - entity_fieldname: developer_private_key + 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 - - _key: etag + etag: api_fieldname: etag description: API resource entity version. entity_fieldname: etag + example: '2017-05-22T12:37:58.753425Z' type: string - - _key: id + id: api_fieldname: id - description: ID that uniquely identifies the developer certificate. + description: The firmware manifest ID. entity_fieldname: id - in: path - parameter_fieldname: developerCertificateId - required: true + example: '12345678901234567890123456789012' + pattern: '[A-Fa-f0-9]{32}' type: string - - _key: name + 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/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: Name of the developer certificate. + description: The name of the manifest. entity_fieldname: name + example: manifest_name + format: free text + maxLength: 128 type: string - - _key: object + object: api_fieldname: object - description: 'Entity name: always `trusted-cert`.' + description: 'Entity name: always ''firmware-manifest''.' entity_fieldname: object + example: firmware-manifest type: string - - _key: security_file_content - api_fieldname: security_file_content - description: Content of the `security.c` file flashed to the device to provide - security credentials. - entity_fieldname: security_file_content + 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 + description: The firmware manifest version as a timestamp. + entity_fieldname: timestamp + 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. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time type: string - type: object - _key: '400' description: Bad request. - examples: - - _key: Bad Request Error - code: 400 - fields: - message: Missing certificate name. - name: name - message: Bad Request. Missing certificate name. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: validation_error schema: properties: - _key: code @@ -20020,73 +36082,7 @@ entities: - type type: object - _key: '401' - description: Invalid access token. - examples: - - _key: Authentication Error - code: 401 - message: Invalid access token. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: invalid_auth - 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: The maximum number of developer certificates for the given account - has already been reached. - examples: - - _key: Account Limit Exceeded Error - code: 403 - fields: - message: '10' - name: cert-count - message: Forbidden. Limit for the number of certificates exceeded. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: account_limit_exceeded + description: Not authenticated. schema: properties: - _key: code @@ -20133,18 +36129,8 @@ entities: - request_id - type type: object - - _key: '409' - description: Certificate with the given name already exists. - examples: - - _key: Duplicate Error - code: 409 - fields: - message: Certificate already exists. - name: certificate - message: Conflict. Certificate already exists. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: duplicate + - _key: '404' + description: Firmware manifest can't be found. schema: properties: - _key: code @@ -20194,61 +36180,858 @@ entities: return_info: custom: false self: true - type: developer_certificate - return_type: developer_certificate - summary: Create a new developer certificate to connect to the bootstrap server. + type: firmware_manifest + return_type: firmware_manifest + summary: Get a manifest x_deprecation: null x_filter: {} - - _key: delete - description: 'Delete a trusted certificate. - - - **Example:** - - ``` - - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} - \ - - -H ''Authorization: Bearer '' + primary_key_field: id + swagger_models: + - FirmwareManifest + - FirmwareManifestPage + tags: + - Device update - firmware manifests +- _key: identity_provider + field_renames: + - _key: identity_provider_type + api_fieldname: type + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + required: false + type: string + - _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 for the identity provider. + maxLength: 500 + readOnly: false + required: false + type: string + - _key: id + api_fieldname: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: identity_provider_type + api_fieldname: type + description: Identity provider type. + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + readOnly: false + required: true + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity provider. + readOnly: true + required: false + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + maxLength: 100 + 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. + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this empty + to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider in PEM + format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + readOnly: false + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + readOnly: false + 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: + - _key: create + description: 'Create a new identity provider. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter + - id + - created_at + - updated_at + - account_id + - is_default field_renames: - - _key: certificate - api_fieldname: developer_certificate + - _key: identity_provider_type + api_fieldname: type fields: - - _key: id - api_fieldname: cert_id - description: The ID of the trusted certificate to delete. - entity_fieldname: id - external_param: false - in: path - name: cert_id - parameter_fieldname: cert_id + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: discovery + allowEmptyValue: true + api_fieldname: discovery + 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' + entity_fieldname: discovery + external_param: true + in: query + name: discovery + parameter_fieldname: discovery + required: false + type: boolean + - _key: identity_provider_type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: &id004 + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type required: true type: string - group_id: Security - method: delete - mode: delete - operation_id: deleteCertificate + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true + 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: &id005 + - 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider in + PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: &id006 + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: post + mode: create + operation_id: createIdentityProvider pagination: false parameter_map: - cert_id: id - developerCertificateId: id - path: /v3/trusted-certificates/{cert_id} + identity_provider_id: id + path: /v3/identity-providers request_body: json request_content_type: application/json responses: - - _key: '204' - description: Deleted successfully. - - _key: '401' - description: Authentication failure. + - _key: '201' + description: New entity created. + headers: + - _key: Content-Location + description: /v3/identity-providers/{identity_provider_id} + type: string + - _key: Location + description: /v3/identity-providers/{identity_provider_id} + type: string + schema: + foreign_key: + entity: subtenant_identity_provider + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + maxLength: 500 + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + 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. + entity_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + 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 + required: + - etag + - id + - name + - object + - type + type: object + - _key: '400' + description: Error in input data, for example, name is too long. schema: properties: - _key: code @@ -20295,8 +37078,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -20343,8 +37126,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Certificate not found. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -20394,230 +37177,47 @@ entities: return_info: custom: false self: true - type: developer_certificate - return_type: developer_certificate - summary: Delete a trusted certificate by ID. + type: identity_provider + return_type: identity_provider + summary: Create a new identity provider. x_deprecation: null x_filter: {} - - _key: get_trusted_certificate_info - description: 'Retrieve a trusted certificate by ID. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} - \ - - -H ''Authorization: Bearer '' + - _key: delete + description: 'Delete an identity provider by ID. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - 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 field_renames: - - _key: certificate - api_fieldname: developer_certificate + - _key: identity_provider_type + api_fieldname: type fields: - _key: id - api_fieldname: id - description: Entity ID. + api_fieldname: identity_provider_id + description: The ID of the identity provider to delete. entity_fieldname: id - example: 01619571d01d0242ac12000600000000 + external_param: false in: path - parameter_fieldname: cert_id - pattern: '[a-f0-9]{32}' + name: identity_provider_id + parameter_fieldname: identity_provider_id required: true type: string - foreign_key: - entity: trusted_certificate - group: Security - group_id: Security - method: get - mode: get_trusted_certificate_info - operation_id: getCertificate + group_id: Accounts + method: delete + mode: delete + operation_id: deleteIdentityProvider pagination: false parameter_map: - cert_id: id - developerCertificateId: id - path: /v3/trusted-certificates/{cert_id} + identity_provider_id: id + path: /v3/identity-providers/{identity_provider_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. - schema: - description: Represents a trusted certificate in responses. - foreign_key: - entity: developer_certificate - group: Security - properties: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: certificate - api_fieldname: certificate - description: X509.v3 trusted certificate in PEM format. - entity_fieldname: certificate - example: '-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----' - type: string - - _key: certificate_fingerprint - api_fieldname: certificate_fingerprint - description: A SHA-256 fingerprint of the certificate. - entity_fieldname: certificate_fingerprint - example: a10fb2c8ba90e6de927bd0ae391dcc38f6115685de2d7024712af37ead0608f1 - type: string - - _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 - type: string - - _key: description - api_fieldname: description - description: Human readable description of this certificate. - entity_fieldname: description - example: Certificate created by me. - maxLength: 500 - type: string - x-nullable: true - - _key: device_execution_mode - api_fieldname: device_execution_mode - description: Device execution mode where 1 means a developer certificate. - entity_fieldname: device_execution_mode - example: 1 - format: int32 - type: integer - - _key: enrollment_mode - api_fieldname: enrollment_mode - description: If true, signature is not required. Default value false. - entity_fieldname: enrollment_mode - example: false - type: boolean - - _key: etag - api_fieldname: etag - description: API resource entity version. - entity_fieldname: etag - example: '1' - type: string - - _key: id - api_fieldname: id - description: Entity ID. - entity_fieldname: id - example: 01619571d01d0242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: issuer - api_fieldname: issuer - description: Issuer of the certificate. - entity_fieldname: issuer - example: CN=issuer - type: string - - _key: name - api_fieldname: name - description: Certificate name. - entity_fieldname: name - example: My certificate - maxLength: 100 - type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''trusted-cert''' - entity_fieldname: object - enum: - - trusted-cert - type: string - - _key: owner_id - api_fieldname: owner_id - description: The ID of the owner. - entity_fieldname: owner_id - example: 01619571dad80242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - x-nullable: true - - _key: service - api_fieldname: service - description: Service name where the certificate is used. - entity_fieldname: service - enum: - - lwm2m - - bootstrap - type: string - - _key: status - api_fieldname: status - description: Status of the certificate. - entity_fieldname: status - enum: - - ACTIVE - - INACTIVE - example: ACTIVE - type: string - - _key: subject - api_fieldname: subject - description: Subject of the certificate. - entity_fieldname: subject - example: CN=subject - 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: valid - api_fieldname: valid - description: This read-only flag indicates whether the certificate is valid - or not. - entity_fieldname: valid - example: true - readOnly: true - type: boolean - - _key: validity - api_fieldname: validity - description: Expiration time in UTC formatted as RFC3339. - entity_fieldname: validity - 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 + - _key: '204' + description: Deleted successfully. - _key: '401' description: Authentication failure. schema: @@ -20667,7 +37267,7 @@ entities: - type type: object - _key: '403' - description: Forbidden. + description: Forbidden, or identity provider is in use. schema: properties: - _key: code @@ -20715,7 +37315,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: An identity provider not found. schema: properties: - _key: code @@ -20764,326 +37364,345 @@ entities: type: object return_info: custom: false - self: false - type: trusted_certificate - return_type: trusted_certificate - summary: Get trusted certificate by ID. - unaggregated: true + self: true + type: identity_provider + return_type: identity_provider + summary: Delete an identity provider by ID. x_deprecation: null x_filter: {} - - _key: read - description: '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 - \ + - _key: delete_service_provider_certificate + description: 'Delete a service provider certificate. - -H "Authorization: Bearer " - - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - - object - - etag - - type - - groups - - filter - - created_at - - account_id - - name - - description - - developer_private_key - - security_file_content - - certificate - field_renames: - - _key: certificate - api_fieldname: developer_certificate - fields: - - _key: id - api_fieldname: id - description: ID that uniquely identifies the developer certificate. - entity_fieldname: id - in: path - parameter_fieldname: developerCertificateId - required: true - type: string - group_id: Security - method: get - mode: read - operation_id: getDeveloperCertificate - pagination: false - parameter_map: - developerCertificateId: id - path: /v3/developer-certificates/{developerCertificateId} - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Developer certificate returned successfully. - examples: - - _key: Success - account_id: 015fee5d9b3538c98640fbfb00000000 - created_at: '2017-12-11T14:22:20.009Z' - 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' - etag: '1' - id: 015fee4431fd38c98640fbfb00000000 - name: DeveloperCertificate - object: trusted-cert - 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' + - object + - etag + - type + - filter + - created_at + - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - account_id + - is_default + - identity_provider_type + field_renames: + - _key: identity_provider_type + api_fieldname: type + fields: + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string + group_id: Accounts + method: post + mode: delete_service_provider_certificate + operation_id: deleteSpCertificate + pagination: false + parameter_map: + identity_provider_id: id + path: /v3/identity-providers/{identity_provider_id}/delete-sp-certificate + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + headers: + - _key: Content-Location + description: /v3/identity-providers/{identity_provider_id} + type: string schema: foreign_key: - entity: developer_certificate - group: Security + entity: subtenant_identity_provider + group: Accounts properties: - _key: account_id api_fieldname: account_id - description: Account to which the developer certificate belongs. + description: The ID of the account the identity provider belongs to. entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - _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 type: string - _key: description api_fieldname: description - description: Description for the developer certificate. + description: Description for the identity provider. entity_fieldname: description - type: string - x-nullable: true - - _key: developer_certificate - api_fieldname: developer_certificate - description: PEM-format X.509 developer certificate. - entity_fieldname: developer_certificate - type: string - - _key: developer_private_key - api_fieldname: developer_private_key - description: PEM-format developer private key associated with the certificate. - entity_fieldname: developer_private_key + maxLength: 500 type: string - _key: etag api_fieldname: etag description: API resource entity version. entity_fieldname: etag + example: '1' type: string - _key: id api_fieldname: id - description: ID that uniquely identifies the developer certificate. + description: Entity ID. entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean - _key: name api_fieldname: name - description: Name of the developer certificate. + description: Name of the identity provider. entity_fieldname: name + maxLength: 100 type: string - _key: object api_fieldname: object - description: 'Entity name: always `trusted-cert`.' + description: 'Entity name: always ''identity-provider''' entity_fieldname: object + enum: + - identity-provider type: string - - _key: security_file_content - api_fieldname: security_file_content - description: Content of the `security.c` file flashed to the device to provide - security credentials. - entity_fieldname: security_file_content + - _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. + entity_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC 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 + required: + - etag + - id + - name + - object + - type type: object - - _key: '400' - description: Bad request. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -21130,15 +37749,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Invalid access token. - examples: - - _key: Authentication Error - code: 401 - message: Invalid access token. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: invalid_auth + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -21186,14 +37798,7 @@ entities: - type type: object - _key: '404' - description: Developer certificate not found with given ID. - examples: - - _key: Authentication Error - code: 404 - message: 'Not Found. Not found: 016006724ff53ade90ed948d03c00001' - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: not_found + description: An identity provider not found. schema: properties: - _key: code @@ -21243,324 +37848,525 @@ entities: return_info: custom: false self: true - type: developer_certificate - return_type: developer_certificate - summary: Fetch an existing developer certificate to connect to the bootstrap server. + type: identity_provider + return_type: identity_provider + summary: Delete the service provider certificate. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - DeveloperCertificateRequestData - - DeveloperCertificateResponseData - - TrustedCertificateResp - tags: - - Device security - developer class certificates - - Device security - certificates -- _key: device - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: The ID of the associated account. - example: '00000000000000000000000000000000' - readOnly: true - required: false - type: string - - _key: auto_update - api_fieldname: auto_update - description: 'DEPRECATED: Mark this device for automatic firmware update.' - readOnly: false - required: false - type: boolean - - _key: bootstrap_expiration_date - api_fieldname: bootstrap_expiration_date - description: The expiration date of the certificate used to connect to bootstrap - server. - format: date - readOnly: false - required: false - type: string - x-nullable: true - - _key: bootstrapped_timestamp - api_fieldname: bootstrapped_timestamp - description: The timestamp of the device's most recent bootstrap process. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: ca_id - api_fieldname: ca_id - description: The certificate issuer's ID. - example: '00000000000000000000000000000000' - maxLength: 500 - readOnly: false - required: false - type: string - - _key: connector_expiration_date - api_fieldname: connector_expiration_date - description: The expiration date of the certificate used to connect to LwM2M server. - format: date - readOnly: false - required: false - type: string - x-nullable: true - - _key: created_at - api_fieldname: 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 - readOnly: true - required: false - type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_attributes - 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 - readOnly: false - required: false - type: object - - _key: deployed_state - api_fieldname: deployed_state - description: 'DEPRECATED: The state of the device''s deployment.' - enum: - - development - - production - enum_reference: device_deployed_state_enum - readOnly: true - required: false - type: string - - _key: deployment - api_fieldname: deployment - description: 'DEPRECATED: The last deployment used on the device.' - example: '' - readOnly: false - required: false - type: string - - _key: description - api_fieldname: description - description: The description of the device. - example: description - maxLength: 2000 - readOnly: false - required: false - type: string - - _key: device_class - api_fieldname: device_class - description: An ID representing the model and hardware revision of the device. - example: '' - maxLength: 32 - readOnly: false - required: false - type: string - - _key: device_execution_mode - api_fieldname: device_execution_mode - 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)\n - 1 - development\ - \ devices\n - 5 - production devices" - enum: - - 0 - - 1 - - 5 - example: 0 - readOnly: false - required: false - type: integer - - _key: device_key - api_fieldname: 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 - readOnly: false - required: false - type: string - - _key: endpoint_name - api_fieldname: endpoint_name - description: The endpoint name given to the device. - example: 00000000-0000-0000-0000-000000000000 - readOnly: true - required: false - type: string - - _key: endpoint_type - api_fieldname: endpoint_type - description: The endpoint type of the device. For example, the device is a gateway. - example: '' - maxLength: 64 - readOnly: false - required: false - type: string - - _key: enrolment_list_timestamp - api_fieldname: enrolment_list_timestamp - description: The claim date/time. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: firmware_checksum - api_fieldname: firmware_checksum - description: The SHA256 checksum of the current firmware image. - example: '0000000000000000000000000000000000000000000000000000000000000000' - readOnly: true - required: false - type: string - - _key: host_gateway - api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. - example: '' - readOnly: false - required: false - type: string - - _key: id - api_fieldname: id - description: The ID of the device. The device ID is used across all Device Management - APIs. - example: '00000000000000000000000000000000' - readOnly: false - required: true - type: string - - _key: issuer_fingerprint - api_fieldname: issuer_fingerprint - description: SHA256 fingerprint of the certificate used to validate the signature - of the device certificate. - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' - readOnly: false - required: false - type: string - x-nullable: true - - _key: manifest - api_fieldname: manifest - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' - readOnly: false - required: false - type: string - - _key: manifest_timestamp - api_fieldname: manifest_timestamp - description: The timestamp of the current manifest version. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: mechanism - api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. - enum: - - connector - - direct - enum_reference: device_mechanism_enum - readOnly: false - required: false - type: string - - _key: mechanism_url - api_fieldname: mechanism_url - description: 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. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 - readOnly: false - required: false - type: string - - _key: serial_number - api_fieldname: serial_number - description: The serial number of the device. - example: 00000000-0000-0000-0000-000000000000 - readOnly: false - required: false - type: string - - _key: state - api_fieldname: state - description: The current state of the device. - enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered - enum_reference: device_state_enum - readOnly: false - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: vendor_id - api_fieldname: vendor_id - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 - readOnly: false - required: false - type: string - group_id: Devices - methods: - - _key: add_to_group - description: Add one device to a group. + - _key: generate_service_provider_certificate + description: 'Generate a new service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - field_renames: [] + - created_at + - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - account_id + - is_default + - identity_provider_type + field_renames: + - _key: identity_provider_type + api_fieldname: type fields: - - _key: device-group-id - api_fieldname: device-group-id - description: The ID of the group. - entity_fieldname: device-group-id + - _key: algorithm + api_fieldname: algorithm + description: The algorithm and its key size used for generating the certificate. + Defaults to RSA2048. + entity_fieldname: algorithm + enum: + - RSA2048 + - RSA3072 + - EC224 + - EC256 + - EC384 + - EC521 + - ECDSA224 + - ECDSA256 + - ECDSA384 + - ECDSA521 + enum_reference: identity_provider_algorithm_enum external_param: true - in: path - name: device-group-id - parameter_fieldname: device-group-id - required: true + in: body + name: algorithm + parameter_fieldname: algorithm + required: false + schema_param: true type: string - _key: id - api_fieldname: device_id + api_fieldname: id + description: Entity ID. entity_fieldname: id - example: '00000000000000000000000000000000' - external_param: false - in: body - name: device_id - parameter_fieldname: device_id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' required: true - schema_param: true type: string - group_id: Devices + - _key: validity + api_fieldname: validity + description: Validity for the certificate in days. + entity_fieldname: validity + external_param: true + format: int32 + in: body + name: validity + parameter_fieldname: validity + required: false + schema_param: true + type: integer + group_id: Accounts method: post - mode: add_to_group - operation_id: Group_members_add + mode: generate_service_provider_certificate + operation_id: generateSpCertificate pagination: false parameter_map: - device_id: id - path: /v3/device-groups/{device-group-id}/devices/add/ + identity_provider_id: id + path: /v3/identity-providers/{identity_provider_id}/generate-sp-certificate request_body: json request_content_type: application/json responses: - - _key: '204' - description: Success - device added. + - _key: '200' + description: Successful operation. + headers: + - _key: Content-Location + description: /v3/identity-providers/{identity_provider_id} + type: string + schema: + foreign_key: + entity: subtenant_identity_provider + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + maxLength: 500 + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + 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. + entity_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + 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 + required: + - etag + - id + - name + - object + - type + type: object - _key: '400' - description: Bad Request. + description: Error in input data, for example, invalid certificate validity + value. + 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: '404' + description: An identity provider not found. schema: properties: - _key: code @@ -21607,8 +38413,417 @@ entities: - request_id - type type: object + return_info: + custom: false + self: true + type: identity_provider + return_type: identity_provider + summary: Generate a new service provider certificate. + x_deprecation: null + x_filter: {} + - _key: list + description: 'Retrieve an array of identity providers. + + Note: This endpoint is restricted to administrators.' + drop_fields: + - object + - etag + - type + - filter + - total_count + - has_more + - data + field_renames: + - _key: identity_provider_type + api_fieldname: type + fields: + - _key: after + api_fieldname: after + 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: 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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: identity_provider_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: identity_provider + group: Accounts + foreign_key_priority: self + group_id: Accounts + method: get + mode: list + operation_id: getAllIdentityProviders + pagination: true + parameter_map: + identity_provider_id: id + path: /v3/identity-providers + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: identity_provider + group: Accounts + 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: identity_provider + group: Accounts + properties: + - _key: account_id + description: The ID of the account the identity provider belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: description + description: Description for the identity provider. + maxLength: 500 + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_default + description: Flag indicating whether this is the global default identity + provider. + readOnly: true + type: boolean + - _key: name + description: Name of the identity provider. + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always ''identity-provider''' + 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: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave + this empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED + type: string + - _key: type + description: Identity provider type. + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + required: + - etag + - id + - name + - object + - type + 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 + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object - _key: '401' - description: Unauthorized. + description: Authentication failure. schema: properties: - _key: code @@ -21655,8 +38870,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Not found. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -21704,1535 +38919,1589 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Add a device to a group + custom: false + self: true + type: identity_provider + return_type: paginated_response(identity_provider) + summary: Get all identity providers. x_deprecation: null x_filter: {} - - _key: create - description: Create a new device. + - _key: read + description: 'Retrieve an identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - account_id - - bootstrapped_timestamp - created_at - - deployed_state - - id - - firmware_checksum - - manifest_timestamp - updated_at - - enrolment_list_timestamp - field_renames: [] + - name + - description + - status + - saml2_attributes + - oidc_attributes + - account_id + - is_default + - identity_provider_type + field_renames: + - _key: identity_provider_type + api_fieldname: type fields: - - _key: auto_update - api_fieldname: auto_update - description: 'DEPRECATED: Mark this device for automatic firmware update.' - entity_fieldname: auto_update - in: body - parameter_fieldname: auto_update - required: false - type: boolean - - _key: bootstrap_expiration_date - api_fieldname: bootstrap_expiration_date - description: The expiration date of the certificate used to connect to bootstrap - server. - entity_fieldname: bootstrap_expiration_date - format: date - in: body - parameter_fieldname: bootstrap_expiration_date - required: false - type: string - x-nullable: true - - _key: ca_id - api_fieldname: ca_id - description: The certificate issuer's ID. - entity_fieldname: ca_id - example: '00000000000000000000000000000000' - in: body - maxLength: 500 - parameter_fieldname: ca_id - required: false - type: string - - _key: connector_expiration_date - api_fieldname: connector_expiration_date - description: The expiration date of the certificate used to connect to LwM2M - server. - entity_fieldname: connector_expiration_date - format: date - in: body - parameter_fieldname: connector_expiration_date - required: false - type: string - x-nullable: true - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_attributes - 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. - entity_fieldname: custom_attributes - example: - key: value - in: body - maxProperties: 5 - parameter_fieldname: custom_attributes - required: false - type: object - - _key: deployment - api_fieldname: deployment - description: 'DEPRECATED: The last deployment used on the device.' - entity_fieldname: deployment - example: '' - in: body - parameter_fieldname: deployment - required: false - type: string - - _key: description - api_fieldname: description - description: The description of the device. - entity_fieldname: description - example: description - in: body - maxLength: 2000 - parameter_fieldname: description - required: false - type: string - - _key: device_class - api_fieldname: device_class - description: An ID representing the model and hardware revision of the device. - entity_fieldname: device_class - example: '' - in: body - maxLength: 32 - parameter_fieldname: device_class - required: false - type: string - - _key: device_execution_mode - api_fieldname: device_execution_mode - 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)\n - 1 - development\ - \ devices\n - 5 - production devices" - entity_fieldname: device_execution_mode - enum: - - 0 - - 1 - - 5 - example: 0 - in: body - parameter_fieldname: device_execution_mode - required: false - type: integer - - _key: device_key - api_fieldname: device_key - description: The fingerprint of the device certificate. - entity_fieldname: device_key - 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 - in: body - maxLength: 512 - parameter_fieldname: device_key - required: false - type: string - - _key: endpoint_name - api_fieldname: endpoint_name - description: The endpoint name given to the device. - entity_fieldname: endpoint_name - example: 00000000-0000-0000-0000-000000000000 - in: body - parameter_fieldname: endpoint_name - readOnly: true - required: false - type: string - - _key: endpoint_type - api_fieldname: endpoint_type - description: The endpoint type of the device. For example, the device is a gateway. - entity_fieldname: endpoint_type - example: '' - in: body - maxLength: 64 - parameter_fieldname: endpoint_type - required: false - type: string - - _key: host_gateway - api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. - entity_fieldname: host_gateway - example: '' - in: body - parameter_fieldname: host_gateway - required: false - type: string - - _key: issuer_fingerprint - api_fieldname: issuer_fingerprint - description: SHA256 fingerprint of the certificate used to validate the signature - of the device certificate. - entity_fieldname: issuer_fingerprint - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - in: body - parameter_fieldname: issuer_fingerprint - pattern: '[A-Fa-f0-9]{64}' - required: false - type: string - x-nullable: true - - _key: manifest - api_fieldname: manifest - description: 'DEPRECATED: The URL for the current device manifest.' - entity_fieldname: manifest - example: '' - in: body - parameter_fieldname: manifest - required: false - type: string - - _key: mechanism - api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. - entity_fieldname: mechanism - enum: - - connector - - direct - enum_reference: device_mechanism_enum - in: body - parameter_fieldname: mechanism - required: false - type: string - - _key: mechanism_url - api_fieldname: mechanism_url - description: The address of the connector to use. - entity_fieldname: mechanism_url - example: '' - in: body - parameter_fieldname: mechanism_url - required: false - type: string - - _key: name - api_fieldname: name - description: The name of the device. - entity_fieldname: name - example: 00000000-0000-0000-0000-000000000000 - in: body - maxLength: 128 - parameter_fieldname: name - required: false - type: string - - _key: serial_number - api_fieldname: serial_number - description: The serial number of the device. - entity_fieldname: serial_number - example: 00000000-0000-0000-0000-000000000000 - in: body - parameter_fieldname: serial_number - required: false - type: string - - _key: state - api_fieldname: state - description: The current state of the device. - entity_fieldname: state - enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered - enum_reference: device_state_enum - in: body - parameter_fieldname: state - required: false - type: string - - _key: vendor_id - api_fieldname: vendor_id - description: The device vendor ID. - entity_fieldname: vendor_id - example: 00000000-0000-0000-0000-000000000000 - in: body - parameter_fieldname: vendor_id - required: false + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true type: string - group_id: Devices - method: post - mode: create - operation_id: Device_create + group_id: Accounts + method: get + mode: read + operation_id: getIdentityProvider pagination: false - path: /v3/devices/ + parameter_map: + identity_provider_id: id + path: /v3/identity-providers/{identity_provider_id} request_body: json request_content_type: application/json responses: - - _key: '201' - description: Device created. + - _key: '200' + description: Successful operation. schema: - - _key: foreign_key - entity: device - group: Devices - - _key: properties - account_id: + foreign_key: + entity: subtenant_identity_provider + group: Accounts + properties: + - _key: account_id api_fieldname: account_id - description: The ID of the associated account. + description: The ID of the account the identity provider belongs to. entity_fieldname: account_id - example: '00000000000000000000000000000000' - type: string - auto_update: - api_fieldname: auto_update - description: 'DEPRECATED: Mark this device for automatic firmware update.' - entity_fieldname: auto_update - type: boolean - bootstrap_expiration_date: - api_fieldname: bootstrap_expiration_date - description: The expiration date of the certificate used to connect to bootstrap - server. - entity_fieldname: bootstrap_expiration_date - format: date - type: string - x-nullable: true - bootstrapped_timestamp: - api_fieldname: bootstrapped_timestamp - description: The timestamp of the device's most recent bootstrap process. - entity_fieldname: bootstrapped_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - ca_id: - api_fieldname: ca_id - description: The certificate issuer's ID. - entity_fieldname: ca_id - example: '00000000000000000000000000000000' - maxLength: 500 - type: string - connector_expiration_date: - api_fieldname: connector_expiration_date - description: The expiration date of the certificate used to connect to LwM2M - server. - entity_fieldname: connector_expiration_date - format: date + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - x-nullable: true - created_at: + - _key: created_at api_fieldname: created_at - description: The timestamp of when the device was created in the device - directory. + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-13T09:35:20Z' format: date-time type: string - custom_attributes: - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_attributes - 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. - entity_fieldname: custom_attributes - example: - key: value - maxProperties: 5 - type: object - deployed_state: - api_fieldname: deployed_state - description: 'DEPRECATED: The state of the device''s deployment.' - entity_fieldname: deployed_state - enum: - - development - - production - type: string - deployment: - api_fieldname: deployment - description: 'DEPRECATED: The last deployment used on the device.' - entity_fieldname: deployment - example: '' - type: string - description: + - _key: description api_fieldname: description - description: The description of the device. + description: Description for the identity provider. entity_fieldname: description - example: description - maxLength: 2000 + maxLength: 500 type: string - device_class: - api_fieldname: device_class - description: An ID representing the model and hardware revision of the device. - entity_fieldname: device_class - example: '' - maxLength: 32 + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' type: string - device_execution_mode: - api_fieldname: device_execution_mode - 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)\n\ - \ - 1 - development devices\n - 5 - production devices" - entity_fieldname: device_execution_mode - enum: - - 0 - - 1 - - 5 - example: 0 - type: integer - device_key: - api_fieldname: device_key - description: The fingerprint of the device certificate. - entity_fieldname: device_key - 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 + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - endpoint_name: - api_fieldname: endpoint_name - description: The endpoint name given to the device. - entity_fieldname: endpoint_name - example: 00000000-0000-0000-0000-000000000000 + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + maxLength: 100 type: string - endpoint_type: - api_fieldname: endpoint_type - description: The endpoint type of the device. For example, the device is - a gateway. - entity_fieldname: endpoint_type - example: '' - maxLength: 64 + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + enum: + - identity-provider type: string - enrolment_list_timestamp: - api_fieldname: enrolment_list_timestamp - description: The claim date/time. - entity_fieldname: enrolment_list_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _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. + entity_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED type: string - etag: - api_fieldname: etag - description: The entity instance signature. - entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC type: string - firmware_checksum: - api_fieldname: firmware_checksum - description: The SHA256 checksum of the current firmware image. - entity_fieldname: firmware_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' + - _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 - groups: - api_fieldname: groups - description: An array containing an ID of each group this device belongs - to. - entity_fieldname: groups + required: + - etag + - id + - name + - object + - 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: - example: '00000000000000000000000000000000' - type: string + 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 - host_gateway: - api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. - entity_fieldname: host_gateway - example: '' + - _key: message + description: A human readable informative explanation + example: Validation error type: string - id: - api_fieldname: id - description: The ID of the device. The device ID is used across all Device - Management APIs. - entity_fieldname: id - example: '00000000000000000000000000000000' + - _key: object + description: Entity name, always `error`. + enum: + - error type: string - issuer_fingerprint: - api_fieldname: issuer_fingerprint - description: SHA256 fingerprint of the certificate used to validate the - signature of the device certificate. - entity_fieldname: issuer_fingerprint - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - x-nullable: true - manifest: - api_fieldname: manifest - description: 'DEPRECATED: The URL for the current device manifest.' - entity_fieldname: manifest - example: '' + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - manifest_timestamp: - api_fieldname: manifest_timestamp - description: The timestamp of the current manifest version. - entity_fieldname: manifest_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - mechanism: - api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. - entity_fieldname: mechanism + - _key: object + description: Entity name, always `error`. enum: - - connector - - direct - type: string - mechanism_url: - api_fieldname: mechanism_url - description: The address of the connector to use. - entity_fieldname: mechanism_url - example: '' + - error type: string - name: - api_fieldname: name - description: The name of the device. - entity_fieldname: name - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - object: - api_fieldname: object - description: The API resource entity. - entity_fieldname: object - example: device + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - serial_number: - api_fieldname: serial_number - description: The serial number of the device. - entity_fieldname: serial_number - example: 00000000-0000-0000-0000-000000000000 + required: + - code + - message + - object + - request_id + - type + type: object + - _key: '404' + description: An identity provider 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 - state: - api_fieldname: state - description: The current state of the device. - entity_fieldname: state + - _key: object + description: Entity name, always `error`. enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - error type: string - updated_at: - api_fieldname: updated_at - description: The time the object was updated. - entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - vendor_id: - api_fieldname: vendor_id - description: The device vendor ID. - entity_fieldname: vendor_id - example: 00000000-0000-0000-0000-000000000000 + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - - _key: '400' - description: 'Validation error: The data used to create the device did not validate. - - ' - - _key: '401' - description: Not authenticated. - - _key: '403' - description: Account limit reached. Could not create device. - - _key: '409' - description: Unique-constrained fields are used by other resources. + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true - type: device - return_type: device - summary: Create a device + type: identity_provider + return_type: identity_provider + summary: Get identity provider. x_deprecation: null x_filter: {} - - _key: delete - description: Delete device. Only available for devices with a developer certificate. - Attempts to delete a device with a production certicate will return a 400 response. + - _key: refresh_tokens + description: 'Refreshes an OIDC IdP''s signing keys. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - field_renames: [] + - created_at + - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - account_id + - is_default + - identity_provider_type + field_renames: + - _key: identity_provider_type + api_fieldname: type fields: - _key: id api_fieldname: id + description: Entity ID. entity_fieldname: id - external_param: false + example: 01619571d01d0242ac12000600000000 in: path - name: id - parameter_fieldname: id + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' required: true type: string - group_id: Devices - method: delete - mode: delete - operation_id: Device_destroy + group_id: Accounts + method: post + mode: refresh_tokens + operation_id: refreshJwks pagination: false - path: /v3/devices/{id}/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Device deleted. - - _key: '400' - description: Bad Request. - - _key: '401' - description: Not authenticated. - - _key: '404' - description: Unable to delete device because it can't be found. - return_info: - custom: false - self: true - type: device - return_type: device - summary: Delete a device. - x_deprecation: null - x_filter: {} - - _key: list - description: List all devices. - drop_fields: - - object - - etag - - type - - groups - - filter - - data - - has_more - - total_count - - 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 - field_renames: [] - fields: - - _key: after - api_fieldname: after - description: The ID of The item after which to retrieve the next page. - entity_fieldname: after - example: '01631667477600000000000100100374' - external_param: true - in: query - name: after - parameter_fieldname: after - required: false - type: string - - _key: include - api_fieldname: include - description: 'Comma-separated list of data fields 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: 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 - external_param: true - in: query - maximum: 1000 - minimum: 2 - name: limit - parameter_fieldname: limit - required: false - type: integer - - _key: order - api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - entity_fieldname: order - example: DESC - external_param: true - in: query - name: order - parameter_fieldname: order - required: false - type: string - foreign_key: - entity: device - group: Devices - foreign_key_priority: self - group_id: Devices - method: get - mode: list - operation_id: Device_list - pagination: true - path: /v3/devices/ + parameter_map: + identity_provider_id: id + path: /v3/identity-providers/{identity_provider_id}/refresh-jwks request_body: json request_content_type: application/json responses: - _key: '200' - description: Request successful. + description: Successful operation. + headers: + - _key: Content-Location + description: /v3/identity-providers/{identity_provider_id} + type: string schema: foreign_key: - entity: device - group: Devices - pagination: true + entity: subtenant_identity_provider + group: Accounts properties: - - _key: after - api_fieldname: after - description: An offset token for current page. - entity_fieldname: after - example: '01631667477600000000000100100374' + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - - _key: data - api_fieldname: data - entity_fieldname: data - items: - - _key: foreign_key - entity: device - group: Devices - - _key: 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 + - _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 + type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + maxLength: 500 + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + 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 - 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 - connector_expiration_date: - description: The expiration date of the certificate used to connect - to LwM2M server. - format: date + - _key: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified 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: description - 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: - 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)\n - 1 - development devices\n - 5 - production devices" - 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. - 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. - example: '' - type: string - id: - description: The ID of the device. The device ID is used across all - Device Management APIs. - example: '00000000000000000000000000000000' - type: string - issuer_fingerprint: - description: SHA256 fingerprint of the certificate used to validate - the signature of the device certificate. - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' + - _key: family_name + description: Custom claim name for 'family_name'. + example: family_name type: string x-nullable: true - manifest: - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' + - _key: given_name + description: Custom claim name for 'given_name'. + example: given_name type: string - manifest_timestamp: - description: The timestamp of the current manifest version. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + x-nullable: true + - _key: name + description: Custom claim name for 'name'. + example: name type: string - mechanism: - description: The ID of the channel used to communicate with the device. - enum: - - connector - - direct + x-nullable: true + - _key: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number type: string - mechanism_url: - description: The address of the connector to use. - example: '' + x-nullable: true + - _key: sub + description: Custom claim name for 'sub'. + example: sub type: string - name: - description: The name of the device. - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + x-nullable: true + - _key: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at type: string - object: - description: The API resource entity. - example: device + 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 - serial_number: - description: The serial number of the device. - example: 00000000-0000-0000-0000-000000000000 + 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. + entity_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + 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 + required: + - etag + - id + - name + - object + - type + type: object + - _key: '400' + description: Not an OIDC IdP or JWKS URI is unspecified. + 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 - state: - description: The current state of the device. - enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - _key: name + description: Name of the field which caused the error. type: string - updated_at: - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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 - vendor_id: - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message + type: 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 - type: integer + - _key: message + description: A human readable informative explanation + example: Validation error + type: string - _key: object - api_fieldname: object - description: The type of this API object is a "list". - entity_fieldname: object - example: list + description: Entity name, always `error`. + enum: + - error type: string - - _key: order - api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - entity_fieldname: order - example: DESC + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: total_count - api_fieldname: total_count - entity_fieldname: total_count - example: 1 - format: integer + - _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: '400' - description: Bad Request. - - _key: '401' - description: Not authenticated. - - _key: '404' - description: Unable to find page. - return_info: - custom: false - self: true - type: device - return_type: paginated_response(device) - summary: List all devices. - x_deprecation: null - x_filter: - 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 - - _key: read - description: Retrieve information about a specific device. + - _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: An identity provider 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: identity_provider + return_type: identity_provider + summary: Refreshes the OIDC signing keys. + x_deprecation: null + x_filter: {} + - _key: update + description: 'Update an existing identity provider. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - issuer_fingerprint - - account_id - - device_execution_mode - - auto_update - - bootstrap_expiration_date - - bootstrapped_timestamp - - ca_id - - 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 - - serial_number - - state - updated_at - - vendor_id - - enrolment_list_timestamp - field_renames: [] + - account_id + - is_default + field_renames: + - _key: identity_provider_type + api_fieldname: type fields: + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: discovery + allowEmptyValue: true + api_fieldname: discovery + 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' + entity_fieldname: discovery + external_param: true + in: query + name: discovery + parameter_fieldname: discovery + required: false + type: boolean - _key: id api_fieldname: id - description: The ID of the device. The device ID is used across all Device Management - APIs. + description: Entity ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 01619571d01d0242ac12000600000000 in: path - parameter_fieldname: id + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' required: true type: string - group_id: Devices - method: get - mode: read - operation_id: Device_retrieve + - _key: identity_provider_type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type + enum: *id004 + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true + type: string + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true + 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: *id005 + 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider in + PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: *id006 + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: put + mode: update + operation_id: updateIdentityProvider pagination: false - path: /v3/devices/{id}/ + parameter_map: + identity_provider_id: id + path: /v3/identity-providers/{identity_provider_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Retrieved result successfully. + description: Successful operation. schema: - - _key: foreign_key - entity: device - group: Devices - - _key: properties - account_id: + foreign_key: + entity: subtenant_identity_provider + group: Accounts + properties: + - _key: account_id api_fieldname: account_id - description: The ID of the associated account. + description: The ID of the account the identity provider belongs to. entity_fieldname: account_id - example: '00000000000000000000000000000000' - type: string - auto_update: - api_fieldname: auto_update - description: 'DEPRECATED: Mark this device for automatic firmware update.' - entity_fieldname: auto_update - type: boolean - bootstrap_expiration_date: - api_fieldname: bootstrap_expiration_date - description: The expiration date of the certificate used to connect to bootstrap - server. - entity_fieldname: bootstrap_expiration_date - format: date - type: string - x-nullable: true - bootstrapped_timestamp: - api_fieldname: bootstrapped_timestamp - description: The timestamp of the device's most recent bootstrap process. - entity_fieldname: bootstrapped_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - ca_id: - api_fieldname: ca_id - description: The certificate issuer's ID. - entity_fieldname: ca_id - example: '00000000000000000000000000000000' - maxLength: 500 - type: string - connector_expiration_date: - api_fieldname: connector_expiration_date - description: The expiration date of the certificate used to connect to LwM2M - server. - entity_fieldname: connector_expiration_date - format: date + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - x-nullable: true - created_at: + - _key: created_at api_fieldname: created_at - description: The timestamp of when the device was created in the device - directory. + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-13T09:35:20Z' format: date-time type: string - custom_attributes: - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_attributes - 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. - entity_fieldname: custom_attributes - example: - key: value - maxProperties: 5 - type: object - deployed_state: - api_fieldname: deployed_state - description: 'DEPRECATED: The state of the device''s deployment.' - entity_fieldname: deployed_state - enum: - - development - - production - type: string - deployment: - api_fieldname: deployment - description: 'DEPRECATED: The last deployment used on the device.' - entity_fieldname: deployment - example: '' - type: string - description: + - _key: description api_fieldname: description - description: The description of the device. + description: Description for the identity provider. entity_fieldname: description - example: description - maxLength: 2000 - type: string - device_class: - api_fieldname: device_class - description: An ID representing the model and hardware revision of the device. - entity_fieldname: device_class - example: '' - maxLength: 32 - type: string - device_execution_mode: - api_fieldname: device_execution_mode - 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)\n\ - \ - 1 - development devices\n - 5 - production devices" - entity_fieldname: device_execution_mode - enum: - - 0 - - 1 - - 5 - example: 0 - type: integer - device_key: - api_fieldname: device_key - description: The fingerprint of the device certificate. - entity_fieldname: device_key - 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: - api_fieldname: endpoint_name - description: The endpoint name given to the device. - entity_fieldname: endpoint_name - example: 00000000-0000-0000-0000-000000000000 - readOnly: true - type: string - endpoint_type: - api_fieldname: endpoint_type - description: The endpoint type of the device. For example, the device is - a gateway. - entity_fieldname: endpoint_type - example: '' - maxLength: 64 - type: string - enrolment_list_timestamp: - api_fieldname: enrolment_list_timestamp - description: The claim date/time. - entity_fieldname: enrolment_list_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + maxLength: 500 type: string - etag: + - _key: etag api_fieldname: etag - description: The entity instance signature. + description: API resource entity version. entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - firmware_checksum: - api_fieldname: firmware_checksum - description: The SHA256 checksum of the current firmware image. - entity_fieldname: firmware_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' - type: string - groups: - api_fieldname: groups - description: An array containing an ID of each group this device belongs - to. - entity_fieldname: groups - items: - example: '00000000000000000000000000000000' - type: string - type: array - host_gateway: - api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. - entity_fieldname: host_gateway - example: '' + example: '1' type: string - id: + - _key: id api_fieldname: id - description: The ID of the device. The device ID is used across all Device - Management APIs. + description: Entity ID. entity_fieldname: id - example: '00000000000000000000000000000000' - type: string - issuer_fingerprint: - api_fieldname: issuer_fingerprint - description: SHA256 fingerprint of the certificate used to validate the - signature of the device certificate. - entity_fieldname: issuer_fingerprint - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' - type: string - x-nullable: true - manifest: - api_fieldname: manifest - description: 'DEPRECATED: The URL for the current device manifest.' - entity_fieldname: manifest - example: '' - type: string - manifest_timestamp: - api_fieldname: manifest_timestamp - description: The timestamp of the current manifest version. - entity_fieldname: manifest_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - mechanism: - api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. - entity_fieldname: mechanism - enum: - - connector - - direct - type: string - mechanism_url: - api_fieldname: mechanism_url - description: The address of the connector to use. - entity_fieldname: mechanism_url - example: '' + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - name: + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name api_fieldname: name - description: The name of the device. + description: Name of the identity provider. entity_fieldname: name - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + maxLength: 100 type: string - object: + - _key: object api_fieldname: object - description: The API resource entity. + description: 'Entity name: always ''identity-provider''' entity_fieldname: object - example: device + enum: + - identity-provider type: string - serial_number: - api_fieldname: serial_number - description: The serial number of the device. - entity_fieldname: serial_number - example: 00000000-0000-0000-0000-000000000000 + - _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. + entity_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED type: string - state: - api_fieldname: state - description: The current state of the device. - entity_fieldname: state + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: identity_provider_type enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - NATIVE + - MBED + - SAML2 + - OIDC type: string - updated_at: + - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: Last update UTC time RFC3339. entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-14T15:24:14Z' format: date-time type: string - vendor_id: - api_fieldname: vendor_id - description: The device vendor ID. - entity_fieldname: vendor_id - example: 00000000-0000-0000-0000-000000000000 - type: string - - _key: '400' - description: Bad Request. - - _key: '401' - description: Not authenticated. - - _key: '404' - description: Unable to find device. - return_info: - custom: false - self: true - type: device - return_type: device - summary: Get a device - x_deprecation: null - x_filter: {} - - _key: remove_from_group - description: Remove one device from a group. - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: [] - fields: - - _key: device-group-id - api_fieldname: device-group-id - description: The ID of the group. - entity_fieldname: device-group-id - external_param: true - in: path - name: device-group-id - parameter_fieldname: device-group-id - required: true - type: string - - _key: id - api_fieldname: device_id - entity_fieldname: id - example: '00000000000000000000000000000000' - external_param: false - in: body - name: device_id - parameter_fieldname: device_id - required: true - schema_param: true - type: string - group_id: Devices - method: post - mode: remove_from_group - operation_id: Group_members_remove - pagination: false - parameter_map: - device_id: id - path: /v3/device-groups/{device-group-id}/devices/remove/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Success - device removed. + required: + - etag + - id + - name + - object + - type + type: object - _key: '400' - description: Bad Request. + description: Error in input data, for example, missing name. schema: properties: - _key: code @@ -23280,7 +40549,55 @@ entities: - type type: object - _key: '401' - description: Unauthorized. + 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 @@ -23328,7 +40645,7 @@ entities: - type type: object - _key: '404' - description: Not Found. + description: An identity provider not found. schema: properties: - _key: code @@ -23376,1036 +40693,782 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Remove a device from a group + custom: false + self: true + type: identity_provider + return_type: identity_provider + summary: Update an existing identity provider. x_deprecation: null x_filter: {} - - _key: renew_certificate - description: 'Request a certificate renewal. + primary_key_field: id + swagger_models: + - CertificateGenerationReq + - IdentityProviderCreationReq + - IdentityProviderInfo + - IdentityProviderList + - IdentityProviderUpdateReq + tags: + - Account - identity providers +- _key: identity_provider_public_key + field_renames: [] + fields: + - _key: key + api_fieldname: key + description: The public key. + readOnly: true + required: false + type: string + - _key: kid + api_fieldname: kid + description: The public key ID. + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - IdpPublicKey + tags: [] +- _key: light_theme_color + field_renames: [] + fields: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' + in: body + parameter_fieldname: color + readOnly: false + required: false + type: string + x-nullable: true + - _key: reference + _override: true + api_fieldname: reference + 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 + enum_reference: light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + readOnly: false + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string + group_id: Branding + methods: + - _key: delete + description: 'Resets the branding color to its light theme default. + Note: This endpoint is restricted to administrators. - **Example:** + **Example:** ``` - curl -X POST https://api.us-east-1.mbedcloud.com/v3/devices/01612df56f3b0a580a010fc700000000/certificates/customer.dlms/renew + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} \ - -H ''Authorization: Bearer '' \ - - -H ''content-length: 0'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - created_at - - device_id - - enroll_status - - enroll_result - - enroll_result_detail - - updated_at field_renames: [] fields: - - _key: certificate_name - api_fieldname: certificate-name - description: The certificate name. - entity_fieldname: certificate_name - example: customer.dlms - external_param: true - in: path - maxLength: 50 - name: certificate-name - parameter_fieldname: certificate-name - pattern: '[\w\-]{1,10}\.[\w\-.]{1,10}' - required: true - type: string - - _key: id - api_fieldname: id - description: The certificate enrollment ID. - entity_fieldname: id - example: 01612df56f3b0a580a010fc700000000 + - _key: reference + _override: true + api_fieldname: reference + description: The name of the branding color. + entity_fieldname: reference + enum: &id007 + - 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 + enum_reference: light_theme_color_reference_enum in: path - parameter_fieldname: device-id + is_primary_key: true + name: reference required: true type: string - foreign_key: - entity: certificate_enrollment - group: Security - group_id: Devices - method: post - mode: renew_certificate - operation_id: RequestCertificateRenewal + group_id: Branding + method: delete + mode: delete + operation_id: resetLightColor pagination: false - parameter_map: - certificate-name: certificate_name - device-id: id - path: /v3/devices/{device-id}/certificates/{certificate-name}/renew + path: /v3/branding-colors/light/{reference} request_body: json request_content_type: application/json responses: - - _key: '201' - description: Created. - schema: - foreign_key: - entity: certificate_enrollment - group: Security - properties: - - _key: certificate_name - api_fieldname: certificate_name - description: The certificate name. - entity_fieldname: certificate_name - example: customer.dlms - maxLength: 50 - type: string - - _key: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - entity_fieldname: created_at - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - - _key: device_id - api_fieldname: device_id - description: The device ID. - entity_fieldname: device_id - example: 01625daa23230a580a0100bd00000000 - type: string - - _key: enroll_result - api_fieldname: enroll_result - description: The result of certificate enrollment request. - entity_fieldname: enroll_result - enum: - - success - - failure - example: success - type: string - - _key: enroll_result_detail - api_fieldname: enroll_result_detail - description: Additional information in case of failure. - entity_fieldname: enroll_result_detail - example: The device is currently processing too many certificate renewals. - type: string - - _key: enroll_status - api_fieldname: enroll_status - description: The status of certificate enrollment request. - entity_fieldname: enroll_status - enum: - - new - - completed - type: string - - _key: etag - api_fieldname: etag - description: Entity instance signature. - entity_fieldname: etag - example: '1' - type: string - - _key: id - api_fieldname: id - description: The certificate enrollment ID. - entity_fieldname: id - example: 01612df56f3b0a580a010fc700000000 - type: string - - _key: object - api_fieldname: object - entity_fieldname: object - enum: - - certificate-enrollment - type: string - - _key: updated_at - api_fieldname: updated_at - description: Update UTC time RFC3339. - entity_fieldname: updated_at - example: '2017-01-01T00:00:00Z' - format: date-time - type: string - required: - - created_at - - etag - - id - - device_id - - certificate_name - type: object - - _key: '400' - description: 'Validation error: There is no certificate issuer configured for - this certificate.' - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object + - _key: '204' + description: Deleted successfully. - _key: '401' - description: You are not authorized to perform the action. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '403' - description: Forbidden. - schema: - properties: - - _key: code - description: Error code. Correlates with response status code. - format: int32 - type: integer - - _key: fields - description: A list of request fields that failed validation. - items: - properties: - - _key: field - description: Field name. - type: string - - _key: message - description: Error message related to the field. - type: string - type: object - type: array - - _key: message - description: Error message. - type: string - - _key: object - description: 'Entity name: `error`.' - type: string - - _key: request_id - description: Request ID from JWT. - type: string - - _key: type - description: Error type. - type: string - required: - - code - - fields - - message - - object - - request_id - - type - type: object - - _key: '404' - description: The device ID or certificate name is not found. + description: Authentication failure. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '409' - description: Conflict. A renewal request for this certificate is in progress. + - _key: '403' + description: Forbidden. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object - - _key: '423' - description: 'Either: - - - Operation not supported for this device. - - - The device is not connected.' + - _key: '404' + description: Color not found. schema: properties: - _key: code - description: Error code. Correlates with response status code. + description: HTTP response code + example: 400 format: int32 type: integer - _key: fields - description: A list of request fields that failed validation. + description: Request fields which failed validation. items: properties: - - _key: field - description: Field name. - type: string - _key: message - description: Error message related to the field. + 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: Error message. + description: A human readable informative explanation + example: Validation error type: string - _key: object - description: 'Entity name: `error`.' + description: Entity name, always `error`. + enum: + - error type: string - _key: request_id - description: Request ID from JWT. + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - _key: type - description: Error type. + description: Error type used to categorise the error. + example: validation_error type: string required: - code - - fields - message - object - request_id - type type: object return_info: - custom: false + custom: true self: false - type: certificate_enrollment - return_type: certificate_enrollment - summary: Request certificate renewal. - unaggregated: true + type: void + return_type: void + spec: + return_type: void + summary: Reset branding color to default. x_deprecation: null x_filter: {} - - _key: update - description: Update a specific device. + - _key: list + description: 'Retrieve the light theme branding colors. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - - issuer_fingerprint - - account_id - - device_execution_mode - - 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 + - limit + - after + - order + - total_count + - has_more + - data field_renames: [] fields: - - _key: auto_update - api_fieldname: auto_update - description: 'DEPRECATED: Mark this device for automatic firmware update.' - entity_fieldname: auto_update - in: body - parameter_fieldname: auto_update - required: false - type: boolean - - _key: ca_id - api_fieldname: ca_id - description: The certificate issuer's ID. - entity_fieldname: ca_id - example: '00000000000000000000000000000000' - in: body - maxLength: 500 - parameter_fieldname: ca_id - required: false - type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_attributes - 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. - entity_fieldname: custom_attributes - example: - key: value - in: body - maxProperties: 5 - parameter_fieldname: custom_attributes - required: false - type: object - - _key: description - api_fieldname: description - description: The description of the device. - entity_fieldname: description - example: description - in: body - maxLength: 2000 - parameter_fieldname: description - required: false - type: string - - _key: device_key - api_fieldname: device_key - description: The fingerprint of the device certificate. - entity_fieldname: device_key - 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 - in: body - maxLength: 512 - parameter_fieldname: device_key - required: false - type: string - - _key: endpoint_name - api_fieldname: endpoint_name - description: The endpoint name given to the device. - entity_fieldname: endpoint_name - example: 00000000-0000-0000-0000-000000000000 - in: body - parameter_fieldname: endpoint_name - readOnly: true - required: false - type: string - - _key: endpoint_type - api_fieldname: endpoint_type - description: The endpoint type of the device. For example, the device is a gateway. - entity_fieldname: endpoint_type - example: '' - in: body - maxLength: 64 - parameter_fieldname: endpoint_type - required: false - type: string - - _key: host_gateway - api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. - entity_fieldname: host_gateway - example: '' - in: body - parameter_fieldname: host_gateway - required: false - type: string - - _key: id - api_fieldname: id - description: The ID of the device. The device ID is used across all Device Management - APIs. - entity_fieldname: id - example: '00000000000000000000000000000000' - in: path - parameter_fieldname: id - required: true - type: string - - _key: name - api_fieldname: name - description: The name of the device. - entity_fieldname: name - example: 00000000-0000-0000-0000-000000000000 - in: body - maxLength: 128 - parameter_fieldname: name - required: false + - _key: reference + _override: true + api_fieldname: reference + entity_fieldname: reference + is_primary_key: true type: string - group_id: Devices - method: put - mode: update - operation_id: Device_update - pagination: false - path: /v3/devices/{id}/ + foreign_key: + entity: light_theme_color + group: Branding + foreign_key_priority: self + group_id: Branding + method: get + mode: list + operation_id: getLightColors + pagination: true + path: /v3/branding-colors/light request_body: json request_content_type: application/json responses: - _key: '200' - description: Device updated. + description: Successful operation. schema: - - _key: foreign_key - entity: device - group: Devices - - _key: properties - account_id: - api_fieldname: account_id - description: The ID of the associated account. - entity_fieldname: account_id - example: '00000000000000000000000000000000' - type: string - auto_update: - api_fieldname: auto_update - description: 'DEPRECATED: Mark this device for automatic firmware update.' - entity_fieldname: auto_update - type: boolean - bootstrap_expiration_date: - api_fieldname: bootstrap_expiration_date - description: The expiration date of the certificate used to connect to bootstrap - server. - entity_fieldname: bootstrap_expiration_date - format: date - type: string - x-nullable: true - bootstrapped_timestamp: - api_fieldname: bootstrapped_timestamp - description: The timestamp of the device's most recent bootstrap process. - entity_fieldname: bootstrapped_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - ca_id: - api_fieldname: ca_id - description: The certificate issuer's ID. - entity_fieldname: ca_id - example: '00000000000000000000000000000000' - maxLength: 500 - type: string - connector_expiration_date: - api_fieldname: connector_expiration_date - description: The expiration date of the certificate used to connect to LwM2M - server. - entity_fieldname: connector_expiration_date - format: date - type: string - x-nullable: true - created_at: - api_fieldname: created_at - description: The timestamp of when the device was created in the device - directory. - entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - custom_attributes: - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_attributes - 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. - entity_fieldname: custom_attributes - example: - key: value - maxProperties: 5 - type: object - deployed_state: - api_fieldname: deployed_state - description: 'DEPRECATED: The state of the device''s deployment.' - entity_fieldname: deployed_state - enum: - - development - - production - type: string - deployment: - api_fieldname: deployment - description: 'DEPRECATED: The last deployment used on the device.' - entity_fieldname: deployment - example: '' - type: string - description: - api_fieldname: description - description: The description of the device. - entity_fieldname: description - example: description - maxLength: 2000 - type: string - device_class: - api_fieldname: device_class - description: An ID representing the model and hardware revision of the device. - entity_fieldname: device_class - example: '' - maxLength: 32 - type: string - device_execution_mode: - api_fieldname: device_execution_mode - 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)\n\ - \ - 1 - development devices\n - 5 - production devices" - entity_fieldname: device_execution_mode - enum: - - 0 - - 1 - - 5 - example: 0 - type: integer - device_key: - api_fieldname: device_key - description: The fingerprint of the device certificate. - entity_fieldname: device_key - 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: - api_fieldname: endpoint_name - description: The endpoint name given to the device. - entity_fieldname: endpoint_name - example: 00000000-0000-0000-0000-000000000000 - readOnly: true - type: string - endpoint_type: - api_fieldname: endpoint_type - description: The endpoint type of the device. For example, the device is - a gateway. - entity_fieldname: endpoint_type - example: '' - maxLength: 64 - type: string - enrolment_list_timestamp: - api_fieldname: enrolment_list_timestamp - description: The claim date/time. - entity_fieldname: enrolment_list_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - etag: - api_fieldname: etag - description: The entity instance signature. - entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - firmware_checksum: - api_fieldname: firmware_checksum - description: The SHA256 checksum of the current firmware image. - entity_fieldname: firmware_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' + foreign_key: + entity: 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 - groups: - api_fieldname: groups - description: An array containing an ID of each group this device belongs - to. - entity_fieldname: groups + - _key: data + api_fieldname: data + description: A list of entities. + entity_fieldname: data items: - example: '00000000000000000000000000000000' - type: string + 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 - host_gateway: - api_fieldname: host_gateway - description: The ID of the host gateway, if appropriate. - entity_fieldname: host_gateway - example: '' - type: string - id: - api_fieldname: id - description: The ID of the device. The device ID is used across all Device - Management APIs. - entity_fieldname: id - example: '00000000000000000000000000000000' - type: string - issuer_fingerprint: - api_fieldname: issuer_fingerprint - description: SHA256 fingerprint of the certificate used to validate the - signature of the device certificate. - entity_fieldname: issuer_fingerprint - example: C42EDEFC75871E4CE2146FCDA67D03DDA05CC26FDF93B17B55F42C1EADFDC322 - pattern: '[A-Fa-f0-9]{64}' + - _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 - x-nullable: true - manifest: - api_fieldname: manifest - description: 'DEPRECATED: The URL for the current device manifest.' - entity_fieldname: manifest - example: '' + - _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 - manifest_timestamp: - api_fieldname: manifest_timestamp - description: The timestamp of the current manifest version. - entity_fieldname: manifest_timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + 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 - mechanism: - api_fieldname: mechanism - description: The ID of the channel used to communicate with the device. - entity_fieldname: mechanism + - _key: object + description: Entity name, always `error`. enum: - - connector - - direct - type: string - mechanism_url: - api_fieldname: mechanism_url - description: The address of the connector to use. - entity_fieldname: mechanism_url - example: '' + - error type: string - name: - api_fieldname: name - description: The name of the device. - entity_fieldname: name - example: 00000000-0000-0000-0000-000000000000 - maxLength: 128 + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - object: - api_fieldname: object - description: The API resource entity. - entity_fieldname: object - example: device + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - serial_number: - api_fieldname: serial_number - description: The serial number of the device. - entity_fieldname: serial_number - example: 00000000-0000-0000-0000-000000000000 + 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 - state: - api_fieldname: state - description: The current state of the device. - entity_fieldname: state + - _key: object + description: Entity name, always `error`. enum: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - error type: string - updated_at: - api_fieldname: updated_at - description: The time the object was updated. - entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - vendor_id: - api_fieldname: vendor_id - description: The device vendor ID. - entity_fieldname: vendor_id - example: 00000000-0000-0000-0000-000000000000 + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - - _key: '400' - description: 'Validation error: The data used to update the device did not validate. - - ' - - _key: '401' - description: Not authenticated. - - _key: '404' - description: Unable to update device because it can't be found. + required: + - code + - message + - object + - request_id + - type + type: object return_info: custom: false self: true - type: device - return_type: device - summary: Update a device + type: light_theme_color + return_type: paginated_response(light_theme_color) + summary: Get light theme branding colors. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - CertificateEnrollment - - DeviceData - - DeviceDataPostRequest - - DeviceDataPutRequest - - DeviceGroupManipulation - - DevicePage - tags: - - Device security - device certificate renewals -- _key: device_enrollment - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: ID - example: 00005a4e027f0a580a01081c00000000 - readOnly: true - required: false - type: string - - _key: claimed_at - api_fieldname: claimed_at - description: The time the device was claimed. - format: date-time - readOnly: true - required: false - type: string - - _key: created_at - api_fieldname: created_at - description: The time of the enrollment identity creation. - format: date-time - readOnly: true - required: false - 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. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - readOnly: true - required: false - type: string - - _key: enrollment_identity - api_fieldname: 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}$ - readOnly: false - required: true - 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. - format: date-time - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: Enrollment identity. - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} - readOnly: false - required: true - type: string - group_id: Devices - methods: - - _key: create - description: 'When the device connects to the bootstrap server and provides the - enrollment ID, it is assigned to your account. + - _key: read + description: 'Retrieve the requested light theme branding color. -
**Example:** ``` - curl -X POST \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollments \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} + \ - -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"}'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - id - - created_at - - claimed_at - - account_id - - expires_at - - enrolled_device_id + - color + - updated_at field_renames: [] fields: - - _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 - in: body - parameter_fieldname: enrollment_identity - pattern: ^A-[A-Za-z0-9:]{95}$ + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id007 + enum_reference: light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference required: true type: string - group_id: Devices - method: post - mode: create - operation_id: createDeviceEnrollment + group_id: Branding + method: get + mode: read + operation_id: getLightColor pagination: false - path: /v3/device-enrollments + path: /v3/branding-colors/light/{reference} request_body: json request_content_type: application/json responses: - - _key: '201' - description: Created. The enrollment claim has been created and is waiting for - the device to connect. + - _key: '200' + description: Successful operation. schema: foreign_key: - entity: device_enrollment - group: Devices + entity: subtenant_light_theme_color + group: Branding properties: - - _key: account_id - api_fieldname: account_id - description: ID - entity_fieldname: account_id - example: 00005a4e027f0a580a01081c00000000 + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + in: body + parameter_fieldname: color + required: false type: string - - _key: claimed_at - api_fieldname: claimed_at - description: The time the device was claimed. - entity_fieldname: claimed_at - format: date-time + x-nullable: true + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_color''' + entity_fieldname: object + enum: + - branding_color + external_param: true + in: body + name: object + parameter_fieldname: object + readOnly: true + required: false + schema_param: true type: string - - _key: created_at - api_fieldname: created_at - description: The time of the enrollment identity creation. - entity_fieldname: created_at + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + 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 + enum_reference: dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false 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: 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: 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}$ + - _key: object + description: Entity name, always `error`. + enum: + - error type: string - - _key: etag - api_fieldname: etag - entity_fieldname: etag - example: 7642xfaxz - pattern: '[A-Za-z0-9]{1,256}' + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 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 + - _key: type + description: Error type used to categorise the error. + example: validation_error type: string - - _key: id - api_fieldname: id - description: Enrollment identity. - entity_fieldname: id - example: 00005a4e027f0a580a01081c00000000 - pattern: ^[A-Za-z0-9]{32} + 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 - api_fieldname: object - entity_fieldname: object + description: Entity name, always `error`. enum: - - enrollment - example: enrollment + - 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 - - id - - etag - - account_id - - created_at - - expires_at - - claimed_at - - enrollment_identity - - enrolled_device_id + - request_id + - type type: object - - _key: '400' - description: Bad request. The enrollment identity is not valid. + - _key: '404' + description: Color not found. schema: properties: - _key: code @@ -24452,8 +41515,160 @@ entities: - request_id - type type: object - - _key: '401' - description: The provided access token is not valid. + return_info: + custom: false + self: true + type: light_theme_color + return_type: light_theme_color + summary: Get light theme branding color. + x_deprecation: null + x_filter: {} + - _key: update + additional_operations: + - notes: Bulk operation is not appriate for SDK's entity model, this functionality + is covered by the update method. + operation_id: bulkSetLightColors + description: 'Update light theme branding color. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "color": "purple" }'' + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + in: body + parameter_fieldname: color + required: false + type: string + x-nullable: true + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id007 + enum_reference: light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string + group_id: Branding + method: put + mode: update + operation_id: setLightColor + pagination: false + path: /v3/branding-colors/light/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Color has been set successfully. + schema: + foreign_key: + entity: subtenant_light_theme_color + group: Branding + properties: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + in: body + parameter_fieldname: color + required: false + type: string + x-nullable: true + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_color''' + entity_fieldname: object + enum: + - branding_color + external_param: true + in: body + name: object + parameter_fieldname: object + readOnly: true + required: false + schema_param: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + 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 + enum_reference: dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string + type: object + - _key: '400' + description: Error in input data format. schema: properties: - _key: code @@ -24500,9 +41715,8 @@ entities: - request_id - type type: object - - _key: '409' - description: Conflict. The requested identity to add already exists on this - or another account. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -24549,63 +41763,8 @@ entities: - 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](../docs/current/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 - - groups - - 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. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -24653,7 +41812,7 @@ entities: - type type: object - _key: '404' - description: Not found. + description: Color not found. schema: properties: - _key: code @@ -24703,239 +41862,220 @@ entities: return_info: custom: false self: true - type: device_enrollment - return_type: device_enrollment - summary: Delete an enrollment by ID. + type: light_theme_color + return_type: light_theme_color + summary: Updates light theme branding color. x_deprecation: null x_filter: {} - - _key: list - description: 'Provides a list of pending and claimed enrollments. - - - **Example:** - - ``` - - curl -X GET \ - - -H ''Authorization: Bearer '' \ + primary_key_field: reference + swagger_models: + - BrandingColor + - BrandingColorList + tags: + - User interface configuration - colors +- _key: light_theme_image + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: Name of the 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 + enum_reference: light_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + readOnly: false + required: false + type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Branding + methods: + - _key: delete + description: 'Revert an account branding image to light theme default. - https://api.us-east-1.mbedcloud.com/v3/device-enrollments + Note: This endpoint is restricted to administrators. - ``` - With query parameters: + **Example:** ``` - curl -X GET \ - - -H ''Authorization: Bearer '' \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference}/clear + \ - ''https://api.us-east-1.mbedcloud.com/v3/device-enrollments?limit=10'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - 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 + - _key: reference + _override: true + api_fieldname: reference + description: Name of the branding images (icon or picture). + entity_fieldname: reference + enum: &id008 + - 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 + enum_reference: light_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true 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 + group_id: Branding + method: post + mode: delete + operation_id: clearLightImage + pagination: false + path: /v3/branding-images/light/{reference}/clear request_body: json request_content_type: application/json responses: - - _key: '200' - description: OK. + - _key: '204' + description: Image reverted successfully. + - _key: '401' + description: Authentication failure. 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 + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. 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} + - _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: '403' + description: Forbidden. schema: properties: - _key: code @@ -24982,8 +42122,8 @@ entities: - request_id - type type: object - - _key: '401' - description: The provided access token is not valid. + - _key: '404' + description: Unknown image reference. schema: properties: - _key: code @@ -25033,140 +42173,188 @@ entities: return_info: custom: false self: true - type: device_enrollment - return_type: paginated_response(device_enrollment) - summary: Get a list of enrollments per account. + type: light_theme_image + return_type: light_theme_image + summary: Revert an image to light theme default. x_deprecation: null x_filter: {} - - _key: read - description: 'Check detailed enrollment info, for example, date of claim or expiration - date. + - _key: list + description: 'Retrieve the metadata of all light theme branding images. **Example:** ``` - curl -X GET \ - - -H ''Authorization: Bearer '' \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-images/light \ - https://api.us-east-1.mbedcloud.com/v3/device-enrollments/{id} + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - created_at - - claimed_at - - enrollment_identity - - account_id - - expires_at - - enrolled_device_id + - limit + - after + - order + - total_count + - has_more + - data field_renames: [] fields: - - _key: id - api_fieldname: id - description: Enrollment identity. - entity_fieldname: id - example: 00005a4e027f0a580a01081c00000000 - in: path - parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} - required: true + - _key: reference + _override: true + api_fieldname: reference + entity_fieldname: reference + is_primary_key: true type: string - group_id: Devices + foreign_key: + entity: light_theme_image + group: Branding + foreign_key_priority: self + group_id: Branding method: get - mode: read - operation_id: getDeviceEnrollment - pagination: false - path: /v3/device-enrollments/{id} + mode: list + operation_id: getAllLightImageData + pagination: true + path: /v3/branding-images/light request_body: json request_content_type: application/json responses: - _key: '200' - description: OK. Pending enrollment data. + description: Successful operation. schema: foreign_key: - entity: device_enrollment - group: Devices + entity: light_theme_image + group: Branding + pagination: true 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} + - _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: dark_theme_image + group: Branding + properties: + - _key: object + description: 'Entity name: always ''branding_image''' + enum: + - branding_image + readOnly: true + type: string + - _key: reference + _override: true + description: Name of the 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 + is_primary_key: true + type: string + - _key: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: 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: - - enrollment - example: enrollment + - 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 + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer required: + - data + - has_more + - limit - object - - id - - etag - - account_id - - created_at - - expires_at - - claimed_at - - enrollment_identity - - enrolled_device_id + - total_count type: object - - _key: '400' - description: Bad request. Invalid enrollment identity. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -25213,8 +42401,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Not found. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -25264,287 +42452,186 @@ entities: return_info: custom: false self: true - type: device_enrollment - return_type: device_enrollment - summary: Get details of an single enrollment by ID. + type: light_theme_image + return_type: paginated_response(light_theme_image) + summary: Get metadata of all light theme images. 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: read + description: 'Retrieve metadata for one account light theme branding image. - 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 https://api.us-east-1.mbedcloud.com/v3/branding-images/light/{reference} + \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - - id - - account_id - - created_at - - status - - total_count - - processed_count - - errors_count - - completed_at - - full_report_file - - errors_report_file + - static_uri + - updated_at 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 - external_param: true - in: stream - name: enrollment_identities - parameter_fieldname: enrollment_identities + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + entity_fieldname: reference + enum: *id008 + enum_reference: light_theme_image_reference_enum + in: path + is_primary_key: true + name: reference 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 + type: string + group_id: Branding + method: get + mode: read + operation_id: getLightImageData + pagination: false + path: /v3/branding-images/light/{reference} + request_body: json + request_content_type: application/json responses: - - _key: '201' - description: Bulk upload data received and asynchronous processing started. + - _key: '200' + description: Successful operation. schema: foreign_key: - entity: device_enrollment_bulk_delete - group: Devices + entity: subtenant_light_theme_image + group: Branding properties: - - _key: account_id - api_fieldname: account_id - description: ID - entity_fieldname: account_id - example: 00005a4e027f0a580a01081c00000000 + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_image''' + entity_fieldname: object + enum: + - branding_image + readOnly: true 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 + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + 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 + enum_reference: dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true type: string - - _key: created_at - api_fieldname: created_at - description: The time of receiving the bulk creation task. - entity_fieldname: created_at + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' format: date-time + readOnly: true 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: object + - _key: '401' + description: Authentication failure. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 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 - pattern: ^[A-Za-z0-9]{32} + - _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 - api_fieldname: object - entity_fieldname: object + description: Entity name, always `error`. enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads + - error 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 + - _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 - description: Total number of enrollment identities found in the input CSV. - entity_fieldname: total_count - example: 10 - type: integer 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 type: object - - _key: '400' - description: Bad request. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -25591,8 +42678,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Invalid access token. + - _key: '404' + description: Unknown image reference. schema: properties: - _key: code @@ -25642,270 +42729,197 @@ 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 - - groups - - 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 - - groups - - 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: light_theme_image + return_type: light_theme_image + summary: Get metadata of a light theme image. 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.","" - - ``` - - **Example:** - - ``` - - curl -X GET \ - - -H ''Authorization: Bearer '' \ - - https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-uploads/{id} + - _key: update + 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 + in PNG or JPEG format. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - account_id - - created_at - - status - - total_count - - processed_count - - errors_count - - completed_at - - full_report_file - - errors_report_file + - static_uri + - updated_at field_renames: [] fields: - - _key: id - api_fieldname: id - description: Bulk ID - entity_fieldname: id + - _key: image + api_fieldname: image + description: The image in PNG or JPEG format as multipart form data. + entity_fieldname: image + external_param: true + in: stream + name: image + parameter_fieldname: image + required: true + type: file + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + entity_fieldname: reference + enum: *id008 + enum_reference: light_theme_image_reference_enum in: path - parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} + is_primary_key: true + name: reference required: true type: string - group_id: Devices - method: get - mode: read - operation_id: getBulkDeviceEnrollment + group_id: Branding + method: post + mode: update + operation_id: uploadLightImageMultipart pagination: false - path: /v3/device-enrollments-bulk-uploads/{id} - request_body: json - request_content_type: application/json + path: /v3/branding-images/light/{reference}/upload-multipart + request_body: file + request_content_type: multipart/form-data responses: - - _key: '200' - description: Bulk upload entity found. + - _key: '201' + description: Image uploaded successfully. + headers: + - _key: Content-Location + description: Location of the image metadata. + type: string + - _key: Location + description: Location of the image binary. + type: string schema: foreign_key: - entity: device_enrollment_bulk_delete - group: Devices + entity: subtenant_light_theme_image + group: Branding 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 + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_image''' + entity_fieldname: object + enum: + - branding_image + readOnly: true type: string - - _key: etag - api_fieldname: etag - description: etag - entity_fieldname: etag - example: '1' - pattern: '[A-Za-z0-9]{0,256}' + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + 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 + enum_reference: dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true 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: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true type: string - - _key: id - api_fieldname: id - description: Bulk ID - entity_fieldname: id - pattern: ^[A-Za-z0-9]{32} + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + type: object + - _key: '400' + description: Error in input data format, for example, image is 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 - api_fieldname: object - entity_fieldname: object + description: Entity name, always `error`. enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads + - error 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 + - _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 - description: Total number of enrollment identities found in the input CSV. - entity_fieldname: total_count - example: 10 - type: integer 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 type: object - - _key: '400' - description: Bad request. Invalid bulk identity. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -25952,8 +42966,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Invalid access token. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -26001,7 +43015,7 @@ entities: - type type: object - _key: '404' - description: Not found. + description: Unknown image reference. schema: properties: - _key: code @@ -26051,654 +43065,832 @@ entities: return_info: custom: false self: true - type: device_enrollment_bulk_create - return_type: device_enrollment_bulk_create - summary: Get bulk upload entity. + type: light_theme_image + return_type: light_theme_image + summary: Upload a light theme image. x_deprecation: null x_filter: {} - primary_key_field: id + primary_key_field: reference swagger_models: - - BulkResponse + - BrandingImage + - BrandingImageList tags: - - Public API -- _key: device_enrollment_bulk_delete + - User interface configuration - images +- _key: login_history field_renames: [] fields: - - _key: account_id - api_fieldname: account_id - description: ID - example: 00005a4e027f0a580a01081c00000000 + - _key: date + api_fieldname: date + description: UTC time RFC3339 for this login attempt. + example: '2018-02-14T17:52:07Z' + format: date-time 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 + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + example: 127.0.0.1 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 + - _key: success + api_fieldname: success + description: Flag indicating whether login attempt was successful or not. + example: true + readOnly: true + required: false + type: boolean + - _key: user_agent + api_fieldname: 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 readOnly: true required: false type: string - - _key: errors_count - api_fieldname: errors_count - description: The number of enrollment identities with failed processing. - example: 0 + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - LoginHistory + tags: [] +- _key: login_profile + field_renames: + - _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: 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 + type: string + - _key: id + _override: true + api_fieldname: id + description: ID of the identity provider. + example: 01619571f3c00242ac12000600000000 + readOnly: false + required: false + type: string + - _key: login_profile_type + api_fieldname: type + description: Identity provider type. + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: login_profile_type_enum + example: NATIVE readOnly: true required: false type: string - - _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 + - _key: name + _override: true + api_fieldname: name + description: Name of the identity provider. + example: Pelion + readOnly: false + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: id + swagger_models: + - LoginProfile + tags: [] +- _key: oidc_request + field_renames: [] + fields: + - _key: authorization_endpoint + api_fieldname: authorization_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + readOnly: true + required: false + type: string + x-nullable: true + - _key: auto_enrollment + api_fieldname: auto_enrollment + description: For future use. + readOnly: true + required: false + type: boolean + x-nullable: true + - _key: claim_mapping + api_fieldname: 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 + readOnly: true + required: false + type: object + x-nullable: true + - _key: client_id + api_fieldname: client_id + description: Client ID needed to authenticate and gain access to identity provider's + API. + readOnly: true + required: false + type: string + x-nullable: true + - _key: client_secret + api_fieldname: client_secret + description: Client secret needed to authenticate and gain access to identity + provider's API. + readOnly: true + required: false + type: string + x-nullable: true + - _key: end_session_endpoint + api_fieldname: end_session_endpoint + description: URL of the provider's end session endpoint. + readOnly: true + required: false + type: string + x-nullable: true + - _key: issuer + api_fieldname: issuer + description: Issuer of the identity provider. + readOnly: true + required: false + type: string + - _key: jwks_uri + api_fieldname: jwks_uri + description: URL of the provider's JSON web key set document. + readOnly: true + required: false + type: string + x-nullable: true + - _key: keys + api_fieldname: 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 + readOnly: true + required: false + type: array + x-nullable: true + - _key: redirect_uri + api_fieldname: 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. + readOnly: true + required: false + type: string + x-nullable: true + - _key: revocation_endpoint + api_fieldname: revocation_endpoint + description: URL of the provider's token revocation endpoint. + readOnly: true + required: false + type: string + x-nullable: true + - _key: scopes + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: token_endpoint + api_fieldname: token_endpoint + description: URL of the OAuth 2.0 authorization endpoint. + readOnly: true + required: false + type: string + x-nullable: true + - _key: token_request_mode + api_fieldname: 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 + enum_reference: oidc_request_token_mode_enum + readOnly: true + required: false + type: string + - _key: token_response_path + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: userinfo_endpoint + api_fieldname: userinfo_endpoint + description: URL of the OAuth 2.0 UserInfo endpoint. + readOnly: true + required: false + type: string + x-nullable: true + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - OIDCInfo + tags: [] +- _key: oidc_request_claim_mapping + field_renames: [] + fields: + - _key: email + api_fieldname: email + description: Custom claim name for 'email'. + example: email_address + readOnly: true + required: false + type: string + x-nullable: true + - _key: email_verified + api_fieldname: email_verified + description: Custom claim name for 'email_verified'. + example: email_verified + readOnly: true + required: false + type: string + x-nullable: true + - _key: family_name + api_fieldname: family_name + description: Custom claim name for 'family_name'. + example: family_name + readOnly: true + required: false + type: string + x-nullable: true + - _key: given_name + api_fieldname: given_name + description: Custom claim name for 'given_name'. + example: given_name + readOnly: true + required: false + type: string + x-nullable: true + - _key: name + api_fieldname: name + description: Custom claim name for 'name'. + example: name + readOnly: true + required: false + type: string + x-nullable: true + - _key: phone_number + api_fieldname: phone_number + description: Custom claim name for 'phone_number'. + example: phone_number + readOnly: true + required: false + type: string + x-nullable: true + - _key: sub + api_fieldname: sub + description: Custom claim name for 'sub'. + example: sub + readOnly: true + required: false + type: string + x-nullable: true + - _key: updated_at + api_fieldname: updated_at + description: Custom claim name for 'updated_at'. + example: updated_at + readOnly: true + required: false + type: string + x-nullable: true + - _key: updated_at_pattern + api_fieldname: 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 + readOnly: true + required: false + type: string + x-nullable: true + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - OIDCClaimMapping + tags: [] +- _key: parent_account + field_renames: [] + fields: + - _key: admin_email + api_fieldname: 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}$).+\@.+ + readOnly: true + required: false + 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. + example: J. Doe + maxLength: 100 readOnly: true required: false type: string - _key: id api_fieldname: id - description: Bulk ID - in: path - parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} - readOnly: false - required: true + description: The ID of the parent account. + example: 01619571dad80242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + required: false type: string - - _key: processed_count - api_fieldname: processed_count - description: The number of enrollment identities processed until now. - example: 0 + group_id: Accounts + methods: [] + primary_key_field: id + swagger_models: + - ParentAccountInfo + tags: [] +- _key: password_policy + field_renames: [] + fields: + - _key: minimum_length + api_fieldname: minimum_length + description: Minimum length for the password. + example: '8' + maximum: 512 + minimum: 8 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'. + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - PasswordPolicy + tags: [] +- _key: policy + field_renames: [] + fields: + - _key: action + api_fieldname: action + description: Comma-separated list of actions, empty string represents all actions. + example: GET + readOnly: true + required: false + type: string + - _key: allow + api_fieldname: allow + description: True or false controlling whether an action is allowed or not. + example: true + readOnly: true + required: false + type: boolean + - _key: feature + api_fieldname: feature + description: Feature name corresponding to this policy. + example: update-campaigns + readOnly: true + required: false + type: string + - _key: inherited + api_fieldname: inherited + description: Flag indicating whether this feature is inherited or overwritten + specifically. + example: false + readOnly: true + required: false + type: boolean + - _key: inherited_from + api_fieldname: inherited_from + description: An ID indicating where this policy is inherited from. + example: 016ada3ec2d46665bf66e32e00000000 + pattern: '[a-f0-9]{32}' + readOnly: true + required: false + type: string + - _key: inherited_type + api_fieldname: inherited_type + description: Indicates the type of entity this policy is inherited from. enum: - - new - - processing - - completed - enum_reference: device_enrollment_bulk_delete_status_enum - example: new + - account + - template + - tier_template + enum_reference: policy_inherited_type_enum + example: account + readOnly: true + required: false + type: string + - _key: resource + api_fieldname: resource + description: Resource that is protected by this policy. + example: /v3/update-campaign + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - FeaturePolicy + tags: [] +- _key: policy_group + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: true + required: false + type: string + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + example: 0 + format: int32 + 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. + example: '2018-02-13T09:35:20Z' + format: date-time + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: name + api_fieldname: name + description: The name of the group. + example: Administrators + maxLength: 100 + readOnly: false + required: true + 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 - - _key: total_count - api_fieldname: total_count - description: Total number of enrollment identities found in the input CSV. - example: 10 + - _key: user_count + api_fieldname: user_count + description: The number of users in this group. + example: 1 + format: int32 readOnly: true required: false type: integer - group_id: Devices + group_id: Accounts 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\ - \ 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: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```" - drop_fields: - - object - - etag - - type - - groups - - filter - - id - - account_id - - created_at - - status - - total_count - - processed_count - - errors_count - - completed_at - - full_report_file - - errors_report_file - field_renames: [] - fields: - - _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: stream - name: enrollment_identities - parameter_fieldname: enrollment_identities - required: true - type: file - group_id: Devices - 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: '201' - description: Bulk delete data received and asynchronous processing started. - schema: - foreign_key: - entity: device_enrollment_bulk_create - 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: path - parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} - required: true - 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 - 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 - type: object - - _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: Invalid access token. - 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_bulk_delete - return_type: device_enrollment_bulk_delete - summary: Bulk delete. - 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 - - groups - - 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 - - groups - - 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: '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.","" + - _key: api_keys + description: 'Retrieve an array of API keys associated with a policy group. - ``` **Example:** ``` - curl -X GET \ - - -H ''Authorization: Bearer '' \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id}/api-keys + \ - https://api.us-east-1.mbedcloud.com/v3/device-enrollments-bulk-deletes/{id} + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - account_id - - created_at - - status - total_count - - processed_count - - errors_count - - completed_at - - full_report_file - - errors_report_file + - has_more + - data field_renames: [] fields: + - _key: after + api_fieldname: after + 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: id - api_fieldname: id - description: Bulk ID + api_fieldname: group_id + description: The ID of the group. entity_fieldname: id + external_param: false in: path - parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} + name: group_id + parameter_fieldname: group_id required: true type: string - group_id: Devices + - _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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: api_key + group_id: Accounts method: get - mode: read - operation_id: getBulkDeviceEnrollmentDelete - pagination: false - path: /v3/device-enrollments-bulk-deletes/{id} + mode: api_keys + operation_id: getApiKeysOfGroup + pagination: true + parameter_map: + group_id: id + path: /v3/policy-groups/{group_id}/api-keys request_body: json request_content_type: application/json responses: - _key: '200' - description: Bulk delete entity found. - schema: - foreign_key: - entity: device_enrollment_bulk_create - 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 + description: Successful operation. + schema: + foreign_key: + entity: api_key + group: Accounts + pagination: true + properties: + - _key: after + api_fieldname: after + 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: errors_count - api_fieldname: errors_count - description: The number of enrollment identities with failed processing. - entity_fieldname: errors_count - example: 0 + - _key: data + api_fieldname: data + description: A list of entities. + entity_fieldname: data + items: + description: Represents an API key in Device Management. + foreign_key: + entity: api_key + group: Accounts + properties: + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: creation_time + description: The timestamp of the API key creation in the storage, in + milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: groups + description: A list of group IDs this API key belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + description: The API key. + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: name + description: The display name for the API key. + example: API key gorgon + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always ''api-key''' + enum: + - api-key + type: string + - _key: owner + description: The owner of this API key, who is the creator by default. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + description: The status of the API key. + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + type: string + - _key: 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 + 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 + 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: 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: path - parameter_fieldname: id - pattern: ^[A-Za-z0-9]{32} - required: true - type: string - _key: object api_fieldname: object + description: 'Entity name: always `list`.' entity_fieldname: object enum: - - enrollment-identity-bulk-uploads - example: enrollment-identity-bulk-uploads + - 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 + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order enum: - - new - - processing - - completed - example: new + - 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 - description: Total number of enrollment identities found in the input CSV. + description: The total number of records, if requested. entity_fieldname: total_count - example: 10 + example: 20 + format: int32 type: integer required: + - data + - has_more + - limit - object - - 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. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -26745,8 +43937,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Invalid access token. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -26794,7 +43986,7 @@ entities: - type type: object - _key: '404' - description: Not found. + description: A group with that ID does not exist. schema: properties: - _key: code @@ -26843,244 +44035,289 @@ entities: type: object return_info: custom: false - self: true - type: device_enrollment_bulk_delete - return_type: device_enrollment_bulk_delete - summary: Get bulk delete entity. - x_deprecation: null + self: false + type: api_key + return_type: paginated_response(api_key) + 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: {} - primary_key_field: id - swagger_models: - - BulkResponse - tags: - - Public API -- _key: device_enrollment_denial - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: account id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' - 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' - format: date-time - readOnly: true - required: false - type: string - - _key: endpoint_name - api_fieldname: endpoint_name - description: endpoint name - example: Endpoint_1234 - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: id of the recorded failed bootstrap attempt - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' - 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}' - readOnly: true - required: false - type: string - 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). + - _key: create + description: 'Create a new group. - Returned list can be filtered by endpoint name. Trusted certificate ID filter - is required. + Note: This endpoint is restricted to administrators. - **Example usage:** + **Example:** ``` - curl -X GET -H ''Authorization: Bearer '' \ + curl -X POST https://api.us-east-1.mbedcloud.com/v3/policy-groups \ - https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials?trusted_certificate_id__eq={cert-id}&endpoint_name__eq={endpoint_name} + -H ''Authorization: Bearer '' \ - ``` + -H ''content-type: application/json'' -d ''{"name": "MyGroup1"}'' - ' + ```' drop_fields: - object - etag - type - - groups - filter - - has_more - - total_count - - data - - trusted_certificate_id__eq - - endpoint_name__eq + - id + - created_at + - updated_at + - account_id + - user_count + - application_count + - apikey_count 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 + - _key: members + api_fieldname: members + description: Represents arrays of user and API key IDs. + entity_fieldname: members 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 - external_param: true - in: query - name: order - parameter_fieldname: order + in: body + name: members + parameter_fieldname: members + properties: + - _key: apikeys + description: An array of API key IDs. + 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: + type: string + type: array required: false + schema_param: true + type: object + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + in: body + maxLength: 100 + parameter_fieldname: name + required: true type: string - foreign_key: - entity: device_enrollment_denial - group: Devices - foreign_key_priority: self - group_id: Devices - method: get - mode: list - operation_id: listEnrollmentDenialAttempts - pagination: true - path: /v3/device-enrollment-denials + group_id: Accounts + method: post + mode: create + operation_id: createGroup + pagination: false + parameter_map: + group_id: id + path: /v3/policy-groups request_body: json request_content_type: application/json responses: - - _key: '200' - description: Query Success. Responding with List of Devices. + - _key: '201' + description: New entity created. schema: + description: This object contains basic information about groups. foreign_key: - entity: device_enrollment_denial - group: Devices - pagination: true + entity: subtenant_policy_group + group: Accounts properties: - - _key: after - api_fieldname: after - description: An offset token for current page. - entity_fieldname: after + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - - _key: data - api_fieldname: data - entity_fieldname: data + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + entity_fieldname: apikey_count + 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. + entity_fieldname: created_at + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + maxLength: 100 + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always `group`.' + entity_fieldname: object + enum: + - group + 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: user_count + api_fieldname: user_count + description: The number of users in this group. + entity_fieldname: user_count + example: 1 + format: int32 + type: integer + required: + - account_id + - apikey_count + - etag + - id + - name + - object + - user_count + type: object + - _key: '400' + description: Error in input data, for example, invalid group name. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. 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 + - _key: message + description: Message describing the error condition. type: string - - _key: id - description: id of the recorded failed bootstrap attempt - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' + - _key: name + description: Name of the field which caused the error. type: string - - _key: object - enum: - - denied_device + 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: trusted_certificate_id - description: Trusted certificate id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' + - _key: name + description: Name of the field which caused the error. type: string required: - - id - - account_id - - endpoint_name - - trusted_certificate_id - - created_at - - object + - name + - message + type: 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 - type: integer - - _key: object - api_fieldname: object - description: The type of this API object is a "list". - entity_fieldname: object - example: list + - _key: message + description: A human readable informative explanation + example: Validation error type: string - - _key: order - api_fieldname: order - description: The creation time based order of the entries. - entity_fieldname: order + - _key: object + description: Entity name, always `error`. enum: - - ASC - - DESC - example: DESC + - 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 - - _key: total_count - api_fieldname: total_count - entity_fieldname: total_count - example: 1 - format: integer - type: integer required: + - code + - message - object - - data + - request_id + - type type: object - - _key: '401' - description: JWT validation failed. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -27127,8 +44364,8 @@ entities: - request_id - type type: object - - _key: '404' - description: ID set in pagination parameter `after` not found. + - _key: '409' + description: A group with that name already exists. schema: properties: - _key: code @@ -27178,120 +44415,107 @@ 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: policy_group + return_type: policy_group + summary: Create a new group. x_deprecation: null - x_filter: - endpoint_name: - - eq - trusted_certificate_id: - - eq - - _key: read - description: 'Query for a single attempt to bootstrap with a blacklisted certificate - by ID. + x_filter: {} + - _key: delete + description: 'Delete a group. + Note: This endpoint is restricted to administrators. - **Example usage:** - ``` + **Example:** - curl -X GET -H ''Authorization: Bearer '' \ + ``` - https://api.us-east-1.mbedcloud.com/v3/device-enrollment-denials/{device_enrollment_denial_id} + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + \ - ``` + -H ''Authorization: Bearer '' - ' + ```' drop_fields: - object - etag - type - - groups - filter - - id - - account_id - - endpoint_name - - trusted_certificate_id - - created_at 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: group_id + description: The ID of the group to delete. + entity_fieldname: id + external_param: false in: path - name: device_enrollment_denial_id - parameter_fieldname: device_enrollment_denial_id + name: group_id + parameter_fieldname: group_id required: true type: string - group_id: Devices - method: get - mode: read - operation_id: getEnrollmentDenialAttempt + group_id: Accounts + method: delete + mode: delete + operation_id: deleteGroup pagination: false - path: /v3/device-enrollment-denials/{device_enrollment_denial_id} + parameter_map: + group_id: id + path: /v3/policy-groups/{group_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Query Success. Responding with blacklisted device. + - _key: '204' + description: Deleted successfully. + - _key: '401' + description: Authentication failure. schema: - foreign_key: - entity: device_enrollment_denial - group: Devices properties: - - _key: account_id - api_fieldname: account_id - description: account id - entity_fieldname: account_id - example: 00005a4e027f0a580a01081c00000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: created_at - api_fieldname: created_at - description: date on which the failed bootstrap was attempted on - 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 - type: string - - _key: id - api_fieldname: id - description: id of the recorded failed bootstrap attempt - entity_fieldname: id - example: 00005a4e027f0a580a04567c00000000 - pattern: '[a-f0-9]{32}' + - _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 - api_fieldname: object - entity_fieldname: object + description: Entity name, always `error`. enum: - - denied_device + - error 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: 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: - - id - - account_id - - endpoint_name - - trusted_certificate_id - - created_at + - code + - message - object - - _key: '401' - description: JWT validation failed. + - request_id + - type + type: object + - _key: '403' + description: Forbidden, or Administrators group cannot be removed. schema: properties: - _key: code @@ -27339,7 +44563,7 @@ entities: - type type: object - _key: '404' - description: ID not found. + description: A group with that ID does not exist. schema: properties: - _key: code @@ -27389,154 +44613,51 @@ 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: policy_group + return_type: policy_group + summary: Delete a group. x_deprecation: null x_filter: {} - primary_key_field: id - swagger_models: - - BlackListedDeviceData - - DenialAttemptsResponse - tags: - - EnrollmentDenials -- _key: device_events - field_renames: [] - fields: - - _key: changes - additionalProperties: - type: object - api_fieldname: changes - example: [] - readOnly: true - required: false - 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: [] - - _key: created_at - api_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: data - additionalProperties: - type: string - api_fieldname: data - description: Additional data relevant to the event. - example: - campaign_id: '00000000000000000000000000000000' - readOnly: true - required: false - type: object - - _key: date_time - api_fieldname: date_time - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: description - api_fieldname: description - example: Device record created - readOnly: true - required: false - type: string - - _key: device_id - api_fieldname: device_id - example: '00000000000000000000000000000000' - readOnly: true - required: false - type: string - - _key: event_type - api_fieldname: event_type - description: Event code - example: UPD2_100 - maxLength: 100 - readOnly: true - required: false - type: string - - _key: event_type_category - api_fieldname: event_type_category - description: Category code which groups the event type by a summary category. - example: FAIL_MANIFEST_REJECTED - readOnly: true - required: false - type: string - - _key: event_type_description - api_fieldname: event_type_description - description: Generic description of the event - example: FAIL - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - example: '00000000000000000000000000000000' - readOnly: false - required: true - type: string - - _key: state_change - api_fieldname: state_change - readOnly: true - required: false - type: boolean - group_id: Devices - methods: - _key: list - description: List all device events for an account. + description: 'Retrieve an array of policy groups. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - - data - - has_more - total_count - - date_time__in - - date_time__nin - - date_time__lte - - date_time__gte - - description__eq - - description__neq - - description__in - - description__nin - - id__eq - - id__neq - - id__in - - id__nin - - device_id__eq - - device_id__neq - - device_id__in - - device_id__nin - - event_type__eq - - event_type__neq - - event_type__in - - event_type__nin - - state_change__eq - - state_change__neq + - has_more + - data + - name__eq field_renames: [] fields: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: null + example: 01619571f3c00242ac12000600000000 external_param: true in: query name: after parameter_fieldname: after + pattern: '[a-f0-9]{32}' required: false type: string - _key: include api_fieldname: include - description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`' + description: 'Comma-separated additional data to return. Currently supported: + total_count.' entity_fieldname: include external_param: true in: query @@ -27546,25 +44667,27 @@ 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. + default: 50 + description: The number of results to return (2-1000). Default 50. entity_fieldname: limit - example: 1000 + example: 50 external_param: true + format: int32 in: query - maximum: 1000 - minimum: 2 name: limit parameter_fieldname: limit required: false type: integer - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order - example: DESC + enum: + - ASC + - DESC + enum_reference: policy_group_order_enum external_param: true in: query name: order @@ -27572,432 +44695,418 @@ entities: required: false type: string foreign_key: - entity: device_events - group: Devices + entity: policy_group + group: Accounts foreign_key_priority: self - group_id: Devices + group_id: Accounts method: get mode: list - operation_id: Device_Event_list + operation_id: getAllGroups pagination: true - path: /v3/device-events/ + parameter_map: + group_id: id + path: /v3/policy-groups request_body: json request_content_type: application/json responses: - _key: '200' - description: Request successful. + description: Successful operation. schema: foreign_key: - entity: device_events - group: Devices + entity: policy_group + group: Accounts pagination: true properties: - _key: after api_fieldname: after + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: null + 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 + description: A list of entities. entity_fieldname: data - example: '[]' items: + description: This object contains basic information about groups. foreign_key: - entity: device_events - group: Devices + entity: subtenant_policy_group + group: Accounts properties: - - _key: changes - additionalProperties: - type: object - example: [] - type: object + - _key: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: apikey_count + description: The number of API keys in this group. + example: 0 + format: int32 + type: integer 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' + 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 - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: data - additionalProperties: - type: string - description: Additional data relevant to the event. - example: - campaign_id: '00000000000000000000000000000000' - type: object - - _key: date_time - example: '2017-05-22T12:37:55.576563Z' + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: description - example: Device record created - type: string - - _key: device_id - example: '00000000000000000000000000000000' - type: string - _key: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: event_type - description: Event code - example: UPD2_100 - maxLength: 100 - type: string - - _key: event_type_category - description: Category code which groups the event type by a summary - category. - example: FAIL_MANIFEST_REJECTED - type: string - - _key: event_type_description - description: Generic description of the event - example: FAIL + description: API resource entity version. + example: '1' type: string - _key: id - example: '00000000000000000000000000000000' + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: name + description: The name of the group. + example: Administrators + maxLength: 100 type: string - _key: object - description: The API resource entity. - example: device-event + description: 'Entity name: always `group`.' + enum: + - group type: string - - _key: state_change - type: boolean + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: user_count + description: The number of users in this group. + example: 1 + format: int32 + type: integer required: - - date_time + - account_id + - apikey_count + - etag - id + - name + - object + - user_count + 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 + default: 50 + description: The number of results to return (2-1000). Default 50. entity_fieldname: limit - example: 1000 + example: 50 + external_param: true + format: int32 + in: query + name: limit + parameter_fieldname: limit + required: false type: integer - _key: object api_fieldname: object + description: 'Entity name: always `list`.' entity_fieldname: object - example: list + enum: + - list type: string - _key: order api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order - example: DESC + enum: + - ASC + - DESC + enum_reference: subtenant_api_key_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string - _key: total_count api_fieldname: total_count + description: The total number of records, if requested. entity_fieldname: total_count - example: 1 + example: 20 + format: int32 type: integer - - _key: '400' - description: Bad Request. + required: + - data + - has_more + - limit + - object + - total_count + type: object - _key: '401' - description: Not authenticated. - - _key: '404' - description: Unable to find page. + 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: device_events - return_type: paginated_response(device_events) - summary: List all device events. + type: policy_group + return_type: paginated_response(policy_group) + summary: Get policy groups. x_deprecation: null x_filter: - date_time: - - in - - nin - - lte - - gte - description: - - eq - - neq - - in - - nin - device_id: - - eq - - neq - - in - - nin - event_type: - - eq - - neq - - in - - nin - id: - - eq - - neq - - in - - nin - state_change: + name: - eq - - neq - _key: read - description: Retrieve a specific device event. + description: 'Retrieve a policy group. + + + **Example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/policy-groups/{group_id} + \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - created_at - - changes - - data - - date_time - - description - - device_id - - event_type - - event_type_category - - event_type_description - - state_change + - updated_at + - account_id + - name + - user_count + - application_count + - apikey_count field_renames: [] fields: - _key: id api_fieldname: id + description: The ID of the group. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 01619571dec00242ac12000600000000 in: path - parameter_fieldname: device_event_id + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' required: true type: string - group_id: Devices + group_id: Accounts method: get mode: read - operation_id: Device_Event_retrieve + operation_id: getGroupSummary pagination: false parameter_map: - device_event_id: id - path: /v3/device-events/{device_event_id}/ + group_id: id + path: /v3/policy-groups/{group_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Retrieved result successfully. + description: Successful operation. schema: + description: This object contains basic information about groups. foreign_key: - entity: device_events - group: Devices + entity: subtenant_policy_group + group: Accounts properties: - - _key: changes - additionalProperties: - type: object - api_fieldname: changes - entity_fieldname: changes - example: [] - type: object + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + entity_fieldname: apikey_count + example: 0 + format: int32 + type: integer 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' + 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. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: data - additionalProperties: - type: string - api_fieldname: data - description: Additional data relevant to the event. - entity_fieldname: data - example: - campaign_id: '00000000000000000000000000000000' - type: object - - _key: date_time - api_fieldname: date_time - entity_fieldname: date_time - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: description - api_fieldname: description - entity_fieldname: description - example: Device record created - type: string - - _key: device_id - api_fieldname: device_id - entity_fieldname: device_id - example: '00000000000000000000000000000000' - type: string - _key: etag api_fieldname: etag + description: API resource entity version. entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: event_type - api_fieldname: event_type - description: Event code - entity_fieldname: event_type - example: UPD2_100 - maxLength: 100 - type: string - - _key: event_type_category - api_fieldname: event_type_category - description: Category code which groups the event type by a summary category. - entity_fieldname: event_type_category - example: FAIL_MANIFEST_REJECTED - type: string - - _key: event_type_description - api_fieldname: event_type_description - description: Generic description of the event - entity_fieldname: event_type_description - example: FAIL + example: '1' type: string - _key: id api_fieldname: id + description: The ID of the group. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + maxLength: 100 type: string - _key: object api_fieldname: object - description: The API resource entity. + description: 'Entity name: always `group`.' entity_fieldname: object - example: device-event + enum: + - group type: string - - _key: state_change - api_fieldname: state_change - entity_fieldname: state_change - type: boolean + - _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: user_count + api_fieldname: user_count + description: The number of users in this group. + entity_fieldname: user_count + example: 1 + format: int32 + type: integer required: - - date_time + - account_id + - apikey_count + - etag - id - - _key: '400' - description: Bad Request. + - name + - object + - user_count + type: object - _key: '401' - description: Not authenticated. - - _key: '404' - description: Unable to find device. - return_info: - custom: false - self: true - type: device_events - return_type: device_events - summary: Retrieve a device event. - x_deprecation: null - x_filter: {} - primary_key_field: id - swagger_models: - - DeviceEventData - - DeviceEventPage - tags: [] -- _key: device_group - field_renames: [] - fields: - - _key: created_at - api_fieldname: created_at - description: The time the campaign was created. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_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: false - required: false - type: object - - _key: description - api_fieldname: description - description: The description of the group. - example: Devices on the factory floor. - maxLength: 2000 - readOnly: false - required: false - type: string - - _key: devices_count - api_fieldname: devices_count - description: The number of devices in this group. - example: 10 - readOnly: true - required: false - type: integer - - _key: id - api_fieldname: id - description: The group ID. - example: 015c3029f6f7000000000001001000c3 - readOnly: false - required: true - type: string - - _key: name - api_fieldname: name - description: Name of the group. - example: My devices - maxLength: 128 - readOnly: false - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Devices - methods: - - _key: add_device - description: Add one device to a group. - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: [] - fields: - - _key: device_id - api_fieldname: device_id - entity_fieldname: device_id - example: '00000000000000000000000000000000' - external_param: true - in: body - name: device_id - parameter_fieldname: device_id - required: false - schema_param: true - type: string - - _key: id - api_fieldname: device-group-id - description: The ID of the group. - entity_fieldname: id - external_param: false - in: path - name: device-group-id - parameter_fieldname: device-group-id - required: true - type: string - group_id: Devices - method: post - mode: add_device - operation_id: Group_members_add - pagination: false - parameter_map: - device-group-id: id - path: /v3/device-groups/{device-group-id}/devices/add/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Success - device added. - - _key: '400' - description: Bad Request. + description: Authentication failure. schema: properties: - _key: code @@ -28044,8 +45153,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Unauthorized. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -28093,7 +45202,7 @@ entities: - type type: object - _key: '404' - description: Not found. + description: A group with that ID does not exist. schema: properties: - _key: code @@ -28141,207 +45250,170 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Add a device to a group + custom: false + self: true + type: policy_group + return_type: policy_group + summary: Get a policy group. x_deprecation: null x_filter: {} - - _key: create - description: Create a group. + - _key: update + description: 'Update a group name. + + Note: 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 '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "TestGroup2"}'' + + ```' drop_fields: - object - etag - type - - groups - filter - - id - - devices_count - created_at - updated_at + - account_id + - user_count + - application_count + - apikey_count field_renames: [] fields: - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_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: custom_attributes - example: - key: value - in: body - maxProperties: 10 - name: custom_attributes - parameter_fieldname: custom_attributes - required: false - schema_param: true - type: object - - _key: description - api_fieldname: description - description: The description of the group. - entity_fieldname: description - example: Devices on the factory floor. - in: body - maxLength: 2000 - name: description - parameter_fieldname: description - required: false - schema_param: true + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 + in: path + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' + required: true type: string - _key: name api_fieldname: name - description: Name of the group. + description: The name of the group. entity_fieldname: name - example: My devices + example: Administrators in: body - maxLength: 128 - name: name + maxLength: 100 parameter_fieldname: name - required: false - schema_param: true + required: true type: string - group_id: Devices - method: post - mode: create - operation_id: Group_create + group_id: Accounts + method: put + mode: update + operation_id: updateGroupName pagination: false parameter_map: - device-group-id: id - path: /v3/device-groups/ + group_id: id + path: /v3/policy-groups/{group_id} request_body: json request_content_type: application/json responses: - - _key: '201' - description: Created. + - _key: '200' + description: Successful operation. schema: + description: This object contains basic information about groups. foreign_key: - entity: device_group - group: Devices + entity: subtenant_policy_group + group: Accounts properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + entity_fieldname: apikey_count + 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: The time the campaign was created. + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_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: custom_attributes - example: - key: value - maxProperties: 10 - type: object - - _key: description - api_fieldname: description - description: The description of the group. - entity_fieldname: description - example: Devices on the factory floor. - maxLength: 2000 - type: string - - _key: devices_count - api_fieldname: devices_count - description: The number of devices in this group. - entity_fieldname: devices_count - example: 10 - type: integer - _key: etag api_fieldname: etag + description: API resource entity version. entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time + example: '1' type: string - _key: id api_fieldname: id - description: The group ID. + description: The ID of the group. entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - _key: name api_fieldname: name - description: Name of the group. + description: The name of the group. entity_fieldname: name - example: My devices - maxLength: 128 + example: Administrators + maxLength: 100 type: string - _key: object api_fieldname: object - description: 'Entity name: always ''device-group''.' + description: 'Entity name: always `group`.' entity_fieldname: object - example: device-group + enum: + - group type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated. + description: Last update UTC time RFC3339. entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-14T15:24:14Z' format: date-time type: string - type: object - - _key: '400' - description: Bad Request. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 + - _key: user_count + api_fieldname: user_count + description: The number of users in this group. + entity_fieldname: user_count + example: 1 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 + - account_id + - apikey_count + - etag + - id + - name - object - - request_id - - type + - user_count type: object - - _key: '401' - description: Unauthorized. + - _key: '400' + description: Error in input data, for example, the group name is too long. schema: properties: - _key: code @@ -28387,9 +45459,9 @@ entities: - object - request_id - type - type: object - - _key: '409' - description: Conflict - Group name already exists. + type: object + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -28436,49 +45508,8 @@ entities: - request_id - type type: object - return_info: - custom: false - self: true - type: device_group - return_type: device_group - summary: Create a group - x_deprecation: null - x_filter: {} - - _key: delete - description: Delete a group. - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: [] - fields: - - _key: id - api_fieldname: device-group-id - description: The ID of the group - entity_fieldname: id - external_param: false - in: path - name: device-group-id - parameter_fieldname: device-group-id - required: true - type: string - group_id: Devices - method: delete - mode: delete - operation_id: Group_delete - pagination: false - parameter_map: - device-group-id: id - path: /v3/device-groups/{device-group-id}/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Success - group deleted. - - _key: '401' - description: Unauthorized. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -28526,7 +45557,7 @@ entities: - type type: object - _key: '404' - description: Not Found. + description: A group with that ID does not exist. schema: properties: - _key: code @@ -28576,158 +45607,66 @@ entities: return_info: custom: false self: true - type: device_group - return_type: device_group - summary: Delete a group + type: policy_group + return_type: policy_group + summary: Update the group name. x_deprecation: null x_filter: {} - - _key: devices - description: Get a page of devices. + - _key: users + 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/policy-groups/{group_id}/users + \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - - data - - has_more - total_count - - 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 + - has_more + - data + - status__eq + - status__in + - status__nin field_renames: [] fields: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: '01631667477600000000000100100374' + example: 01619571f3c00242ac12000600000000 external_param: true in: query name: after parameter_fieldname: after + pattern: '[a-f0-9]{32}' required: false type: string - _key: id - api_fieldname: device-group-id + api_fieldname: group_id + description: The ID of the group. entity_fieldname: id external_param: false in: path - name: device-group-id - parameter_fieldname: device-group-id + name: group_id + parameter_fieldname: group_id required: true type: string - _key: include api_fieldname: include - description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`.' + description: 'Comma-separated additional data to return. Currently supported: + total_count.' entity_fieldname: include external_param: true in: query @@ -28737,25 +45676,27 @@ 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. + 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 - maximum: 1000 - minimum: 2 name: limit parameter_fieldname: limit required: false type: integer - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order - example: DESC + enum: + - ASC + - DESC + enum_reference: policy_group_order_enum external_param: true in: query name: order @@ -28763,262 +45704,382 @@ entities: required: false type: string foreign_key: - entity: device - group: Devices - group_id: Devices + entity: user + group_id: Accounts method: get - mode: devices - operation_id: Group_members_retrieve + mode: users + operation_id: getUsersOfGroup pagination: true parameter_map: - device-group-id: id - path: /v3/device-groups/{device-group-id}/devices/ + group_id: id + path: /v3/policy-groups/{group_id}/users request_body: json request_content_type: application/json responses: - _key: '200' - description: Ok. + description: Successful operation. schema: foreign_key: - entity: device - group: Devices + entity: user + group: Accounts pagination: true properties: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: '01631667477600000000000100100374' + 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 + description: A list of entities. entity_fieldname: data items: - - _key: foreign_key - entity: device - group: Devices - - _key: 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. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - ca_id: - description: The certificate issuer's ID. - example: '00000000000000000000000000000000' - maxLength: 500 + description: Represents a user in Device Management. + foreign_key: + entity: user + group: Accounts + properties: + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - connector_expiration_date: - description: The expiration date of the certificate used to connect - to LwM2M server. - format: date + - _key: active_sessions + description: List of active user sessions. + items: + description: Represents an active user session. + foreign_key: + entity: active_session + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The UUID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: login_time + api_fieldname: login_time + description: The login time of the user. + entity_fieldname: login_time + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''user-session''' + entity_fieldname: object + enum: + - user-session + type: string + - _key: reference_token + api_fieldname: reference_token + description: The reference token. + entity_fieldname: reference_token + example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk + type: string + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + type: array + - _key: address + description: Address. + example: 110 Fulbourn Rd, Cambridge, United Kingdom 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' + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' format: date-time type: string - custom_attributes: + - _key: creation_time + description: A timestamp of the user creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: custom_fields 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 + description: User's account-specific custom properties. The value is + a string. type: object - deployed_state: - description: 'DEPRECATED: The state of the device''s deployment.' - enum: - - development - - production + x-nullable: true + - _key: email + description: The email address. + example: user@arm.com + pattern: ^(?=.{3,254}$).+\@.+ type: string - deployment: - description: 'DEPRECATED: The last deployment used on the device.' - example: '' + - _key: email_verified + description: A flag indicating whether the user's email address has + been verified or not. + example: true + type: boolean + - _key: etag + description: API resource entity version. + example: '1' type: string - description: - description: The description of the device. - example: description - maxLength: 2000 + - _key: full_name + description: The full name of the user. + example: User Doe + maxLength: 100 type: string - device_class: - description: An ID representing the model and hardware revision of the - device. - example: '' - maxLength: 32 + x-nullable: true + - _key: groups + description: A list of IDs of the groups this user belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the user. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - device_execution_mode: - 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)\n - 1 - development devices\n - 5 - production devices" - enum: - - 0 - - 1 - - 5 - example: 0 + - _key: is_gtc_accepted + description: A flag indicating that the user has accepted General Terms + and Conditions. + example: true + type: boolean + - _key: is_marketing_accepted + description: A flag indicating that the user has consented to receive + marketing information. + example: true + type: boolean + - _key: is_totp_enabled + description: A flag indicating whether two-factor authentication (TOTP) + has been enabled. + example: true + type: boolean + - _key: last_login_time + description: A timestamp of the latest login of the user, in milliseconds. + example: 1518630727688 + format: int64 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. - 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. + - _key: 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: - example: '00000000000000000000000000000000' - type: string + description: Represents an entry in login history. + foreign_key: + entity: login_history + group: Accounts + properties: + - _key: date + api_fieldname: date + description: UTC time RFC3339 for this login attempt. + entity_fieldname: date + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: success + api_fieldname: success + description: Flag indicating whether login attempt was successful + or not. + entity_fieldname: success + example: true + type: boolean + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + maxItems: 5 + type: array + - _key: login_profiles + description: A list of login profiles for the user. Specified as the + identity providers the user is associated with. + items: + description: Represents a user login profile in Device Management. + foreign_key: + 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 + _override: true + 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: + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE + readOnly: true + type: string + required: + - id + type: object type: array - host_gateway: - description: The ID of the host gateway, if appropriate. - example: '' - type: string - id: - description: The ID of the device. The device ID is used across all - Device Management APIs. - example: '00000000000000000000000000000000' - type: string - issuer_fingerprint: - 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 x-nullable: true - manifest: - description: 'DEPRECATED: The URL for the current device manifest.' - example: '' - 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. + - _key: object + description: 'Entity name: always `user`.' 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 + - user type: string - object: - description: The API resource entity. - example: device + - _key: password + description: The password when creating a new user. It will be generated + when not present in the request. + example: PZf9eEUH43DAPE9ULINFeuj type: string - serial_number: - description: The serial number of the device. - example: 00000000-0000-0000-0000-000000000000 + x-nullable: true + - _key: password_changed_time + description: A timestamp of the latest change of the user password, + in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: phone_number + description: Phone number. + example: +44 (1223) 400 400 + maxLength: 100 type: string - state: - description: The current state of the device. + x-nullable: true + - _key: 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: - - unenrolled - - cloud_enrolling - - bootstrapped - - registered - - deregistered + - ENROLLING + - INVITED + - ACTIVE + - RESET + - INACTIVE + example: ACTIVE type: string - updated_at: - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' + - _key: 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 + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' format: date-time type: string - vendor_id: - description: The device vendor ID. - example: 00000000-0000-0000-0000-000000000000 + - _key: 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 type: array - _key: has_more api_fieldname: has_more - description: Are there more results available. + description: Flag indicating whether there are more results. 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. + 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 - maximum: 1000 - minimum: 2 name: limit parameter_fieldname: limit required: false type: integer - _key: object api_fieldname: object - description: The type of this API object is a "list". + description: 'Entity name: always `list`.' entity_fieldname: object - example: list + enum: + - list type: string - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order - example: DESC + enum: + - ASC + - DESC + enum_reference: account_order_enum external_param: true in: query name: order @@ -29027,12 +46088,20 @@ entities: type: string - _key: total_count api_fieldname: total_count + description: The total number of records, if requested. entity_fieldname: total_count - example: 1 - format: integer + example: 20 + format: int32 type: integer - - _key: '400' - description: Bad Request. + required: + - data + - has_more + - limit + - object + - total_count + type: object + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -29079,8 +46148,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Unauthorized. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -29128,7 +46197,7 @@ entities: - type type: object - _key: '404' - description: Not found. + description: A group with that ID does not exist. schema: properties: - _key: code @@ -29178,211 +46247,273 @@ entities: return_info: custom: false self: false - type: device - return_type: paginated_response(device) - summary: Get a page of devices + type: user + return_type: paginated_response(user) + summary: Get users of a policy group. x_deprecation: null x_filter: - 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: + status: - eq - - neq - in - nin + primary_key_field: id + swagger_models: + - ApiKeyInfoRespList + - GroupCreationInfo + - GroupSummary + - GroupSummaryList + - GroupUpdateInfo + - UserInfoRespList + tags: + - Account - policy groups +- _key: pre_shared_key + field_renames: [] + fields: + - _key: created_at + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: endpoint_name + _override: true + api_fieldname: 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 + getter_custom_method: pre_shared_key_id_getter + pattern: ^[ -~]{16,64}$ + readOnly: false + required: false + setter_custom_method: pre_shared_key_id_setter + type: string + - _key: id + _override: true + api_fieldname: id + description: The Id of the pre_shared_key, shadows the endpoint_name + getter_custom_method: pre_shared_key_id_getter + readOnly: false + required: false + setter_custom_method: pre_shared_key_id_setter + type: string + group_id: Security + methods: + - _key: create + 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```" + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: endpoint_name + _override: true + api_fieldname: endpoint_name + entity_fieldname: endpoint_name + getter_custom_method: pre_shared_key_id_getter + readOnly: false + setter_custom_method: pre_shared_key_id_setter + type: string + - _key: id + _override: true + api_fieldname: id + description: The Id of the pre_shared_key, shadows the endpoint_name + entity_fieldname: id + example: my-endpoint-0001 + getter_custom_method: pre_shared_key_id_getter + in: body + name: endpoint_name + pattern: ^[ -~]{16,64}$ + schema_param: true + setter_custom_method: pre_shared_key_id_setter + type: string + - _key: secret_hex + api_fieldname: 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. + entity_fieldname: secret_hex + example: 4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a + external_param: true + in: body + name: secret_hex + parameter_fieldname: secret_hex + pattern: ^(0[xX])?[0-9a-fA-F]{32,64}$ + required: true + schema_param: true + type: string + group_id: Security + method: post + mode: create + operation_id: uploadPreSharedKey + pagination: false + parameter_map: + endpoint_name: id + path: /v2/device-shared-keys + request_body: json + request_content_type: application/json + responses: + - _key: '201' + description: Successfully created. + - _key: '400' + description: Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, + INVALID_SECRET_HEX, and MALFORMED_JSON_CONTENT. + schema: + type: string + - _key: '401' + description: Authentication failure. + - _key: '403' + description: Forbidden. You need to read and accept the PSK license in Device + Management Portal. + - _key: '409' + description: Conflict. The PSK for the endpoint already exists and cannot be + overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT. + schema: + type: string + return_info: + custom: false + self: true + type: pre_shared_key + return_type: pre_shared_key + summary: Upload a PSK to Pelion Device Management. + x_deprecation: null + x_filter: {} + - _key: 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 " + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: endpoint_name + _override: true + api_fieldname: endpoint_name + entity_fieldname: endpoint_name + getter_custom_method: pre_shared_key_id_getter + readOnly: false + setter_custom_method: pre_shared_key_id_setter + type: string + - _key: id + _override: true + api_fieldname: id + description: The Id of the pre_shared_key, shadows the endpoint_name + entity_fieldname: id + getter_custom_method: pre_shared_key_id_getter + in: path + name: endpoint_name + required: true + setter_custom_method: pre_shared_key_id_setter + type: string + group_id: Security + method: delete + mode: delete + operation_id: deletePreSharedKey + pagination: false + parameter_map: + endpoint_name: id + path: /v2/device-shared-keys/{endpoint_name} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Successfully deleted. Responds even if the endpoint does not have + an associated PSK. + - _key: '400' + description: Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME. + schema: + type: string + - _key: '401' + description: Authentication failure. + return_info: + custom: false + self: true + type: pre_shared_key + return_type: pre_shared_key + summary: Remove a PSK. + x_deprecation: null + x_filter: {} - _key: list - description: List all groups. + 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 " + + ```' drop_fields: - object - etag - type - - groups - filter - - data + - order - has_more - - total_count - - id__eq - - id__neq - - id__in - - id__nin - - devices_count__eq - - devices_count__neq - - devices_count__in - - devices_count__nin - - devices_count__lte - - devices_count__gte - - name__eq - - name__neq - - name__in - - name__nin - - created_at__in - - created_at__nin - - created_at__lte - - created_at__gte - - updated_at__in - - updated_at__nin - - updated_at__lte - - updated_at__gte + - continuation_marker + - data field_renames: [] fields: - _key: after api_fieldname: after - description: The ID of The item after which to retrieve the next page. + description: An offset token for fetching a specific page. Provided by the server. entity_fieldname: after - example: '01631667477600000000000100100374' + example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 external_param: true in: query name: after parameter_fieldname: after required: false type: string - - _key: include - api_fieldname: include - description: 'Comma-separated list of data fields to return. Currently supported: - `total_count`.' - entity_fieldname: include - external_param: true - in: query - name: include - parameter_fieldname: include - required: false + - _key: endpoint_name + _override: true + api_fieldname: endpoint_name + entity_fieldname: endpoint_name + getter_custom_method: pre_shared_key_id_getter + readOnly: false + setter_custom_method: pre_shared_key_id_setter + type: string + - _key: id + _override: true + api_fieldname: id + description: The Id of the pre_shared_key, shadows the endpoint_name + entity_fieldname: id + getter_custom_method: pre_shared_key_id_getter + setter_custom_method: pre_shared_key_id_setter 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. + 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 @@ -29393,120 +46524,87 @@ entities: parameter_fieldname: limit required: false type: integer - - _key: order - api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. - entity_fieldname: order - example: DESC - external_param: true - in: query - name: order - parameter_fieldname: order - required: false - type: string foreign_key: - entity: device_group - group: Devices + entity: pre_shared_key + group: Security foreign_key_priority: self - group_id: Devices + group_id: Security method: get mode: list - operation_id: Group_list + operation_id: listPreSharedKeys pagination: true parameter_map: - device-group-id: id - path: /v3/device-groups/ + endpoint_name: id + path: /v2/device-shared-keys request_body: json request_content_type: application/json responses: - _key: '200' - description: Ok. + description: List of PSKs. schema: foreign_key: - entity: device_group - group: Devices + entity: pre_shared_key + group: Security pagination: true properties: - _key: after api_fieldname: after description: An offset token for current page. entity_fieldname: after - example: '01631667477600000000000100100374' + example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 + type: string + - _key: continuation_marker + api_fieldname: 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. + entity_fieldname: continuation_marker + example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810005 type: string - _key: data api_fieldname: data + description: Array of the PSK entries. The array is empty if there are no + PSKs. entity_fieldname: data items: foreign_key: - entity: device_group - group: Devices + entity: pre_shared_key + group: Security properties: - _key: created_at - description: The time the campaign was created. - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - 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 - - _key: description - description: The description of the group. - example: Devices on the factory floor. - maxLength: 2000 - type: string - - _key: devices_count - description: The number of devices in this group. - example: 10 - type: integer - - _key: etag - 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 - - _key: id - description: The group ID. - example: 015c3029f6f7000000000001001000c3 - type: string - - _key: name - description: Name of the group. - example: My devices - maxLength: 128 - type: string - - _key: object - description: 'Entity name: always ''device-group''.' - example: device-group - type: string - - _key: updated_at - description: The time the object was updated. - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: endpoint_name + _override: true + 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 + getter_custom_method: pre_shared_key_id_getter + pattern: ^[ -~]{16,64}$ + readOnly: false + setter_custom_method: pre_shared_key_id_setter type: string + required: + - endpoint_name type: object + minLength: 0 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 + example: true 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 value of limit query parameter from the request, or default + if not specified. entity_fieldname: limit example: 50 - maximum: 1000 - minimum: 2 type: integer - _key: object api_fieldname: object @@ -29516,19 +46614,314 @@ entities: 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 - - _key: total_count - api_fieldname: total_count - entity_fieldname: total_count - example: 1 - format: integer - type: integer + required: + - object + - limit + - order + - has_more + - data + type: object + - _key: '400' + description: Bad request. Contains the error as a string, either TOKEN_NOT_FOUND + or INVALID_LIMIT. + return_info: + custom: false + self: true + type: pre_shared_key + return_type: paginated_response(pre_shared_key) + summary: List PSKs. + x_deprecation: null + x_filter: {} + - _key: read + 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 " + + ```' + drop_fields: + - object + - etag + - type + - filter + - created_at + field_renames: [] + fields: + - _key: endpoint_name + _override: true + api_fieldname: 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. + entity_fieldname: endpoint_name + example: my-endpoint-0001 + getter_custom_method: pre_shared_key_id_getter + pattern: ^[ -~]{16,64}$ + readOnly: false + setter_custom_method: pre_shared_key_id_setter + type: string + - _key: id + _override: true + api_fieldname: id + description: The Id of the pre_shared_key, shadows the endpoint_name + entity_fieldname: id + getter_custom_method: pre_shared_key_id_getter + in: path + name: endpoint_name + required: true + setter_custom_method: pre_shared_key_id_setter + type: string + group_id: Security + method: get + mode: read + operation_id: getPreSharedKey + pagination: false + parameter_map: + endpoint_name: id + path: /v2/device-shared-keys/{endpoint_name} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Pre-shared key for the device (does not contain secret). + schema: + foreign_key: + entity: pre_shared_key + group: Security + properties: + - _key: created_at + api_fieldname: created_at + description: The date-time (RFC3339) when this PSK was uploaded to Device + Management. + entity_fieldname: created_at + example: '2017-07-21T17:32:28.012Z' + format: date-time + type: string + - _key: endpoint_name + _override: true + api_fieldname: 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. + entity_fieldname: endpoint_name + example: my-endpoint-0001 + getter_custom_method: pre_shared_key_id_getter + pattern: ^[ -~]{16,64}$ + readOnly: false + setter_custom_method: pre_shared_key_id_setter + type: string + required: + - endpoint_name type: object + - _key: '400' + description: Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME. + schema: + type: string - _key: '401' - description: Unauthorized. + description: Authentication failure. + - _key: '404' + description: The PSK does not exist. + return_info: + custom: false + self: true + type: pre_shared_key + return_type: pre_shared_key + summary: Get a PSK. + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - ListOfPreSharedKeysWithoutSecret + - PreSharedKey + - PreSharedKeyWithoutSecret + tags: + - Security and identity - pre-shared keys +- _key: saml2_request + field_renames: [] + fields: + - _key: entity_descriptor + api_fieldname: 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 + readOnly: true + required: false + type: string + - _key: idp_entity_id + api_fieldname: idp_entity_id + description: Entity ID of the identity provider. + readOnly: true + required: false + type: string + - _key: idp_x509_certs + api_fieldname: idp_x509_certs + description: List of public X509 certificates of the identity provider. Certificates + must be in PEM format. + items: + type: string + readOnly: true + required: false + type: array + - _key: slo_endpoint + api_fieldname: slo_endpoint + description: URL of the identity provider's SLO endpoint. + readOnly: true + required: false + type: string + - _key: sp_entity_id + api_fieldname: sp_entity_id + description: Entity ID of the service provider. We recommend that you leave it + empty and let the system generate it. + readOnly: true + required: false + type: string + - _key: sso_endpoint + api_fieldname: sso_endpoint + description: URL of the identity provider's SSO endpoint. + readOnly: true + required: false + type: string + group_id: Accounts + methods: [] + primary_key_field: null + swagger_models: + - SAML2Req + tags: [] +- _key: server_credentials + field_renames: [] + fields: + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + format: date-time + readOnly: true + required: false + type: string + - _key: id + api_fieldname: id + description: Unique entity ID. + readOnly: true + required: false + type: string + - _key: server_certificate + api_fieldname: server_certificate + description: PEM-format X.509 server certificate used to validate the server certificate + received during the TLS/DTLS handshake. + readOnly: true + required: false + type: string + - _key: server_uri + api_fieldname: server_uri + description: Server URI that the client connects to. + readOnly: true + required: false + type: string + group_id: Security + methods: + - _key: get_bootstrap + additional_operations: + - notes: The information returned by this endpoint can be obtained by calling + `get_bootstrap`. + operation_id: getAllServerCredentials + description: '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 " + + ```' + drop_fields: + - object + - etag + - type + - filter + - id + - created_at + - server_certificate + - server_uri + field_renames: [] + fields: [] + group_id: Security + method: get + mode: get_bootstrap + operation_id: getBootstrapServerCredentials + pagination: false + path: /v3/server-credentials/bootstrap + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Bootstrap server credentials fetched successfully. + examples: + - _key: Success + created_at: '2017-12-11T14:22:20.009Z' + etag: '1' + id: 015fee4431fd38c98640fbfb00000000 + object: server-credentials + server_certificate: '-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\n-----END + CERTIFICATE-----' + server_uri: coaps://coap.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000 + schema: + foreign_key: + entity: server_credentials + group: Security + properties: + - _key: created_at + api_fieldname: created_at + description: Creation UTC time RFC3339. + entity_fieldname: created_at + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + type: string + - _key: id + api_fieldname: id + description: Unique entity ID. + entity_fieldname: id + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always `server-credentials`.' + entity_fieldname: object + type: string + - _key: server_certificate + api_fieldname: server_certificate + description: PEM-format X.509 server certificate used to validate the server + certificate received during the TLS/DTLS handshake. + entity_fieldname: server_certificate + type: string + - _key: server_uri + api_fieldname: server_uri + description: Server URI that the client connects to. + entity_fieldname: server_uri + type: string + type: object + - _key: '400' + description: Bad request. schema: properties: - _key: code @@ -29575,8 +46968,15 @@ entities: - request_id - type type: object - - _key: '404' - description: Not Found. + - _key: '401' + description: Invalid access token. + examples: + - _key: Authentication Error + code: 401 + message: Invalid access token. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: invalid_auth schema: properties: - _key: code @@ -29626,146 +47026,95 @@ entities: return_info: custom: false self: true - type: device_group - return_type: paginated_response(device_group) - summary: List all groups. + type: server_credentials + return_type: server_credentials + summary: Fetch bootstrap server credentials. x_deprecation: null - x_filter: - created_at: - - in - - nin - - lte - - gte - devices_count: - - eq - - neq - - in - - nin - - lte - - gte - id: - - eq - - neq - - in - - nin - name: - - eq - - neq - - in - - nin - updated_at: - - in - - nin - - lte - - gte - - _key: read - description: Get a group. + x_filter: {} + - _key: get_lwm2m + additional_operations: + - notes: The information returned by this endpoint can be obtained by calling + `get_lwm2m`. + operation_id: getAllServerCredentials + description: '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 " + + ```' drop_fields: - object - etag - type - - groups - filter - - name - - description - - custom_attributes - - devices_count + - id - created_at - - updated_at + - server_certificate + - server_uri field_renames: [] - fields: - - _key: id - api_fieldname: id - description: The group ID. - entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 - in: path - parameter_fieldname: device-group-id - required: true - type: string - group_id: Devices + fields: [] + group_id: Security method: get - mode: read - operation_id: Group_retrieve + mode: get_lwm2m + operation_id: getL2M2MServerCredentials pagination: false - parameter_map: - device-group-id: id - path: /v3/device-groups/{device-group-id}/ + path: /v3/server-credentials/lwm2m request_body: json request_content_type: application/json responses: - _key: '200' - description: Ok. + description: LwM2M server credentials fetched successfully. + examples: + - _key: Success + created_at: '2017-12-11T14:22:20.009Z' + etag: '1' + id: 015fee4431fd38c98640fbfb00000000 + object: server-credentials + server_certificate: '-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\n-----END + CERTIFICATE-----' + server_uri: coaps://mds.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000 schema: foreign_key: - entity: device_group - group: Devices + entity: server_credentials + group: Security properties: - _key: created_at api_fieldname: created_at - description: The time the campaign was created. + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_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: custom_attributes - example: - key: value - maxProperties: 10 - type: object - - _key: description - api_fieldname: description - description: The description of the group. - entity_fieldname: description - example: Devices on the factory floor. - maxLength: 2000 - type: string - - _key: devices_count - api_fieldname: devices_count - description: The number of devices in this group. - entity_fieldname: devices_count - example: 10 - type: integer - _key: etag api_fieldname: etag + description: API resource entity version. entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time type: string - _key: id api_fieldname: id - description: The group ID. + description: Unique entity ID. entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 - type: string - - _key: name - api_fieldname: name - description: Name of the group. - entity_fieldname: name - example: My devices - maxLength: 128 type: string - _key: object api_fieldname: object - description: 'Entity name: always ''device-group''.' + description: 'Entity name: always `server-credentials`.' entity_fieldname: object - example: device-group type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated. - entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: server_certificate + api_fieldname: server_certificate + description: PEM-format X.509 server certificate used to validate the server + certificate received during the TLS/DTLS handshake. + entity_fieldname: server_certificate + type: string + - _key: server_uri + api_fieldname: server_uri + description: Server URI that the client connects to. + entity_fieldname: server_uri type: string type: object - _key: '400' @@ -29817,7 +47166,14 @@ entities: - type type: object - _key: '401' - description: Unauthorized. + description: Invalid access token. + examples: + - _key: Authentication Error + code: 401 + message: Invalid access token. + object: error + request_id: 015fee4431fd38c98640fbfb00000000 + type: invalid_auth schema: properties: - _key: code @@ -29864,8 +47220,346 @@ entities: - request_id - type type: object - - _key: '404' - description: Not Found. + return_info: + custom: false + self: true + type: server_credentials + return_type: server_credentials + summary: Fetch LwM2M server credentials. + x_deprecation: null + x_filter: {} + primary_key_field: id + swagger_models: + - ServerCredentialsResponseData + tags: + - Security and identity - server credentials +- _key: subtenant_api_key + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _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: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + readOnly: true + required: false + type: integer + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + in: body + items: + type: string + parameter_fieldname: groups + readOnly: false + required: false + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: key + api_fieldname: key + description: The API key. + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + readOnly: true + required: false + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + example: 1518630727688 + format: int64 + readOnly: true + required: false + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + readOnly: false + required: true + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + readOnly: false + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + enum: + - ACTIVE + - INACTIVE + enum_reference: subtenant_api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + readOnly: false + 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: + - _key: create + 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 POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{"name": "MyKey1"}'' + + ```' + drop_fields: + - object + - etag + - type + - filter + - id + - created_at + - updated_at + - key + - creation_time + - last_login_time + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: &id009 + - ACTIVE + - INACTIVE + enum_reference: subtenant_api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: post + mode: create + operation_id: createAccountApiKey + pagination: false + parameter_map: + apikey_id: id + path: /v3/accounts/{account_id}/api-keys + request_body: json + request_content_type: application/json + responses: + - _key: '201' + description: New entity created. + schema: + description: Represents an API key in Device Management. + foreign_key: + entity: api_key + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 + format: int64 + type: integer + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''api-key''' + entity_fieldname: object + enum: + - api-key + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + enum_reference: api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false + 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 + required: + - etag + - id + - key + - name + - object + type: object + - _key: '400' + description: Error in input data, for example, missing API key name. schema: properties: - _key: code @@ -29912,60 +47606,8 @@ entities: - request_id - type type: object - return_info: - custom: false - self: true - type: device_group - return_type: device_group - summary: Get a group. - x_deprecation: null - x_filter: {} - - _key: remove_device - description: Remove one device from a group. - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: [] - fields: - - _key: device_id - api_fieldname: device_id - entity_fieldname: device_id - example: '00000000000000000000000000000000' - external_param: true - in: body - name: device_id - parameter_fieldname: device_id - required: false - schema_param: true - type: string - - _key: id - api_fieldname: device-group-id - description: The ID of the group. - entity_fieldname: id - external_param: false - in: path - name: device-group-id - parameter_fieldname: device-group-id - required: true - type: string - group_id: Devices - method: post - mode: remove_device - operation_id: Group_members_remove - pagination: false - parameter_map: - device-group-id: id - path: /v3/device-groups/{device-group-id}/devices/remove/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Success - device removed. - - _key: '400' - description: Bad Request. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -30011,9 +47653,9 @@ entities: - object - request_id - type - type: object - - _key: '401' - description: Unauthorized. + type: object + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -30061,7 +47703,7 @@ entities: - type type: object - _key: '404' - description: Not Found. + description: An account with the given ID does not exist. schema: properties: - _key: code @@ -30109,167 +47751,75 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Remove a device from a group - x_deprecation: null + custom: false + self: true + type: subtenant_api_key + return_type: subtenant_api_key + summary: Create a new API key. + 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: update - description: Modify the attributes of a group. + - _key: delete + description: 'Delete an API key. + + 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} + \ + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - - devices_count - - created_at - - updated_at field_renames: [] fields: - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_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: custom_attributes - example: - key: value - in: body - maxProperties: 10 - name: custom_attributes - parameter_fieldname: custom_attributes - required: false - schema_param: true - type: object - - _key: description - api_fieldname: description - description: The description of the group. - entity_fieldname: description - example: Devices on the factory floor. - in: body - maxLength: 2000 - name: description - parameter_fieldname: description - required: false - schema_param: true + - _key: account_id + api_fieldname: account_id + description: Account ID. + entity_fieldname: account_id + external_param: false + in: path + name: account_id + parameter_fieldname: account_id + required: true type: string - _key: id - api_fieldname: id - description: The group ID. + api_fieldname: apikey_id + description: The ID of the API key to delete. entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 + external_param: false in: path - parameter_fieldname: device-group-id + name: apikey_id + parameter_fieldname: apikey_id required: true type: string - - _key: name - api_fieldname: name - description: Name of the group. - entity_fieldname: name - example: My devices - in: body - maxLength: 128 - name: name - parameter_fieldname: name - required: false - schema_param: true - type: string - group_id: Devices - method: put - mode: update - operation_id: Group_update + group_id: Accounts + method: delete + mode: delete + operation_id: deleteAccountApiKey pagination: false parameter_map: - device-group-id: id - path: /v3/device-groups/{device-group-id}/ + apikey_id: id + path: /v3/accounts/{account_id}/api-keys/{apikey_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Ok. - schema: - foreign_key: - entity: device_group - group: Devices - properties: - - _key: created_at - api_fieldname: created_at - description: The time the campaign was created. - entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: custom_attributes - additionalProperties: - maxLength: 128 - pattern: ^[A-Za-z].* - type: string - api_fieldname: custom_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: custom_attributes - example: - key: value - maxProperties: 10 - type: object - - _key: description - api_fieldname: description - description: The description of the group. - entity_fieldname: description - example: Devices on the factory floor. - maxLength: 2000 - type: string - - _key: devices_count - api_fieldname: devices_count - description: The number of devices in this group. - entity_fieldname: devices_count - example: 10 - type: integer - - _key: etag - api_fieldname: etag - entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: id - api_fieldname: id - description: The group ID. - entity_fieldname: id - example: 015c3029f6f7000000000001001000c3 - type: string - - _key: name - api_fieldname: name - description: Name of the group. - entity_fieldname: name - example: My devices - maxLength: 128 - type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''device-group''.' - entity_fieldname: object - example: device-group - type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated. - entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - type: object - - _key: '400' - description: Bad Request. + - _key: '204' + description: Deleted successfully. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -30316,8 +47866,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Unauthorized. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -30365,7 +47915,7 @@ entities: - type type: object - _key: '404' - description: Not Found. + description: An account or API key with the specified ID does not exist. schema: properties: - _key: code @@ -30415,358 +47965,77 @@ entities: return_info: custom: false self: true - type: device_group - return_type: device_group - summary: Modify the attributes of a group. - x_deprecation: null - x_filter: {} - primary_key_field: id - swagger_models: - - DeviceGroup - - DeviceGroupManipulation - - DeviceGroupPage - - DevicePage - tags: [] -- _key: firmware_image - field_renames: - - _key: datafile_url - api_fieldname: datafile - fields: - - _key: created_at - api_fieldname: created_at - description: The time the object was created - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: datafile_checksum - api_fieldname: datafile_checksum - description: The checksum (sha256) generated for the datafile - example: '0000000000000000000000000000000000000000000000000000000000000000' - readOnly: true - required: false - type: string - - _key: datafile_size - api_fieldname: datafile_size - description: The size of the datafile in bytes - format: int64 - readOnly: true - required: false - type: integer - - _key: datafile_url - api_fieldname: datafile - description: The firmware image file URL - example: http://example.com/00000000000000000000000000000000 - readOnly: true - required: false - type: string - - _key: description - api_fieldname: description - description: The description of the object - example: '' - maxLength: 2000 - readOnly: false - required: false - type: string - - _key: id - api_fieldname: id - description: The firmware image ID - example: '00000000000000000000000000000000' - readOnly: false - required: true - type: string - - _key: name - api_fieldname: name - description: The firmware image name - example: '' - maxLength: 128 - readOnly: false - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Device_Update - methods: - - _key: create - description: Create a firmware image. - drop_fields: - - object - - etag - - type - - groups - - filter - - created_at - - datafile_checksum - - datafile_size - - id - - updated_at - - datafile_url - field_renames: - - _key: datafile_url - api_fieldname: datafile - fields: - - _key: description - api_fieldname: description - description: The description of the object - entity_fieldname: description - example: '' - in: stream - maxLength: 2000 - parameter_fieldname: description - required: false - type: string - - _key: firmware_image_file - api_fieldname: datafile - description: The firmware image file to upload - entity_fieldname: firmware_image_file - external_param: true - in: stream - name: datafile - parameter_fieldname: datafile - required: true - type: file - - _key: name - api_fieldname: name - description: The firmware image name - entity_fieldname: name - example: '' - in: stream - maxLength: 128 - parameter_fieldname: name - required: false - type: string - group_id: Device_Update - method: post - mode: create - notes: This is not a standard create method as it uploads a file which creates - an entity which contains URIs to the uploaded file. - operation_id: Firmware_Image_create - pagination: false - parameter_map: - datafile: firmware_image_file - image_id: id - path: /v3/firmware-images/ - request_body: file - request_content_type: multipart/form-data - responses: - - _key: '201' - description: Firmware image created. The API gateway enforces the account-specific - file size. - schema: - foreign_key: - entity: firmware_image - group: Device_Update - properties: - - _key: created_at - api_fieldname: created_at - description: The time the object was created - entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: datafile - api_fieldname: datafile - description: The firmware image file URL - entity_fieldname: datafile_url - example: http://example.com/00000000000000000000000000000000 - type: string - - _key: datafile_checksum - api_fieldname: datafile_checksum - description: The checksum (sha256) generated for the datafile - entity_fieldname: datafile_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' - type: string - - _key: datafile_size - api_fieldname: datafile_size - description: The size of the datafile in bytes - entity_fieldname: datafile_size - format: int64 - type: integer - - _key: description - api_fieldname: description - description: The description of the object - entity_fieldname: description - example: '' - maxLength: 2000 - type: string - - _key: etag - api_fieldname: etag - description: The entity instance signature - entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: id - api_fieldname: id - description: The firmware image ID - entity_fieldname: id - example: '00000000000000000000000000000000' - type: string - - _key: name - api_fieldname: name - description: The firmware image name - entity_fieldname: name - example: '' - maxLength: 128 - type: string - - _key: object - api_fieldname: object - description: The API resource entity - entity_fieldname: object - example: firmware-image - type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated - entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - required: - - created_at - - datafile - - datafile_checksum - - description - - etag - - id - - name - - object - - updated_at - - _key: '400' - description: Cannot validate the data used to create the firmware image. - - _key: '401' - description: Not authenticated - - _key: '403' - description: Forbidden - - _key: '413' - description: Firmware image too large. - return_info: - custom: false - self: true - type: firmware_image - return_type: firmware_image - summary: Create an image - unaggregated: true - x_deprecation: null + type: subtenant_api_key + return_type: subtenant_api_key + summary: Delete the API key. + 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: delete - description: Delete a firmware image. + - _key: policy_groups + 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 '' + + ```' drop_fields: - object - etag - type - - groups - filter - field_renames: - - _key: datafile_url - api_fieldname: datafile + - total_count + - has_more + - data + field_renames: [] fields: - - _key: id - api_fieldname: image_id - description: The firmware image ID - entity_fieldname: id + - _key: account_id + api_fieldname: account_id + description: Account ID. + entity_fieldname: account_id external_param: false in: path - name: image_id - parameter_fieldname: image_id + name: account_id + parameter_fieldname: account_id required: true type: string - group_id: Device_Update - method: delete - mode: delete - operation_id: Firmware_Image_destroy - pagination: false - parameter_map: - image_id: id - path: /v3/firmware-images/{image_id}/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Firmware image deleted - - _key: '400' - description: Bad Request - - _key: '401' - description: Not authenticated - - _key: '404' - description: Firmware image not found - return_info: - custom: false - self: true - type: firmware_image - return_type: firmware_image - summary: Delete an image - x_deprecation: null - x_filter: {} - - _key: list - description: List all firmware images. - drop_fields: - - object - - etag - - type - - groups - - filter - - data - - has_more - - total_count - - created_at__in - - created_at__nin - - created_at__lte - - created_at__gte - - datafile__eq - - datafile__neq - - datafile__in - - datafile__nin - - datafile_checksum__eq - - datafile_checksum__neq - - datafile_checksum__in - - datafile_checksum__nin - - datafile_size__eq - - datafile_size__neq - - datafile_size__in - - datafile_size__nin - - description__eq - - description__neq - - description__in - - description__nin - - id__eq - - id__neq - - id__in - - id__nin - - name__eq - - name__neq - - name__in - - name__nin - - updated_at__in - - updated_at__nin - - updated_at__lte - - updated_at__gte - field_renames: - - _key: datafile_url - api_fieldname: datafile - fields: - _key: after api_fieldname: after - description: The ID of the the item after which to retrieve the next page + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: null + example: 01619571f3c00242ac12000600000000 external_param: true in: query name: after parameter_fieldname: after + pattern: '[a-f0-9]{32}' required: false type: string + - _key: id + api_fieldname: apikey_id + description: The ID of the API key. + entity_fieldname: id + external_param: false + in: path + name: apikey_id + parameter_fieldname: apikey_id + required: true + type: string - _key: include api_fieldname: include - description: 'A comma-separated list of data fields to return. Currently supported: - total_count' + description: 'Comma-separated additional data to return. Currently supported: + total_count.' entity_fieldname: include external_param: true in: query @@ -30776,28 +48045,27 @@ 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. + 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 - maximum: 1000 - minimum: 2 name: limit parameter_fieldname: limit required: false type: integer - _key: order api_fieldname: order - description: ASC or DESC + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC - DESC - enum_reference: firmware_image_order_enum - example: ASC + enum_reference: subtenant_api_key_order_enum external_param: true in: query name: order @@ -30805,1108 +48073,1092 @@ entities: required: false type: string foreign_key: - entity: firmware_image - group: Device_Update - foreign_key_priority: self - group_id: Device_Update + entity: subtenant_policy_group + group_id: Accounts method: get - mode: list - operation_id: Firmware_Image_list + mode: policy_groups + operation_id: getGroupsOfAccountApikey pagination: true parameter_map: - image_id: id - path: /v3/firmware-images/ + apikey_id: id + path: /v3/accounts/{account_id}/api-keys/{apikey_id}/groups request_body: json request_content_type: application/json responses: - _key: '200' - description: Request successful + description: Successful operation. schema: foreign_key: - entity: firmware_image - group: Device_Update + entity: subtenant_policy_group + group: Accounts pagination: true properties: - _key: after api_fieldname: after + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: null + 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 + description: A list of entities. entity_fieldname: data - example: '[]' items: + description: This object contains basic information about groups. foreign_key: - entity: firmware_image - group: Device_Update + entity: subtenant_policy_group + group: Accounts properties: - - _key: created_at - description: The time the object was created - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: datafile - description: The firmware image file URL - example: http://example.com/00000000000000000000000000000000 - type: string - - _key: datafile_checksum - description: The checksum (sha256) generated for the datafile - example: '0000000000000000000000000000000000000000000000000000000000000000' + - _key: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - - _key: datafile_size - description: The size of the datafile in bytes - format: int64 + - _key: apikey_count + description: The number of API keys in this group. + example: 0 + format: int32 type: integer - - _key: description - description: The description of the object - example: '' - maxLength: 2000 + 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' + format: date-time type: string - _key: etag - description: The entity instance signature - example: '2017-05-22T12:37:55.576563Z' - format: date-time + description: API resource entity version. + example: '1' type: string - _key: id - description: The firmware image ID - example: '00000000000000000000000000000000' + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - _key: name - description: The firmware image name - example: '' - maxLength: 128 + description: The name of the group. + example: Administrators + maxLength: 100 type: string - _key: object - description: The API resource entity - example: firmware-image + description: 'Entity name: always `group`.' + enum: + - group type: string - _key: updated_at - description: The time the object was updated - example: '2017-05-22T12:37:55.576563Z' + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' format: date-time type: string + - _key: user_count + description: The number of users in this group. + example: 1 + format: int32 + type: integer required: - - created_at - - datafile - - datafile_checksum - - description + - account_id + - apikey_count - etag - id - name - object - - updated_at + - user_count + 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 + 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 + description: 'Entity name: always `list`.' entity_fieldname: object - example: list + enum: + - list type: string - _key: order api_fieldname: order - description: The order of the records based on creation time, `ASC` or `DESC`; - by default `ASC`. + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order enum: - ASC - DESC - example: ASC + enum_reference: api_key_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string - _key: total_count api_fieldname: total_count + description: The total number of records, if requested. entity_fieldname: total_count + example: 20 format: int32 type: integer - - _key: '400' - description: Bad Request + required: + - data + - has_more + - limit + - object + - total_count + type: object - _key: '401' - description: Not authenticated - - _key: '404' - description: Unable to find content - return_info: - custom: false - self: true - type: firmware_image - return_type: paginated_response(firmware_image) - summary: List all images - x_deprecation: null - x_filter: - created_at: - - in - - nin - - lte - - gte - datafile_checksum: - - eq - - neq - - in - - nin - datafile_size: - - eq - - neq - - in - - nin - datafile_url: - - eq - - neq - - in - - nin - description: - - eq - - neq - - in - - nin - id: - - eq - - neq - - in - - nin - name: - - eq - - neq - - in - - nin - updated_at: - - in - - nin - - lte - - gte - - _key: read - description: Retrieve a firmware image. - drop_fields: - - object - - etag - - type - - groups - - filter - - created_at - - datafile_checksum - - datafile_size - - description - - name - - updated_at - - datafile_url - field_renames: - - _key: datafile_url - api_fieldname: datafile - fields: - - _key: id - api_fieldname: id - description: The firmware image ID - entity_fieldname: id - example: '00000000000000000000000000000000' - in: path - parameter_fieldname: image_id - required: true - type: string - group_id: Device_Update - method: get - mode: read - operation_id: Firmware_Image_retrieve - pagination: false - parameter_map: - image_id: id - path: /v3/firmware-images/{image_id}/ - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Retrieved result successfully + description: Authentication failure. schema: - foreign_key: - entity: firmware_image - group: Device_Update properties: - - _key: created_at - api_fieldname: created_at - description: The time the object was created - entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _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: datafile - api_fieldname: datafile - description: The firmware image file URL - entity_fieldname: datafile_url - example: http://example.com/00000000000000000000000000000000 + - _key: object + description: Entity name, always `error`. + enum: + - error type: string - - _key: datafile_checksum - api_fieldname: datafile_checksum - description: The checksum (sha256) generated for the datafile - entity_fieldname: datafile_checksum - example: '0000000000000000000000000000000000000000000000000000000000000000' + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: datafile_size - api_fieldname: datafile_size - description: The size of the datafile in bytes - entity_fieldname: datafile_size - format: int64 + - _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: description - api_fieldname: description - description: The description of the object - entity_fieldname: description - example: '' - maxLength: 2000 + - _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: etag - api_fieldname: etag - description: The entity instance signature - entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: object + description: Entity name, always `error`. + enum: + - error type: string - - _key: id - api_fieldname: id - description: The firmware image ID - entity_fieldname: id - example: '00000000000000000000000000000000' + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: name - api_fieldname: name - description: The firmware image name - entity_fieldname: name - example: '' - maxLength: 128 + - _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: An account or API key with the specified ID does not exist. + 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 - api_fieldname: object - description: The API resource entity - entity_fieldname: object - example: firmware-image + description: Entity name, always `error`. + enum: + - error type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated - entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _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: - - created_at - - datafile - - datafile_checksum - - description - - etag - - id - - name + - code + - message - object - - updated_at - - _key: '400' - description: Bad Request - - _key: '401' - description: Not authenticated - - _key: '404' - description: Firmware image can't be found + - request_id + - type + type: object return_info: custom: false - self: true - type: firmware_image - return_type: firmware_image - summary: Get an image - x_deprecation: null + self: false + type: subtenant_policy_group + return_type: paginated_response(subtenant_policy_group) + 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: {} - primary_key_field: id - swagger_models: - - FirmwareImage - - FirmwareImagePage - tags: [] -- _key: firmware_manifest - field_renames: - - _key: datafile_url - api_fieldname: datafile - - _key: key_table_url - api_fieldname: key_table - fields: - - _key: created_at - api_fieldname: created_at - description: The time the object was created - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: datafile_size - api_fieldname: datafile_size - description: The size of the datafile 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/00000000000000000000000000000000 - readOnly: true - required: false - type: string - - _key: description - api_fieldname: description - description: The description of the firmware manifest - example: '' - 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 - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: The firmware manifest ID - example: '00000000000000000000000000000000' - 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 - format: uri - readOnly: true - required: false - type: string - - _key: name - api_fieldname: name - description: The name of the object - example: '' - maxLength: 128 - readOnly: false - required: false - type: string - - _key: timestamp - api_fieldname: timestamp - description: The firmware manifest version as a timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: The time the object was updated - example: '2017-05-22T12:37:55.576563Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Device_Update - methods: - - _key: create - description: Upload a firmware manifest. The API enforces a maximum size of manifests - of 2 KB. + - _key: read + 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 - type - - groups - filter - created_at - - datafile_size - - device_class - - id - - timestamp - updated_at - - datafile_url - - key_table_url - field_renames: - - _key: datafile_url - api_fieldname: datafile - - _key: key_table_url - api_fieldname: key_table + - key + - name + - groups + - owner + - status + - creation_time + - last_login_time + field_renames: [] fields: - - _key: description - api_fieldname: description - description: The description of the firmware manifest - entity_fieldname: description - example: '' - in: stream - maxLength: 2000 - parameter_fieldname: description - required: false - type: string - - _key: firmware_manifest_file - api_fieldname: datafile - description: The manifest file to create. The API gateway enforces the account-specific - file size. - entity_fieldname: firmware_manifest_file - external_param: true - in: stream - name: datafile - parameter_fieldname: datafile + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' required: true - type: file - - _key: key_table_file - api_fieldname: key_table - description: The key table of pre-shared keys for devices - entity_fieldname: key_table_file - external_param: true - in: stream - name: key_table - parameter_fieldname: key_table - required: false - type: file - - _key: name - api_fieldname: name - description: The name of the object - entity_fieldname: name - example: '' - in: stream - maxLength: 128 - parameter_fieldname: name - required: false type: string - group_id: Device_Update - method: post - mode: create - notes: This is not a standard create method as it uploads a file (or files) which - creates an entity which contains URIs to the uploaded file(s). - operation_id: Firmware_Manifest_create + - _key: id + api_fieldname: id + description: The ID of the API key. + entity_fieldname: id + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + required: true + type: string + group_id: Accounts + method: get + mode: read + operation_id: getAccountApiKey pagination: false parameter_map: - datafile: firmware_manifest_file - key_table: key_table_file - manifest_id: id - path: /v3/firmware-manifests/ - request_body: file - request_content_type: multipart/form-data + apikey_id: id + path: /v3/accounts/{account_id}/api-keys/{apikey_id} + request_body: json + request_content_type: application/json responses: - - _key: '201' - description: Created + - _key: '200' + description: Successful operation. schema: + description: Represents an API key in Device Management. foreign_key: - entity: firmware_manifest - group: Device_Update + entity: api_key + group: Accounts properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string - _key: created_at api_fieldname: created_at - description: The time the object was created + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: datafile - api_fieldname: datafile - description: The URL of the firmware manifest binary - entity_fieldname: datafile_url - example: http://example.com/00000000000000000000000000000000 - type: string - - _key: datafile_size - api_fieldname: datafile_size - description: The size of the datafile in bytes - entity_fieldname: datafile_size + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 format: int64 type: integer - - _key: description - api_fieldname: description - description: The description of the firmware manifest - entity_fieldname: description - example: '' - maxLength: 2000 - type: string - - _key: device_class - api_fieldname: device_class - description: The class of the device - entity_fieldname: device_class - example: 00000000-0000-0000-0000-000000000000 - type: string - _key: etag api_fieldname: etag - description: The entity instance signature + description: API resource entity version. entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time + example: '1' type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: id api_fieldname: id - description: The firmware manifest ID + description: The ID of the API key. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + required: true type: string - - _key: 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 - format: uri + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer - _key: name api_fieldname: name - description: The name of the object + description: The display name for the API key. entity_fieldname: name - example: '' - maxLength: 128 + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false type: string - _key: object api_fieldname: object - description: The API resource entity + description: 'Entity name: always ''api-key''' entity_fieldname: object - example: firmware-manifest + enum: + - api-key type: string - - _key: timestamp - api_fieldname: timestamp - description: The firmware manifest version as a timestamp - entity_fieldname: timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + enum_reference: api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated + description: Last update UTC time RFC3339. entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-14T15:24:14Z' format: date-time type: string required: - - created_at - - datafile - - description - - device_class - etag - id + - key - name - object - - timestamp - - updated_at - - _key: '400' - description: 'Validation error. The data used to create the firmware manifest - did not validate and/or the manifest uploaded exceeded 2 KB in size. - - ' - - _key: '401' - description: Not authenticated - - _key: '403' - description: Forbidden - return_info: - custom: false - self: true - type: firmware_manifest - return_type: firmware_manifest - summary: Upload a manifest - unaggregated: true - x_deprecation: null - x_filter: {} - - _key: delete - description: Delete a firmware manifest. - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: - - _key: datafile_url - api_fieldname: datafile - - _key: key_table_url - api_fieldname: key_table - fields: - - _key: id - api_fieldname: manifest_id - description: The firmware manifest ID - entity_fieldname: id - external_param: false - in: path - name: manifest_id - parameter_fieldname: manifest_id - required: true - type: string - group_id: Device_Update - method: delete - mode: delete - operation_id: Firmware_Manifest_destroy - pagination: false - parameter_map: - manifest_id: id - path: /v3/firmware-manifests/{manifest_id}/ - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Firmware manifest deleted - - _key: '400' - description: Bad Request + type: object - _key: '401' - description: Not authenticated - - _key: '404' - description: Firmware manifest not found - return_info: - custom: false - self: true - type: firmware_manifest - return_type: firmware_manifest - summary: Delete a manifest - x_deprecation: null - x_filter: {} - - _key: list - description: List firmware manifests. - drop_fields: - - object - - etag - - type - - groups - - filter - - data - - has_more - - total_count - - created_at__in - - created_at__nin - - created_at__lte - - created_at__gte - - datafile__eq - - datafile__neq - - datafile__in - - datafile__nin - - datafile_size__eq - - datafile_size__neq - - datafile_size__in - - datafile_size__nin - - description__eq - - description__neq - - description__in - - description__nin - - device_class__eq - - device_class__neq - - device_class__in - - device_class__nin - - id__eq - - id__neq - - id__in - - id__nin - - name__eq - - name__neq - - name__in - - name__nin - - timestamp__in - - timestamp__nin - - timestamp__lte - - timestamp__gte - - updated_at__in - - updated_at__nin - - updated_at__lte - - updated_at__gte - field_renames: - - _key: datafile_url - api_fieldname: datafile - - _key: key_table_url - api_fieldname: key_table - fields: - - _key: after - api_fieldname: after - description: The ID of the the item after which to retrieve the next page - entity_fieldname: after - example: null - external_param: true - in: query - name: after - parameter_fieldname: after - required: false - type: string - - _key: include - api_fieldname: include - description: 'A comma-separated list of data fields 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: 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 - external_param: true - format: int32 - in: query - maximum: 1000 - minimum: 2 - name: limit - parameter_fieldname: limit - required: false - type: integer - - _key: order - api_fieldname: order - description: ASC or DESC - entity_fieldname: order - enum: - - ASC - - DESC - enum_reference: firmware_manifest_order_enum - example: ASC - external_param: true - in: query - name: order - parameter_fieldname: order - required: false - type: string - foreign_key: - entity: firmware_manifest - group: Device_Update - foreign_key_priority: self - group_id: Device_Update - method: get - mode: list - operation_id: Firmware_Manifest_list - pagination: true - parameter_map: - manifest_id: id - path: /v3/firmware-manifests/ - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Request successful + description: Authentication failure. schema: - foreign_key: - entity: firmware_manifest - group: Device_Update - pagination: true properties: - - _key: after - api_fieldname: after - entity_fieldname: after - example: null - type: string - - _key: data - api_fieldname: data - entity_fieldname: data - example: '[]' + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. items: - foreign_key: - entity: firmware_manifest - group: Device_Update properties: - - _key: created_at - description: The time the object was created - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: datafile - description: The URL of the firmware manifest binary - example: http://example.com/00000000000000000000000000000000 - type: string - - _key: datafile_size - description: The size of the datafile in bytes - format: int64 - type: integer - - _key: description - description: The description of the firmware manifest - example: '' - maxLength: 2000 - type: string - - _key: device_class - description: The class of the device - example: 00000000-0000-0000-0000-000000000000 - type: string - - _key: etag - description: The entity instance signature - example: '2017-05-22T12:37:55.576563Z' - format: date-time - type: string - - _key: id - description: The firmware manifest ID - example: '00000000000000000000000000000000' - type: string - - _key: key_table - description: The key table of pre-shared keys for devices - example: http://example.com - format: uri + - _key: message + description: Message describing the error condition. type: string - _key: name - description: The name of the object - example: '' - maxLength: 128 - type: string - - _key: object - description: The API resource entity - example: firmware-manifest + description: Name of the field which caused the error. type: string - - _key: timestamp - description: The firmware manifest version as a timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + 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: updated_at - description: The time the object was updated - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: name + description: Name of the field which caused the error. type: string required: - - created_at - - datafile - - description - - device_class - - etag - - id - name - - object - - timestamp - - updated_at + - message + type: object type: array - - _key: has_more - api_fieldname: has_more - entity_fieldname: has_more - type: boolean - - _key: limit - api_fieldname: limit - entity_fieldname: limit + - _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: An account or API key with the specified ID does not exist. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 format: int32 type: integer - - _key: object - api_fieldname: object - entity_fieldname: object - example: list + - _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: order - api_fieldname: order - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' - entity_fieldname: order + - _key: object + description: Entity name, always `error`. enum: - - ASC - - DESC - example: ASC + - error type: string - - _key: total_count - api_fieldname: total_count - entity_fieldname: total_count - format: int32 - type: integer - - _key: '400' - description: Bad Request - - _key: '401' - description: Not authenticated - - _key: '404' - description: Unable to find content + - _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: firmware_manifest - return_type: paginated_response(firmware_manifest) - summary: List manifests - x_deprecation: null - x_filter: - created_at: - - in - - nin - - lte - - gte - datafile_size: - - eq - - neq - - in - - nin - datafile_url: - - eq - - neq - - in - - nin - description: - - eq - - neq - - in - - nin - device_class: - - eq - - neq - - in - - nin - id: - - eq - - neq - - in - - nin - name: - - eq - - neq - - in - - nin - timestamp: - - in - - nin - - lte - - gte - updated_at: - - in - - nin - - lte - - gte - - _key: read - description: Retrieve a firmware manifest. + type: subtenant_api_key + return_type: subtenant_api_key + summary: Get API key details. + 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:** + + ``` + + 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"}'' + + ```' drop_fields: - object - etag - type - - groups - filter - created_at - - datafile_size - - description - - device_class - - name - - timestamp - updated_at - - datafile_url - - key_table_url - field_renames: - - _key: datafile_url - api_fieldname: datafile - - _key: key_table_url - api_fieldname: key_table + - key + - creation_time + - last_login_time + field_renames: [] fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: id api_fieldname: id - description: The firmware manifest ID + description: The ID of the API key. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 01619571f7020242ac12000600000000 in: path - parameter_fieldname: manifest_id + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' required: true type: string - group_id: Device_Update - method: get - mode: read - operation_id: Firmware_Manifest_retrieve + - _key: name + api_fieldname: name + description: The display name for the API key. + entity_fieldname: name + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false + type: string + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: *id009 + enum_reference: subtenant_api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: put + mode: update + operation_id: updateAccountApiKey pagination: false parameter_map: - manifest_id: id - path: /v3/firmware-manifests/{manifest_id}/ + apikey_id: id + path: /v3/accounts/{account_id}/api-keys/{apikey_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Retrieved result successfully + description: Successful operation. schema: + description: Represents an API key in Device Management. foreign_key: - entity: firmware_manifest - group: Device_Update + entity: api_key + group: Accounts properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string - _key: created_at api_fieldname: created_at - description: The time the object was created + description: Creation UTC time RFC3339. entity_fieldname: created_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: datafile - api_fieldname: datafile - description: The URL of the firmware manifest binary - entity_fieldname: datafile_url - example: http://example.com/00000000000000000000000000000000 - type: string - - _key: datafile_size - api_fieldname: datafile_size - description: The size of the datafile in bytes - entity_fieldname: datafile_size + - _key: creation_time + api_fieldname: creation_time + description: The timestamp of the API key creation in the storage, in milliseconds. + entity_fieldname: creation_time + example: 1518630727683 format: int64 type: integer - - _key: description - api_fieldname: description - description: The description of the firmware manifest - entity_fieldname: description - example: '' - maxLength: 2000 - type: string - - _key: device_class - api_fieldname: device_class - description: The class of the device - entity_fieldname: device_class - example: 00000000-0000-0000-0000-000000000000 - type: string - _key: etag api_fieldname: etag - description: The entity instance signature + description: API resource entity version. entity_fieldname: etag - example: '2017-05-22T12:37:55.576563Z' - format: date-time + example: '1' type: string + - _key: groups + api_fieldname: groups + description: A list of group IDs this API key belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: id api_fieldname: id - description: The firmware manifest ID + description: The ID of the API key. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 01619571f7020242ac12000600000000 + in: path + parameter_fieldname: apikey_id + pattern: '[a-f0-9]{32}' + required: true type: string - - _key: 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 - format: uri + - _key: key + api_fieldname: key + description: The API key. + entity_fieldname: key + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 type: string + - _key: last_login_time + api_fieldname: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + entity_fieldname: last_login_time + example: 1518630727688 + format: int64 + type: integer - _key: name api_fieldname: name - description: The name of the object + description: The display name for the API key. entity_fieldname: name - example: '' - maxLength: 128 + example: API key gorgon + in: body + maxLength: 100 + parameter_fieldname: name + required: false type: string - _key: object api_fieldname: object - description: The API resource entity + description: 'Entity name: always ''api-key''' entity_fieldname: object - example: firmware-manifest + enum: + - api-key type: string - - _key: timestamp - api_fieldname: timestamp - description: The firmware manifest version as a timestamp - entity_fieldname: timestamp - example: '2017-05-22T12:37:55.576563Z' - format: date-time + - _key: owner + api_fieldname: owner + description: The owner of this API key, who is the creator by default. + entity_fieldname: owner + example: 01619571e2e89242ac12000600000000 + in: body + parameter_fieldname: owner + pattern: '[a-f0-9]{32}' + required: false + type: string + - _key: status + api_fieldname: status + description: The status of the API key. + entity_fieldname: status + enum: + - ACTIVE + - INACTIVE + enum_reference: api_key_status_enum + example: ACTIVE + in: body + parameter_fieldname: status + required: false type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated + description: Last update UTC time RFC3339. entity_fieldname: updated_at - example: '2017-05-22T12:37:55.576563Z' + example: '2018-02-14T15:24:14Z' format: date-time type: string required: - - created_at - - datafile - - description - - device_class - etag - id + - key - name - object - - timestamp - - updated_at + type: object - _key: '400' - description: Bad request + description: Error in input data, for example, invalid API key name. + 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 + 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: '404' - description: Firmware manifest can't be found + description: An account ID or API key with the specified ID does not exist. + 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: firmware_manifest - return_type: firmware_manifest - summary: Get a manifest - x_deprecation: null + type: subtenant_api_key + return_type: subtenant_api_key + summary: Update API key details. + 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: - - FirmwareManifest - - FirmwareManifestPage - tags: [] -- _key: light_theme_color + - ApiKeyInfoReq + - ApiKeyInfoResp + - ApiKeyUpdateReq + - GroupSummaryList + tags: + - Tenant accounts - API keys +- _key: subtenant_dark_theme_color field_renames: [] fields: - _key: color @@ -31940,7 +49192,7 @@ entities: - error_font_color - success_font_color - warning_font_color - enum_reference: light_theme_color_reference_enum + enum_reference: subtenant_dark_theme_color_reference_enum in: path is_primary_key: true name: reference @@ -31960,68 +49212,595 @@ entities: group_id: Branding methods: - _key: delete - description: 'Resets the branding color to its light theme default. + description: 'Resets the branding color to its dark theme default. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} + 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: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: true + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: The name of the branding color. + entity_fieldname: reference + enum: &id010 + - 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 + enum_reference: subtenant_dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: delete + mode: delete + operation_id: resetAccountDarkColor + pagination: false + path: /v3/accounts/{account_id}/branding-colors/dark/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Deleted successfully. + - _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: '404' + description: Color or account 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: true + self: false + type: void + return_type: void + spec: + return_type: void + summary: Reset branding color to default. + x_deprecation: null + x_filter: {} + - _key: read + 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}/branding-colors/dark/{reference} + \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - color + - updated_at + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: true + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id010 + enum_reference: subtenant_dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: get + mode: read + operation_id: getAccountDarkColor + pagination: false + path: /v3/accounts/{account_id}/branding-colors/dark/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: subtenant_light_theme_color + group: Branding + properties: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + in: body + parameter_fieldname: color + required: false + type: string + x-nullable: true + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_color''' + entity_fieldname: object + enum: + - branding_color + external_param: true + in: body + name: object + parameter_fieldname: object + readOnly: true + required: false + schema_param: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + 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 + enum_reference: light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string + 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: '404' + description: Color or account 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: subtenant_dark_theme_color + return_type: subtenant_dark_theme_color + summary: Get dark theme branding color. + x_deprecation: null + x_filter: {} + - _key: update + additional_operations: + - 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. + + 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 + \ + + -H ''Authorization: Bearer '' \ + + -H ''content-type: application/json'' \ + + -d ''{ "color": "#f3f93e" }'' ```' drop_fields: - object - etag - type - - groups - filter - - color - - updated_at field_renames: [] fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: true + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' + in: body + parameter_fieldname: color + required: false + type: string + x-nullable: true - _key: reference _override: true api_fieldname: reference description: Color name. entity_fieldname: reference - enum: &id004 - - 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 - enum_reference: light_theme_color_reference_enum + enum: *id010 + enum_reference: subtenant_dark_theme_color_reference_enum in: path is_primary_key: true name: reference required: true type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string group_id: Branding - method: delete - mode: delete - operation_id: resetLightColor + method: put + mode: update + operation_id: setAccountDarkColor pagination: false - path: /v3/branding-colors/light/{reference} + path: /v3/accounts/{account_id}/branding-colors/dark/{reference} request_body: json request_content_type: application/json responses: - _key: '200' - description: Successful operation. + description: Color has been set successfully. schema: foreign_key: entity: subtenant_light_theme_color @@ -32073,7 +49852,7 @@ entities: - error_font_color - success_font_color - warning_font_color - enum_reference: dark_theme_color_reference_enum + enum_reference: light_theme_color_reference_enum in: path is_primary_key: true name: reference @@ -32091,56 +49870,8 @@ entities: required: false type: string 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. + - _key: '400' + description: Error in input data format. schema: properties: - _key: code @@ -32187,8 +49918,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Color not found. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -32235,172 +49966,8 @@ entities: - request_id - type type: object - return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Reset branding color to default. - x_deprecation: null - x_filter: {} - - _key: list - description: 'Retrieve the light theme branding colors. - - - **Example:** - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light \ - - -H ''Authorization: Bearer '' - - ```' - drop_fields: - - object - - etag - - type - - groups - - filter - - limit - - after - - order - - total_count - - has_more - - data - field_renames: [] - fields: - - _key: reference - _override: true - api_fieldname: reference - entity_fieldname: reference - is_primary_key: true - type: string - foreign_key: - entity: light_theme_color - group: Branding - foreign_key_priority: self - group_id: Branding - method: get - mode: list - operation_id: getLightColors - pagination: true - path: /v3/branding-colors/light - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: light_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 - - DESC - type: string - - _key: total_count - api_fieldname: total_count - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer - required: - - data - - has_more - - limit - - object - - total_count - type: object - - _key: '401' - description: Authentication failure. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -32447,8 +50014,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: Color or account not found. schema: properties: - _key: code @@ -32498,127 +50065,179 @@ entities: return_info: custom: false self: true - type: light_theme_color - return_type: paginated_response(light_theme_color) - summary: Get light theme branding colors. + type: subtenant_dark_theme_color + return_type: subtenant_dark_theme_color + summary: Updates a dark theme branding color. x_deprecation: null x_filter: {} - - _key: read - description: 'Retrieve the requested light theme branding color. + primary_key_field: reference + swagger_models: + - BrandingColor + tags: + - Tenant user interface configuration - colors +- _key: subtenant_dark_theme_image + field_renames: [] + fields: + - _key: reference + _override: true + api_fieldname: reference + description: Name of the 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 + enum_reference: subtenant_dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + readOnly: false + required: false + type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + required: false + type: string + group_id: Branding + methods: + - _key: delete + description: 'Revert an account branding image to dark theme default. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X GET https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/{reference} + 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: - object - etag - type - - groups - filter - - color - - updated_at field_renames: [] fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: true + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the branding images (icon or picture). entity_fieldname: reference - enum: *id004 - enum_reference: light_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - group_id: Branding - method: get - mode: read - operation_id: getLightColor - pagination: false - path: /v3/branding-colors/light/{reference} - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: subtenant_light_theme_color - group: Branding - properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_color''' - entity_fieldname: object - enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object - readOnly: true - required: false - schema_param: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - 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 - enum_reference: dark_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string - type: object + enum: &id011 + - 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 + enum_reference: subtenant_dark_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: post + mode: delete + operation_id: clearAccountDarkImage + pagination: false + path: /v3/accounts/{account_id}/branding-images/dark/{reference}/clear + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Image reverted successfully. - _key: '401' description: Authentication failure. schema: @@ -32716,7 +50335,7 @@ entities: - type type: object - _key: '404' - description: Color not found. + description: Unknown image reference, or account not found. schema: properties: - _key: code @@ -32766,197 +50385,147 @@ entities: return_info: custom: false self: true - type: light_theme_color - return_type: light_theme_color - summary: Get light theme branding color. + type: subtenant_dark_theme_image + return_type: subtenant_dark_theme_image + summary: Revert an image to dark theme default. x_deprecation: null x_filter: {} - - _key: update - description: 'Update light theme branding color. + - _key: read + description: 'Retrieve metadata of one account dark theme branding image. + + Note: This endpoint is restricted to administrators. **Example:** ``` - curl -X PUT https://api.us-east-1.mbedcloud.com/v3/branding-colors/light/primary + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-images/dark/{reference} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{ "color": "purple" }'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter + - static_uri + - updated_at field_renames: [] fields: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: true + in: path + name: account_id + parameter_fieldname: account_id + required: true type: string - x-nullable: true - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. entity_fieldname: reference - enum: *id004 - enum_reference: light_theme_color_reference_enum + enum: *id011 + enum_reference: subtenant_dark_theme_image_reference_enum in: path is_primary_key: true name: reference required: true type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string group_id: Branding - method: put - mode: update - operation_id: setLightColor + method: get + mode: read + operation_id: getAccountDarkImageData pagination: false - path: /v3/branding-colors/light/{reference} + path: /v3/accounts/{account_id}/branding-images/dark/{reference} request_body: json request_content_type: application/json responses: - _key: '200' - description: Color has been set successfully. + description: Successful operation. schema: foreign_key: - entity: subtenant_light_theme_color + entity: subtenant_light_theme_image group: Branding properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always ''branding_image''' entity_fieldname: object enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object + - branding_image readOnly: true - required: false - schema_param: true type: string - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. 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 - enum_reference: dark_theme_color_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 + enum_reference: light_theme_image_reference_enum in: path is_primary_key: true name: reference required: true type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string - _key: updated_at api_fieldname: updated_at description: Last update time in UTC. entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time - in: body - parameter_fieldname: updated_at readOnly: true - required: false - type: string - type: object - - _key: '400' - description: Error in input data format. - 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. @@ -33055,7 +50624,7 @@ entities: - type type: object - _key: '404' - description: Color not found. + description: Unknown image reference, or account not found. schema: properties: - _key: code @@ -33105,153 +50674,56 @@ entities: return_info: custom: false self: true - type: light_theme_color - return_type: light_theme_color - summary: Updates light theme branding color. + type: subtenant_dark_theme_image + return_type: subtenant_dark_theme_image + summary: Get metadata of a dark theme image. x_deprecation: null x_filter: {} - primary_key_field: reference - swagger_models: - - BrandingColor - - BrandingColorList - tags: - - User interface configuration - colors -- _key: light_theme_image - field_renames: [] - fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the 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 - enum_reference: light_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - readOnly: false - required: false - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Branding - methods: - - _key: delete - description: '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 '' + - _key: update + additional_operations: + - 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 + or JPEG format. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter + - static_uri + - updated_at field_renames: [] fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: true + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + - _key: image + api_fieldname: image + description: The image in PNG or JPEG format as multipart form data. + entity_fieldname: image + external_param: true + in: stream + name: image + parameter_fieldname: image + required: true + type: file - _key: reference _override: true api_fieldname: reference - description: Name of the branding images (icon or picture). + description: Name of the image. entity_fieldname: reference - enum: &id005 - - 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 - enum_reference: light_theme_image_reference_enum + enum: *id011 + enum_reference: subtenant_dark_theme_image_reference_enum in: path is_primary_key: true name: reference @@ -33259,15 +50731,149 @@ entities: type: string group_id: Branding method: post - mode: delete - operation_id: clearLightImage + mode: update + operation_id: uploadAccountDarkImageMultipart pagination: false - path: /v3/branding-images/light/{reference}/clear - request_body: json - request_content_type: application/json + path: /v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart + request_body: file + request_content_type: multipart/form-data responses: - - _key: '204' - description: Image reverted successfully. + - _key: '201' + description: Image uploaded successfully. + headers: + - _key: Content-Location + description: Location of the image metadata. + type: string + - _key: Location + description: Location of the image binary. + type: string + schema: + foreign_key: + entity: subtenant_light_theme_image + group: Branding + properties: + - _key: object + api_fieldname: object + description: 'Entity name: always ''branding_image''' + entity_fieldname: object + enum: + - branding_image + readOnly: true + type: string + - _key: reference + _override: true + api_fieldname: reference + description: Name of the image. + 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 + enum_reference: light_theme_image_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time + readOnly: true + type: string + type: object + - _key: '400' + description: Error in input data format, for example, image is 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 - _key: '401' description: Authentication failure. schema: @@ -33415,186 +51021,914 @@ entities: return_info: custom: false self: true - type: light_theme_image - return_type: light_theme_image - summary: Revert an image to light theme default. + type: subtenant_dark_theme_image + return_type: subtenant_dark_theme_image + summary: Upload a dark theme image. x_deprecation: null x_filter: {} - - _key: list - description: '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 '' + primary_key_field: reference + swagger_models: + - BrandingImage + tags: + - Tenant user interface configuration - images +- _key: subtenant_identity_provider + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _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 for the identity provider. + in: body + maxLength: 500 + parameter_fieldname: description + readOnly: false + required: false + type: string + - _key: id + api_fieldname: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity provider. + readOnly: true + required: false + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + in: body + maxLength: 100 + parameter_fieldname: name + 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. + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this empty + to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider in PEM + format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + readOnly: false + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED + enum_reference: subtenant_identity_provider_status_enum + in: body + parameter_fieldname: status + readOnly: false + 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: + - _key: create + description: 'Create a new identity provider. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - limit - - after - - order - - total_count - - has_more - - data + - id + - created_at + - updated_at + - is_default field_renames: [] fields: - - _key: reference - _override: true - api_fieldname: reference - entity_fieldname: reference - is_primary_key: true + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' + required: true type: string - foreign_key: - entity: light_theme_image - group: Branding - foreign_key_priority: self - group_id: Branding - method: get - mode: list - operation_id: getAllLightImageData - pagination: true - path: /v3/branding-images/light + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: discovery + allowEmptyValue: true + api_fieldname: discovery + 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' + entity_fieldname: discovery + external_param: true + in: query + name: discovery + parameter_fieldname: discovery + required: false + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true + 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: &id012 + - 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider in + PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: &id013 + - ACTIVE + - SUSPENDED + enum_reference: subtenant_identity_provider_status_enum + in: body + parameter_fieldname: status + required: false + type: string + group_id: Accounts + method: post + mode: create + operation_id: createAccountIdentityProvider + pagination: false + parameter_map: + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. + - _key: '201' + description: New entity created. + headers: + - _key: Content-Location + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string + - _key: Location + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string schema: foreign_key: - entity: light_theme_image - group: Branding - pagination: true + entity: identity_provider + group: Accounts properties: - - _key: after - api_fieldname: after - description: The entity ID to fetch after the given one. - entity_fieldname: after - example: 01619571f3c00242ac12000600000000 + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string - - _key: data - api_fieldname: data - description: A list of entities. - entity_fieldname: data + - _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 + type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true + 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 + required: + - etag + - id + - name + - object + - type + type: object + - _key: '400' + description: Error in input data, for example, too long name. + schema: + properties: + - _key: code + description: HTTP response code + example: 400 + format: int32 + type: integer + - _key: fields + description: Request fields which failed validation. items: - foreign_key: - entity: dark_theme_image - group: Branding properties: - - _key: object - description: 'Entity name: always ''branding_image''' - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - description: Name of the 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 - is_primary_key: true - type: string - - _key: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true + - _key: message + description: Message describing the error condition. type: string - - _key: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: name + description: Name of the field which caused the error. type: string + required: + - name + - message 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: message + description: A human readable informative explanation + example: Validation error + type: string - _key: object - api_fieldname: object - description: 'Entity name: always `list`.' - entity_fieldname: object + description: Entity name, always `error`. enum: - - list + - error 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 + - _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 - description: The total number of records, if requested. - entity_fieldname: total_count - example: 20 - format: int32 - type: integer required: - - data - - has_more - - limit + - code + - message - object - - total_count + - request_id + - type type: object - _key: '401' description: Authentication failure. @@ -33692,140 +52026,106 @@ entities: - request_id - type type: object + - _key: '404' + description: Account 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: light_theme_image - return_type: paginated_response(light_theme_image) - summary: Get metadata of all light theme images. + type: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Create a new identity provider. x_deprecation: null x_filter: {} - - _key: read - description: '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 '' + - _key: delete + description: 'Delete an identity provider by ID. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - static_uri - - updated_at field_renames: [] fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id005 - enum_reference: light_theme_image_reference_enum + - _key: account_id + api_fieldname: account_id + description: Account ID. + entity_fieldname: account_id + external_param: false in: path - is_primary_key: true - name: reference + name: account_id + parameter_fieldname: account_id required: true type: string - group_id: Branding - method: get - mode: read - operation_id: getLightImageData + - _key: id + api_fieldname: identity_provider_id + description: The ID of the identity provider to delete. + entity_fieldname: id + external_param: false + in: path + name: identity_provider_id + parameter_fieldname: identity_provider_id + required: true + type: string + group_id: Accounts + method: delete + mode: delete + operation_id: deleteAccountIdentityProvider pagination: false - path: /v3/branding-images/light/{reference} + parameter_map: + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: subtenant_light_theme_image - group: Branding - properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - enum_reference: dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - type: string - type: object + - _key: '204' + description: Deleted successfully. - _key: '401' description: Authentication failure. schema: @@ -33875,7 +52175,7 @@ entities: - type type: object - _key: '403' - description: Forbidden. + description: Forbidden, or identity provider is in use. schema: properties: - _key: code @@ -33923,7 +52223,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference. + description: An account or identity provider not found. schema: properties: - _key: code @@ -33973,192 +52273,367 @@ entities: return_info: custom: false self: true - type: light_theme_image - return_type: light_theme_image - summary: Get metadata of a light theme image. + type: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Delete an identity provider by ID. x_deprecation: null x_filter: {} - - _key: update - 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 - in PNG or JPEG format. + - _key: delete_service_provider_certificate + description: 'Delete a service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - static_uri + - created_at - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - is_default field_renames: [] fields: - - _key: image - api_fieldname: image - description: The image in PNG or JPEG format as multipart form data. - entity_fieldname: image - external_param: true - in: stream - name: image - parameter_fieldname: image + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' required: true - type: file - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id005 - enum_reference: light_theme_image_reference_enum + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 in: path - is_primary_key: true - name: reference + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' required: true type: string - group_id: Branding + group_id: Accounts method: post - mode: update - operation_id: uploadLightImageMultipart + mode: delete_service_provider_certificate + operation_id: deleteAccountSpCertificate pagination: false - path: /v3/branding-images/light/{reference}/upload-multipart - request_body: file - request_content_type: multipart/form-data + parameter_map: + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate + request_body: json + request_content_type: application/json responses: - - _key: '201' - description: Image uploaded successfully. + - _key: '200' + description: Successful operation. headers: - _key: Content-Location - description: Location of the image metadata. - type: string - - _key: Location - description: Location of the image binary. + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} type: string schema: foreign_key: - entity: subtenant_light_theme_image - group: Branding + entity: identity_provider + group: Accounts properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - enum_reference: dark_theme_image_reference_enum + - _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 + type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 in: path - is_primary_key: true - name: reference + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' required: true type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + enum: + - identity-provider type: string - type: object - - _key: '400' - description: Error in input data format, for example, image is 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: + - _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: message - description: Message describing the error condition. + - _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: Name of the field which caused the error. + description: Custom claim name for 'name'. + example: name type: string - required: - - name - - message + 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 - type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string - - _key: object - description: Entity name, always `error`. + 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false type: string - _key: type - description: Error type used to categorise the error. - example: validation_error + api_fieldname: type + description: Identity provider type. + entity_fieldname: type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true + 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 required: - - code - - message + - etag + - id + - name - object - - request_id - type type: object - _key: '401' @@ -34258,7 +52733,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference. + description: An account or identity provider not found. schema: properties: - _key: code @@ -34308,782 +52783,1589 @@ entities: return_info: custom: false self: true - type: light_theme_image - return_type: light_theme_image - summary: Upload a light theme image. + type: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Delete the service provider certificate. x_deprecation: null x_filter: {} - primary_key_field: reference - swagger_models: - - BrandingImage - - BrandingImageList - tags: - - User interface configuration - images -- _key: login_history - field_renames: [] - fields: - - _key: date - api_fieldname: date - description: UTC time RFC3339 for this login attempt. - example: '2018-02-14T17:52:07Z' - format: date-time - readOnly: true - required: false - type: string - - _key: ip_address - api_fieldname: ip_address - description: IP address of the client. - example: 127.0.0.1 - readOnly: true - required: false - type: string - - _key: success - api_fieldname: success - description: Flag indicating whether login attempt was successful or not. - example: true - readOnly: true - required: false - type: boolean - - _key: user_agent - api_fieldname: 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 - readOnly: true - required: false - type: string - group_id: Accounts - methods: [] - primary_key_field: null - swagger_models: - - LoginHistory - tags: [] -- _key: login_profile - field_renames: [] - fields: - - _key: id - _override: true - api_fieldname: id - description: ID of the identity provider. - readOnly: false - required: false - type: string - - _key: name - _override: true - api_fieldname: name - description: Name of the identity provider. - readOnly: false - required: false - type: string - group_id: Accounts - methods: [] - primary_key_field: id - swagger_models: - - LoginProfile - tags: [] -- _key: parent_account - field_renames: [] - fields: - - _key: admin_email - api_fieldname: 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}$).+\@.+ - readOnly: true - required: false - 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. - example: J. Doe - maxLength: 100 - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: The ID of the parent account. - example: 01619571dad80242ac12000600000000 - pattern: '[a-f0-9]{32}' - readOnly: true - required: false - type: string - group_id: Accounts - methods: [] - primary_key_field: id - swagger_models: - - ParentAccountInfo - tags: [] -- _key: password_policy - field_renames: [] - fields: - - _key: minimum_length - api_fieldname: minimum_length - description: Minimum length for the password. - example: '8' - maximum: 512 - minimum: 8 - readOnly: true - required: false - type: integer - group_id: Accounts - methods: [] - primary_key_field: null - swagger_models: - - PasswordPolicy - tags: [] -- _key: policy - field_renames: [] - fields: - - _key: action - api_fieldname: action - description: Comma-separated list of actions, empty string represents all actions. - example: GET - readOnly: true - required: false - type: string - - _key: allow - api_fieldname: allow - description: True or false controlling whether an action is allowed or not. - example: true - readOnly: true - required: false - type: boolean - - _key: feature - api_fieldname: feature - description: Feature name corresponding to this policy. - example: update-campaigns - readOnly: true - required: false - type: string - - _key: inherited - api_fieldname: inherited - description: Flag indicating whether this feature is inherited or overwritten - specifically. - example: false - readOnly: true - required: false - type: boolean - - _key: resource - api_fieldname: resource - description: Resource that is protected by this policy. - example: /v3/update-campaign - readOnly: true - required: false - type: string - group_id: Accounts - methods: [] - primary_key_field: null - swagger_models: - - FeaturePolicy - tags: [] -- _key: pre_shared_key - field_renames: [] - fields: - - _key: created_at - api_fieldname: 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 - readOnly: true - required: false - type: string - - _key: endpoint_name - _override: true - api_fieldname: 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 - getter_custom_method: pre_shared_key_id_getter - pattern: ^[ -~]{16,64}$ - readOnly: false - required: false - setter_custom_method: pre_shared_key_id_setter - type: string - - _key: id - _override: true - api_fieldname: id - description: The Id of the pre_shared_key, shadows the endpoint_name - getter_custom_method: pre_shared_key_id_getter - readOnly: false - required: false - setter_custom_method: pre_shared_key_id_setter - type: string - group_id: Security - methods: - - _key: create - 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```" + - _key: generate_service_provider_certificate + description: 'Generate a new service provider certificate. + + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter + - created_at + - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - is_default field_renames: [] fields: - - _key: endpoint_name - _override: true - api_fieldname: endpoint_name - entity_fieldname: endpoint_name - getter_custom_method: pre_shared_key_id_getter - readOnly: false - setter_custom_method: pre_shared_key_id_setter + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: algorithm + api_fieldname: algorithm + description: The algorithm and its key size used for generating the certificate. + Defaults to RSA2048. + entity_fieldname: algorithm + enum: + - RSA2048 + - RSA3072 + - EC224 + - EC256 + - EC384 + - EC521 + - ECDSA224 + - ECDSA256 + - ECDSA384 + - ECDSA521 + enum_reference: subtenant_identity_provider_algorithm_enum + external_param: true + in: body + name: algorithm + parameter_fieldname: algorithm + required: false + schema_param: true type: string - _key: id - _override: true api_fieldname: id - description: The Id of the pre_shared_key, shadows the endpoint_name + description: Entity ID. entity_fieldname: id - example: my-endpoint-0001 - getter_custom_method: pre_shared_key_id_getter - in: body - name: endpoint_name - pattern: ^[ -~]{16,64}$ - schema_param: true - setter_custom_method: pre_shared_key_id_setter + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true type: string - - _key: secret_hex - api_fieldname: 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. - entity_fieldname: secret_hex - example: 4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a + - _key: validity + api_fieldname: validity + description: Validity for the certificate in days. + entity_fieldname: validity external_param: true + format: int32 in: body - name: secret_hex - parameter_fieldname: secret_hex - pattern: ^(0[xX])?[0-9a-fA-F]{32,64}$ - required: true + name: validity + parameter_fieldname: validity + required: false schema_param: true - type: string - group_id: Security + type: integer + group_id: Accounts method: post - mode: create - operation_id: uploadPreSharedKey + mode: generate_service_provider_certificate + operation_id: generateAccountSpCertificate pagination: false parameter_map: - endpoint_name: id - path: /v2/device-shared-keys + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate request_body: json request_content_type: application/json responses: - - _key: '201' - description: Successfully created. + - _key: '200' + description: Successful operation. + headers: + - _key: Content-Location + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string + schema: + foreign_key: + entity: identity_provider + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true + 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 + required: + - etag + - id + - name + - object + - type + type: object - _key: '400' - description: Bad request. Contains comma-separated errors INVALID_ENDPOINT_NAME, - INVALID_SECRET_HEX, and MALFORMED_JSON_CONTENT. + description: Error in input data, for example, invalid certificate validity + value. schema: - type: string + 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. You need to read and accept the PSK license in Device - Management Portal. - - _key: '409' - description: Conflict. The PSK for the endpoint already exists and cannot be - overwritten. Contains error KEY_ALREADY_EXISTS_FOR_ENDPOINT. + description: Forbidden. schema: - type: string - return_info: - custom: false - self: true - type: pre_shared_key - return_type: pre_shared_key - summary: Upload a PSK to Pelion Device Management. - x_deprecation: null - x_filter: {} - - _key: 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 " - - ```' - drop_fields: - - object - - etag - - type - - groups - - filter - field_renames: [] - fields: - - _key: endpoint_name - _override: true - api_fieldname: endpoint_name - entity_fieldname: endpoint_name - getter_custom_method: pre_shared_key_id_getter - readOnly: false - setter_custom_method: pre_shared_key_id_setter - type: string - - _key: id - _override: true - api_fieldname: id - description: The Id of the pre_shared_key, shadows the endpoint_name - entity_fieldname: id - getter_custom_method: pre_shared_key_id_getter - in: path - name: endpoint_name - required: true - setter_custom_method: pre_shared_key_id_setter - type: string - group_id: Security - method: delete - mode: delete - operation_id: deletePreSharedKey - pagination: false - parameter_map: - endpoint_name: id - path: /v2/device-shared-keys/{endpoint_name} - request_body: json - request_content_type: application/json - responses: - - _key: '204' - description: Successfully deleted. Responds even if the endpoint does not have - an associated PSK. - - _key: '400' - description: Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME. + 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: An account or identity provider not found. schema: - type: string - - _key: '401' - description: Authentication failure. + 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: pre_shared_key - return_type: pre_shared_key - summary: Remove a PSK. + type: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Generate a new service provider certificate. x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve pre-shared keys (PSKs) with pagination. Default page size - of 50 entries. - - - **Example:** + description: 'Retrieve an array of identity providers. - - ``` - - curl -X GET https://api.us-east-1.mbedcloud.com/v2/device-shared-keys \ - - -H "Authorization: Bearer " - - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - order + - total_count - has_more - - continuation_marker - data field_renames: [] fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account. + entity_fieldname: account_id + external_param: false + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string - _key: after api_fieldname: after - description: An offset token for fetching a specific page. Provided by the server. + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 + example: 01619571f3c00242ac12000600000000 external_param: true in: query name: after parameter_fieldname: after + pattern: '[a-f0-9]{32}' required: false type: string - - _key: endpoint_name - _override: true - api_fieldname: endpoint_name - entity_fieldname: endpoint_name - getter_custom_method: pre_shared_key_id_getter - readOnly: false - setter_custom_method: pre_shared_key_id_setter - type: string - - _key: id - _override: true - api_fieldname: id - description: The Id of the pre_shared_key, shadows the endpoint_name - entity_fieldname: id - getter_custom_method: pre_shared_key_id_getter - setter_custom_method: pre_shared_key_id_setter + - _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: The number of entries per page. + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: subtenant_identity_provider_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string foreign_key: - entity: pre_shared_key - group: Security + entity: subtenant_identity_provider + group: Accounts foreign_key_priority: self - group_id: Security + group_id: Accounts method: get mode: list - operation_id: listPreSharedKeys + operation_id: getAllAccountIdentityProviders pagination: true parameter_map: - endpoint_name: id - path: /v2/device-shared-keys + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers request_body: json request_content_type: application/json responses: - _key: '200' - description: List of PSKs. + description: Successful operation. schema: foreign_key: - entity: pre_shared_key - group: Security + entity: subtenant_identity_provider + group: Accounts pagination: true properties: - _key: after api_fieldname: after - description: An offset token for current page. + description: The entity ID to retrieve after the given one. entity_fieldname: after - example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810004 - type: string - - _key: continuation_marker - api_fieldname: 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. - entity_fieldname: continuation_marker - example: 001e001000120010fac8f300487f11e8839a459edde8bd42f07fffffebf07fffffebb1219cc7862b64bbaf775dc545e274810005 + 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 - description: Array of the PSK entries. The array is empty if there are no - PSKs. + description: A list of entities. entity_fieldname: data items: foreign_key: - entity: pre_shared_key - group: Security + entity: identity_provider + group: Accounts properties: + - _key: account_id + description: The ID of the account the identity provider belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string - _key: created_at - description: The date-time (RFC3339) when this PSK was uploaded to Device - Management. - example: '2017-07-21T17:32:28.012Z' + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: endpoint_name - _override: true - 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 - getter_custom_method: pre_shared_key_id_getter - pattern: ^[ -~]{16,64}$ - readOnly: false - setter_custom_method: pre_shared_key_id_setter + - _key: description + description: Description for the identity provider. + maxLength: 500 + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: Entity ID. + example: 01619571d01d0242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_default + description: Flag indicating whether this is the global default identity + provider. + readOnly: true + type: boolean + - _key: name + description: Name of the identity provider. + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always ''identity-provider''' + 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: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave + this empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + type: object + - _key: status + description: Status of the identity provider. + enum: + - ACTIVE + - SUSPENDED + type: string + - _key: type + description: Identity provider type. + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string required: - - endpoint_name + - etag + - id + - name + - object + - type type: object - minLength: 0 type: array - _key: has_more api_fieldname: has_more - description: More results are available. + description: Flag indicating whether there are more results. entity_fieldname: has_more - example: true + example: false type: boolean - _key: limit api_fieldname: limit - description: The value of limit query parameter from the request, or default - if not specified. + 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 - description: The type of this API object is a "list". + description: 'Entity name: always `list`.' entity_fieldname: object - example: list + enum: + - list type: string - _key: order api_fieldname: order - description: Record order based on creation time. + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' entity_fieldname: order - example: DESC + enum: + - ASC + - DESC + enum_reference: identity_provider_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer required: - - object - - limit - - order - - has_more - data + - has_more + - limit + - object + - total_count + 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: '404' + description: Account 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 - - _key: '400' - description: Bad request. Contains the error as a string, either TOKEN_NOT_FOUND - or INVALID_LIMIT. return_info: custom: false self: true - type: pre_shared_key - return_type: paginated_response(pre_shared_key) - summary: List PSKs. + type: subtenant_identity_provider + return_type: paginated_response(subtenant_identity_provider) + summary: Get all identity providers. x_deprecation: null x_filter: {} - _key: read - 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 " + description: 'Retrieve an identity provider. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - created_at + - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - is_default field_renames: [] fields: - - _key: endpoint_name - _override: true - api_fieldname: 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. - entity_fieldname: endpoint_name - example: my-endpoint-0001 - getter_custom_method: pre_shared_key_id_getter - pattern: ^[ -~]{16,64}$ - readOnly: false - setter_custom_method: pre_shared_key_id_setter + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' + required: true type: string - _key: id - _override: true api_fieldname: id - description: The Id of the pre_shared_key, shadows the endpoint_name + description: Entity ID. entity_fieldname: id - getter_custom_method: pre_shared_key_id_getter + example: 01619571d01d0242ac12000600000000 in: path - name: endpoint_name + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' required: true - setter_custom_method: pre_shared_key_id_setter type: string - group_id: Security + group_id: Accounts method: get mode: read - operation_id: getPreSharedKey + operation_id: getAccountIdentityProvider pagination: false parameter_map: - endpoint_name: id - path: /v2/device-shared-keys/{endpoint_name} + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Pre-shared key for the device (does not contain secret). + description: Successful operation. schema: foreign_key: - entity: pre_shared_key - group: Security + entity: identity_provider + group: Accounts properties: - - _key: created_at - api_fieldname: created_at - description: The date-time (RFC3339) when this PSK was uploaded to Device - Management. - entity_fieldname: created_at - example: '2017-07-21T17:32:28.012Z' - format: date-time - type: string - - _key: endpoint_name - _override: true - api_fieldname: 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. - entity_fieldname: endpoint_name - example: my-endpoint-0001 - getter_custom_method: pre_shared_key_id_getter - pattern: ^[ -~]{16,64}$ - readOnly: false - setter_custom_method: pre_shared_key_id_setter + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - required: - - endpoint_name - type: object - - _key: '400' - description: Bad request. Endpoint name validation failed. Contains error INVALID_ENDPOINT_NAME. - schema: - type: string - - _key: '401' - description: Authentication failure. - - _key: '404' - description: The PSK does not exist. - return_info: - custom: false - self: true - type: pre_shared_key - return_type: pre_shared_key - summary: Get a PSK. - x_deprecation: null - x_filter: {} - primary_key_field: id - swagger_models: - - ListOfPreSharedKeysWithoutSecret - - PreSharedKey - - PreSharedKeyWithoutSecret - tags: - - PreSharedKeys -- _key: server_credentials - field_renames: [] - fields: - - _key: created_at - api_fieldname: created_at - description: Creation UTC time RFC3339. - format: date-time - readOnly: true - required: false - type: string - - _key: id - api_fieldname: id - description: Unique entity ID. - readOnly: true - required: false - type: string - - _key: server_certificate - api_fieldname: server_certificate - description: PEM-format X.509 server certificate used to validate the server certificate - received during the TLS/DTLS handshake. - readOnly: true - required: false - type: string - - _key: server_uri - api_fieldname: server_uri - description: Server URI that the client connects to. - readOnly: true - required: false - type: string - group_id: Security - methods: - - _key: get_bootstrap - additional_operations: - - notes: The information returned by this endpoint can be obtained by calling - `get_bootstrap`. - operation_id: getAllServerCredentials - description: '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 " - - ```' - drop_fields: - - object - - etag - - type - - groups - - filter - - id - - created_at - - server_certificate - - server_uri - field_renames: [] - fields: [] - group_id: Security - method: get - mode: get_bootstrap - operation_id: getBootstrapServerCredentials - pagination: false - path: /v3/server-credentials/bootstrap - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Bootstrap server credentials fetched successfully. - examples: - - _key: Success - created_at: '2017-12-11T14:22:20.009Z' - etag: '1' - id: 015fee4431fd38c98640fbfb00000000 - object: server-credentials - server_certificate: '-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\n-----END - CERTIFICATE-----' - server_uri: coaps://coap.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000 - schema: - foreign_key: - entity: server_credentials - group: Security - properties: - _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 type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string - _key: etag api_fieldname: etag description: API resource entity version. entity_fieldname: etag + example: '1' type: string - _key: id api_fieldname: id - description: Unique entity ID. + description: Entity ID. entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''identity-provider''' + entity_fieldname: object + 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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false + type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true + 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 + required: + - etag + - id + - name + - object + - 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 - api_fieldname: object - description: 'Entity name: always `server-credentials`.' - entity_fieldname: object + description: Entity name, always `error`. + enum: + - error type: string - - _key: server_certificate - api_fieldname: server_certificate - description: PEM-format X.509 server certificate used to validate the server - certificate received during the TLS/DTLS handshake. - entity_fieldname: server_certificate + - _key: request_id + description: ID of the request. + example: 0161991d63150242ac12000600000000 type: string - - _key: server_uri - api_fieldname: server_uri - description: Server URI that the client connects to. - entity_fieldname: server_uri + - _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: '400' - description: Bad request. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -35130,15 +54412,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Invalid access token. - examples: - - _key: Authentication Error - code: 401 - message: Invalid access token. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: invalid_auth + - _key: '404' + description: An account or identity provider not found. schema: properties: - _key: code @@ -35188,100 +54463,371 @@ entities: return_info: custom: false self: true - type: server_credentials - return_type: server_credentials - summary: Fetch bootstrap server credentials. + type: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Get an identity provider. x_deprecation: null x_filter: {} - - _key: get_lwm2m - additional_operations: - - notes: The information returned by this endpoint can be obtained by calling - `get_lwm2m`. - operation_id: getAllServerCredentials - description: '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 " + - _key: refresh_tokens + description: 'Refresh an OIDC IdP''s signing keys. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - id - created_at - - server_certificate - - server_uri + - updated_at + - name + - description + - status + - saml2_attributes + - oidc_attributes + - is_default field_renames: [] - fields: [] - group_id: Security - method: get - mode: get_lwm2m - operation_id: getL2M2MServerCredentials + fields: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + in: path + parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string + group_id: Accounts + method: post + mode: refresh_tokens + operation_id: refreshAccountJwks pagination: false - path: /v3/server-credentials/lwm2m + parameter_map: + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks request_body: json request_content_type: application/json responses: - _key: '200' - description: LwM2M server credentials fetched successfully. - examples: - - _key: Success - created_at: '2017-12-11T14:22:20.009Z' - etag: '1' - id: 015fee4431fd38c98640fbfb00000000 - object: server-credentials - server_certificate: '-----BEGIN CERTIFICATE-----\nMIICNTCCAdugAwIBAgIQXCeldn1YhYpDkaBhq8+mWTAKBggqhkjOPQQDAjByMQsw\nCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNVBAcTCUNh\nbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIEludGVncmF0\naW9uIEJvb3RzdHJhcENBMCAXDTE3MDUxNTE5NDkxMVoYDzIwNTIwNTE1MTk1OTEw\nWjByMQswCQYDVQQGEwJHQjEXMBUGA1UECBMOQ2FtYnJpZGdlc2hpcmUxEjAQBgNV\nBAcTCUNhbWJyaWRnZTEQMA4GA1UEChMHQVJNIEx0ZDEkMCIGA1UEAxMbQVJNIElu\ndGVncmF0aW9uIEJvb3RzdHJhcENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE\ni3yGw4hU5l/gV04brCmC6n2RAGOnSgW8VMVxJzMZGy76Qfh6mgxd/LM3AZnFyb54\nWx3ssBod3ORvVwT0Osqo0qNRME8wCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMB\nAf8wHQYDVR0OBBYEFBPvafpiPwCG9AW4tuay8dtpELQ5MBAGCSsGAQQBgjcVAQQD\nAgEAMAoGCCqGSM49BAMCA0gAMEUCIQCiUIgPVegmSeb1cYYzKQVM+f0fFJiShdlc\nSAKewnmoWQIgPv48oL/TDxWDVrzy+hYmesFoqryRPGlENvl0oYJ2em4=\n-----END - CERTIFICATE-----' - server_uri: coaps://mds.us-east-1.mbedcloud.com:5684?aid=015843e32ec902420a015e0700000000 + description: Successful operation. + headers: + - _key: Content-Location + description: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} + type: string schema: foreign_key: - entity: server_credentials - group: Security + entity: identity_provider + group: Accounts properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account the identity provider belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string - _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 type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string - _key: etag api_fieldname: etag description: API resource entity version. entity_fieldname: etag + example: '1' type: string - _key: id api_fieldname: id - description: Unique entity ID. + description: Entity ID. entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean + - _key: name + api_fieldname: name + description: Name of the identity provider. + entity_fieldname: name + in: body + maxLength: 100 + parameter_fieldname: name + required: true type: string - _key: object api_fieldname: object - description: 'Entity name: always `server-credentials`.' + description: 'Entity name: always ''identity-provider''' entity_fieldname: object + enum: + - identity-provider type: string - - _key: server_certificate - api_fieldname: server_certificate - description: PEM-format X.509 server certificate used to validate the server - certificate received during the TLS/DTLS handshake. - entity_fieldname: server_certificate + - _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. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object + - _key: status + api_fieldname: status + description: Status of the identity provider. + entity_fieldname: status + enum: + - ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum + in: body + parameter_fieldname: status + required: false type: string - - _key: server_uri - api_fieldname: server_uri - description: Server URI that the client connects to. - entity_fieldname: server_uri + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true 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 + required: + - etag + - id + - name + - object + - type type: object - _key: '400' - description: Bad request. + description: Not an OIDC IdP or JWKS URI is unspecified. schema: properties: - _key: code @@ -35329,14 +54875,7 @@ entities: - type type: object - _key: '401' - description: Invalid access token. - examples: - - _key: Authentication Error - code: 401 - message: Invalid access token. - object: error - request_id: 015fee4431fd38c98640fbfb00000000 - type: invalid_auth + description: Authentication failure. schema: properties: - _key: code @@ -35383,150 +54922,127 @@ entities: - request_id - type type: object - return_info: - custom: false - self: true - type: server_credentials - return_type: server_credentials - summary: Fetch LwM2M server credentials. - x_deprecation: null - x_filter: {} - primary_key_field: id - swagger_models: - - ServerCredentialsResponseData - tags: - - Service security - server credentials -- _key: subtenant_api_key - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - readOnly: false - required: true - type: string - - _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: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 - readOnly: true - required: false - type: integer - - _key: id - api_fieldname: id - description: The ID of the API key. - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' - readOnly: false - required: true - type: string - - _key: key - api_fieldname: key - description: The API key. - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - readOnly: true - required: false - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - example: 1518630727688 - format: int64 - readOnly: true - required: false - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - example: API key gorgon - in: body - maxLength: 100 - parameter_fieldname: name - readOnly: false - required: true - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - example: 01619571e2e89242ac12000600000000 - in: body - parameter_fieldname: owner - pattern: '[a-f0-9]{32}' - readOnly: false - required: false - type: string - - _key: status - api_fieldname: status - description: The status of the API key. - enum: - - ACTIVE - - INACTIVE - enum_reference: subtenant_api_key_status_enum - example: ACTIVE - in: body - parameter_fieldname: status - readOnly: false - 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: - - _key: create - 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. - - - **Example:** - - ``` - - curl -X POST https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/api-keys - \ - - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{"name": "MyKey1"}'' + - _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: '404' + description: An account or identity provider 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: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Refresh the OIDC signing keys. + x_deprecation: null + x_filter: {} + - _key: update + description: 'Update an existing identity provider. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter - - id - created_at - updated_at - - key - - creation_time - - last_login_time + - is_default field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: The ID of the account. + description: The ID of the account the identity provider belongs to. entity_fieldname: account_id example: 01619571e2e90242ac12000600000000 in: path @@ -35534,61 +55050,270 @@ entities: pattern: '[a-f0-9]{32}' required: true type: string + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string + - _key: discovery + allowEmptyValue: true + api_fieldname: discovery + 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' + entity_fieldname: discovery + external_param: true + in: query + name: discovery + parameter_fieldname: discovery + required: false + type: boolean + - _key: id + api_fieldname: id + description: Entity ID. + entity_fieldname: id + example: 01619571d01d0242ac12000600000000 + in: path + parameter_fieldname: identity_provider_id + pattern: '[a-f0-9]{32}' + required: true + type: string - _key: name api_fieldname: name - description: The display name for the API key. + description: Name of the identity provider. entity_fieldname: name - example: API key gorgon in: body maxLength: 100 parameter_fieldname: name required: true type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 + - _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: owner - pattern: '[a-f0-9]{32}' + 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: *id012 + 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: string + type: object + - _key: saml2_attributes + api_fieldname: saml2_attributes + description: Represents SAML2 specific attributes in responses. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider in + PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object - _key: status api_fieldname: status - description: The status of the API key. + description: Status of the identity provider. entity_fieldname: status - enum: &id006 - - ACTIVE - - INACTIVE - enum_reference: subtenant_api_key_status_enum - example: ACTIVE + enum: *id013 + enum_reference: subtenant_identity_provider_status_enum in: body parameter_fieldname: status required: false type: string group_id: Accounts - method: post - mode: create - operation_id: createAccountApiKey + method: put + mode: update + operation_id: updateAccountIdentityProvider pagination: false parameter_map: - apikey_id: id - path: /v3/accounts/{account_id}/api-keys + identity_provider_id: id + path: /v3/accounts/{account_id}/identity-providers/{identity_provider_id} request_body: json request_content_type: application/json responses: - - _key: '201' - description: New entity created. + - _key: '200' + description: Successful operation. schema: - description: Represents an API key in Device Management. foreign_key: - entity: api_key + entity: identity_provider group: Accounts properties: - _key: account_id api_fieldname: account_id - description: The ID of the account. + description: The ID of the account the identity provider belongs to. entity_fieldname: account_id example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' @@ -35600,60 +55325,42 @@ entities: example: '2018-02-13T09:35:20Z' format: date-time type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 - type: integer + - _key: description + api_fieldname: description + description: Description for the identity provider. + entity_fieldname: description + in: body + maxLength: 500 + parameter_fieldname: description + required: false + type: string - _key: etag api_fieldname: etag description: API resource entity version. entity_fieldname: etag example: '1' type: string - - _key: groups - api_fieldname: groups - description: A list of group IDs this API key belongs to. - entity_fieldname: groups - external_param: true - in: body - items: - type: string - name: groups - parameter_fieldname: groups - required: false - schema_param: true - type: array - _key: id api_fieldname: id - description: The ID of the API key. + description: Entity ID. entity_fieldname: id - example: 01619571f7020242ac12000600000000 + example: 01619571d01d0242ac12000600000000 in: path - parameter_fieldname: apikey_id + parameter_fieldname: identity_provider_id pattern: '[a-f0-9]{32}' required: true type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer + - _key: is_default + api_fieldname: is_default + description: Flag indicating whether this is the global default identity + provider. + entity_fieldname: is_default + readOnly: true + type: boolean - _key: name api_fieldname: name - description: The display name for the API key. + description: Name of the identity provider. entity_fieldname: name - example: API key gorgon in: body maxLength: 100 parameter_fieldname: name @@ -35661,34 +55368,232 @@ entities: type: string - _key: object api_fieldname: object - description: 'Entity name: always ''api-key''' + description: 'Entity name: always ''identity-provider''' entity_fieldname: object enum: - - api-key + - identity-provider type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 + - _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: owner - pattern: '[a-f0-9]{32}' + 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: string + type: object + - _key: saml2_attributes + api_fieldname: saml2_attributes + description: Represents SAML2 specific attributes in responses. + entity_fieldname: saml2_attributes + in: body + parameter_fieldname: saml2_attributes + properties: + - _key: assertion_endpoint + description: URL of the service provider's assertion endpoint. Leave this + empty to use the default assertion endpoint. + type: string + x-nullable: true + - _key: idp_entity_id + description: Entity ID of the identity provider. + type: string + x-nullable: true + - _key: idp_x509_certs + description: List of public X509 certificates of the identity provider + in PEM format. + items: + type: string + type: array + x-nullable: true + - _key: slo_endpoint + description: URL of the identity provider's SLO endpoint. + type: string + x-nullable: true + - _key: sp_entity_id + description: Entity ID of the service provider. + type: string + x-nullable: true + - _key: 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 + x-nullable: true + - _key: sso_endpoint + description: URL of the identity provider's SSO endpoint. + type: string + x-nullable: true + required: false + type: object - _key: status api_fieldname: status - description: The status of the API key. + description: Status of the identity provider. entity_fieldname: status enum: - ACTIVE - - INACTIVE - enum_reference: api_key_status_enum - example: ACTIVE + - SUSPENDED + enum_reference: identity_provider_status_enum in: body parameter_fieldname: status required: false type: string + - _key: type + api_fieldname: type + description: Identity provider type. + entity_fieldname: type + enum: + - NATIVE + - MBED + - SAML2 + - OIDC + enum_reference: identity_provider_type_enum + in: body + parameter_fieldname: type + required: true + type: string - _key: updated_at api_fieldname: updated_at description: Last update UTC time RFC3339. @@ -35699,12 +55604,12 @@ entities: required: - etag - id - - key - name - object + - type type: object - _key: '400' - description: Error in input data, for example, missing display name. + description: Error in input data, for example, missing name. schema: properties: - _key: code @@ -35848,7 +55753,7 @@ entities: - type type: object - _key: '404' - description: An account with the given ID does not exist. + description: An account or identity provider not found. schema: properties: - _key: code @@ -35898,61 +55803,140 @@ entities: return_info: custom: false self: true - type: subtenant_api_key - return_type: subtenant_api_key - summary: Create a new API key. + type: subtenant_identity_provider + return_type: subtenant_identity_provider + summary: Update an existing identity provider. x_deprecation: null x_filter: {} + primary_key_field: id + swagger_models: + - CertificateGenerationReq + - IdentityProviderCreationReq + - IdentityProviderInfo + - IdentityProviderList + - IdentityProviderUpdateReq + tags: + - Tenant accounts - identity providers +- _key: subtenant_light_theme_color + field_renames: [] + fields: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + example: '#f3f93e' + in: body + parameter_fieldname: color + readOnly: false + required: false + type: string + x-nullable: true + - _key: reference + _override: true + api_fieldname: reference + 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 + enum_reference: subtenant_light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + readOnly: false + required: false + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + example: '2018-02-14T15:24:14Z' + format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false + type: string + group_id: Branding + methods: - _key: delete - description: 'Delete an API key. + 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} + 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: - object - etag - type - - groups - filter field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: account_id - external_param: false + external_param: true in: path name: account_id parameter_fieldname: account_id required: true type: string - - _key: id - api_fieldname: apikey_id - description: The ID of the API key to delete. - entity_fieldname: id - external_param: false + - _key: reference + _override: true + api_fieldname: reference + description: The name of the branding color. + entity_fieldname: reference + enum: &id014 + - 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 + enum_reference: subtenant_light_theme_color_reference_enum in: path - name: apikey_id - parameter_fieldname: apikey_id + is_primary_key: true + name: reference required: true type: string - group_id: Accounts + group_id: Branding method: delete mode: delete - operation_id: deleteAccountApiKey + operation_id: resetAccountLightColor pagination: false - parameter_map: - apikey_id: id - path: /v3/accounts/{account_id}/api-keys/{apikey_id} + path: /v3/accounts/{account_id}/branding-colors/light/{reference} request_body: json request_content_type: application/json responses: @@ -36055,7 +56039,7 @@ entities: - type type: object - _key: '404' - description: An account or API key with the specified ID does not exist. + description: Color or account not found. schema: properties: - _key: code @@ -36103,187 +56087,140 @@ entities: - type type: object return_info: - custom: false - self: true - type: subtenant_api_key - return_type: subtenant_api_key - summary: Delete the API key. + custom: true + self: false + type: void + return_type: void + spec: + return_type: void + summary: Reset branding color to default. x_deprecation: null 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 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}/branding-colors/light/{reference} + + -H ''Authorization: Bearer '' + + ```' drop_fields: - object - etag - type - - groups - filter - - created_at + - color - updated_at - - key - - name - - owner - - status - - creation_time - - last_login_time field_renames: [] fields: - _key: account_id api_fieldname: account_id description: The ID of the account. entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 + external_param: true in: path + name: account_id parameter_fieldname: account_id - pattern: '[a-f0-9]{32}' - required: true - type: string - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' required: true type: string - group_id: Accounts - method: get - mode: read - operation_id: getAccountApiKey - pagination: false - parameter_map: - apikey_id: id - path: /v3/accounts/{account_id}/api-keys/{apikey_id} - request_body: json - request_content_type: application/json - responses: - - _key: '200' - description: Successful operation. - schema: - description: Represents an API key in Device Management. - foreign_key: - entity: api_key - group: Accounts - properties: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _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 - type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 - type: integer - - _key: etag - api_fieldname: etag - description: API resource entity version. - entity_fieldname: etag - example: '1' - type: string - - _key: groups - api_fieldname: groups - description: A list of group IDs this API key belongs to. - entity_fieldname: groups - external_param: true - in: body - items: - type: string - name: groups - parameter_fieldname: groups - required: false - schema_param: true - type: array - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' - required: true - type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id014 + enum_reference: subtenant_light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + group_id: Branding + method: get + mode: read + operation_id: getAccountLightColor + pagination: false + path: /v3/accounts/{account_id}/branding-colors/light/{reference} + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: subtenant_dark_theme_color + group: Branding + properties: + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' in: body - maxLength: 100 - parameter_fieldname: name - required: true + parameter_fieldname: color + required: false type: string + x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''api-key''' + description: 'Entity name: always ''branding_color''' entity_fieldname: object enum: - - api-key - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 + - branding_color + external_param: true in: body - parameter_fieldname: owner - pattern: '[a-f0-9]{32}' + name: object + parameter_fieldname: object + readOnly: true required: false + schema_param: true type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference enum: - - ACTIVE - - INACTIVE - enum_reference: api_key_status_enum - example: ACTIVE - in: body - parameter_fieldname: status - required: false + - 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 + enum_reference: subtenant_dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true type: string - _key: updated_at api_fieldname: updated_at - description: Last update UTC time RFC3339. + description: Last update time in UTC. entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false type: string - required: - - etag - - id - - key - - name - - object type: object - _key: '401' description: Authentication failure. @@ -36382,7 +56319,7 @@ entities: - type type: object - _key: '404' - description: An account or API key with the specified ID does not exist. + description: Color or account not found. schema: properties: - _key: code @@ -36432,231 +56369,167 @@ entities: return_info: custom: false self: true - type: subtenant_api_key - return_type: subtenant_api_key - summary: Get API key details. + type: subtenant_light_theme_color + return_type: subtenant_light_theme_color + summary: Get light theme branding color. x_deprecation: null x_filter: {} - _key: update - description: 'Update API key details. + additional_operations: + - 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. + + Note: 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} + 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 ''{"name": "TestApiKey25"}'' + -d ''{ "color": "purple" }'' ```' drop_fields: - object - etag - type - - groups - filter - - created_at - - updated_at - - key - - creation_time - - last_login_time field_renames: [] fields: - _key: account_id api_fieldname: account_id description: The ID of the account. entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 + external_param: true in: path + name: account_id parameter_fieldname: account_id - pattern: '[a-f0-9]{32}' - required: true - type: string - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' - required: true - type: string - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - in: body - maxLength: 100 - parameter_fieldname: name required: true type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' in: body - parameter_fieldname: owner - pattern: '[a-f0-9]{32}' + parameter_fieldname: color required: false type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status - enum: *id006 - enum_reference: subtenant_api_key_status_enum - example: ACTIVE + x-nullable: true + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference + enum: *id014 + enum_reference: subtenant_light_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true + type: string + - _key: updated_at + api_fieldname: updated_at + description: Last update time in UTC. + entity_fieldname: updated_at + example: '2018-02-14T15:24:14Z' + format: date-time in: body - parameter_fieldname: status + parameter_fieldname: updated_at + readOnly: true required: false type: string - group_id: Accounts + group_id: Branding method: put mode: update - operation_id: updateAccountApiKey + operation_id: setAccountLightColor pagination: false - parameter_map: - apikey_id: id - path: /v3/accounts/{account_id}/api-keys/{apikey_id} + path: /v3/accounts/{account_id}/branding-colors/light/{reference} request_body: json request_content_type: application/json responses: - _key: '200' - description: Successful operation. + description: Color set successfully. schema: - description: Represents an API key in Device Management. foreign_key: - entity: api_key - group: Accounts + entity: subtenant_dark_theme_color + group: Branding properties: - - _key: account_id - api_fieldname: account_id - description: The ID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _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 - type: string - - _key: creation_time - api_fieldname: creation_time - description: The timestamp of the API key creation in the storage, in milliseconds. - entity_fieldname: creation_time - example: 1518630727683 - format: int64 - type: integer - - _key: etag - api_fieldname: etag - description: API resource entity version. - entity_fieldname: etag - example: '1' - type: string - - _key: groups - api_fieldname: groups - description: A list of group IDs this API key belongs to. - entity_fieldname: groups - external_param: true + - _key: color + api_fieldname: color + description: The color given as name (purple) or as a hex code. + entity_fieldname: color + example: '#f3f93e' in: body - items: - type: string - name: groups - parameter_fieldname: groups + parameter_fieldname: color required: false - schema_param: true - type: array - - _key: id - api_fieldname: id - description: The ID of the API key. - entity_fieldname: id - example: 01619571f7020242ac12000600000000 - in: path - parameter_fieldname: apikey_id - pattern: '[a-f0-9]{32}' - required: true - type: string - - _key: key - api_fieldname: key - description: The API key. - entity_fieldname: key - example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 - type: string - - _key: last_login_time - api_fieldname: last_login_time - description: The timestamp of the latest API key usage, in milliseconds. - entity_fieldname: last_login_time - example: 1518630727688 - format: int64 - type: integer - - _key: name - api_fieldname: name - description: The display name for the API key. - entity_fieldname: name - example: API key gorgon - in: body - maxLength: 100 - parameter_fieldname: name - required: true type: string + x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''api-key''' + description: 'Entity name: always ''branding_color''' entity_fieldname: object enum: - - api-key - type: string - - _key: owner - api_fieldname: owner - description: The owner of this API key, who is the creator by default. - entity_fieldname: owner - example: 01619571e2e89242ac12000600000000 + - branding_color + external_param: true in: body - parameter_fieldname: owner - pattern: '[a-f0-9]{32}' + name: object + parameter_fieldname: object + readOnly: true required: false + schema_param: true type: string - - _key: status - api_fieldname: status - description: The status of the API key. - entity_fieldname: status + - _key: reference + _override: true + api_fieldname: reference + description: Color name. + entity_fieldname: reference enum: - - ACTIVE - - INACTIVE - enum_reference: api_key_status_enum - example: ACTIVE - in: body - parameter_fieldname: status - required: false + - 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 + enum_reference: subtenant_dark_theme_color_reference_enum + in: path + is_primary_key: true + name: reference + required: true type: string - _key: updated_at api_fieldname: updated_at - description: Last update UTC time RFC3339. + description: Last update time in UTC. entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time + in: body + parameter_fieldname: updated_at + readOnly: true + required: false type: string - required: - - etag - - id - - key - - name - - object type: object - _key: '400' - description: Error in input data, for example, missing display name. + description: Error in input data format. schema: properties: - _key: code @@ -36800,7 +56673,7 @@ entities: - type type: object - _key: '404' - description: An account ID or API key with the specified ID does not exist. + description: Color or account not found. schema: properties: - _key: code @@ -36850,99 +56723,110 @@ entities: return_info: custom: false self: true - type: subtenant_api_key - return_type: subtenant_api_key - summary: Update API key details. + type: subtenant_light_theme_color + return_type: subtenant_light_theme_color + summary: Updates light theme branding color. x_deprecation: null x_filter: {} - primary_key_field: id + primary_key_field: reference swagger_models: - - ApiKeyInfoReq - - ApiKeyInfoResp - - ApiKeyUpdateReq + - BrandingColor tags: - - Tenant accounts - API keys -- _key: subtenant_dark_theme_color + - Tenant user interface configuration - colors +- _key: subtenant_light_theme_image field_renames: [] fields: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - example: '#f3f93e' - in: body - parameter_fieldname: color - readOnly: false - required: false - type: string - x-nullable: true - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. 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 - enum_reference: subtenant_dark_theme_color_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 + enum_reference: subtenant_light_theme_image_reference_enum in: path is_primary_key: true name: reference readOnly: false required: false type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + required: false + type: string - _key: updated_at api_fieldname: updated_at description: Last update time in UTC. example: '2018-02-14T15:24:14Z' format: date-time - in: body - parameter_fieldname: updated_at readOnly: true required: false type: string group_id: Branding methods: - _key: delete - description: 'Resets the branding color of a tenant account to its dark theme - default. + description: 'Revert an account branding image to light theme default. + Note: This endpoint is restricted to administrators. - **Example:** - ``` + **Example:** - curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/branding-colors/dark/{reference} + ```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: - object - etag - type - - groups - filter - - color - - updated_at field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: account_id external_param: true in: path @@ -36953,111 +56837,63 @@ entities: - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the branding images (icon or picture). entity_fieldname: reference - enum: &id007 - - 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 - enum_reference: subtenant_dark_theme_color_reference_enum + enum: &id015 + - 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 + enum_reference: subtenant_light_theme_image_reference_enum in: path is_primary_key: true name: reference required: true type: string group_id: Branding - method: delete + method: post mode: delete - operation_id: resetAccountDarkColor + operation_id: clearAccountLightImage pagination: false - path: /v3/accounts/{account_id}/branding-colors/dark/{reference} + path: /v3/accounts/{account_id}/branding-images/light/{reference}/clear request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: subtenant_light_theme_color - group: Branding - properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_color''' - entity_fieldname: object - enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object - readOnly: true - required: false - schema_param: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - 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 - enum_reference: light_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string - type: object + - _key: '204' + description: Image reverted successfully. - _key: '401' description: Authentication failure. schema: @@ -37155,7 +56991,7 @@ entities: - type type: object - _key: '404' - description: Color or account not found. + description: Unknown image reference, or account not found. schema: properties: - _key: code @@ -37203,32 +57039,41 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Reset branding color to default. + custom: false + self: true + type: subtenant_light_theme_image + return_type: subtenant_light_theme_image + summary: Revert an image to light theme default. x_deprecation: null x_filter: {} - _key: read - 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 metadata for one account light theme branding image. + + Note: 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 '' + + ```' drop_fields: - object - etag - type - - groups - filter - - color + - static_uri - updated_at field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: account_id external_param: true in: path @@ -37239,10 +57084,10 @@ entities: - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. entity_fieldname: reference - enum: *id007 - enum_reference: subtenant_dark_theme_color_reference_enum + enum: *id015 + enum_reference: subtenant_light_theme_image_reference_enum in: path is_primary_key: true name: reference @@ -37251,9 +57096,9 @@ entities: group_id: Branding method: get mode: read - operation_id: getAccountDarkColor + operation_id: getAccountLightImageData pagination: false - path: /v3/accounts/{account_id}/branding-colors/dark/{reference} + path: /v3/accounts/{account_id}/branding-images/light/{reference} request_body: json request_content_type: application/json responses: @@ -37261,71 +57106,81 @@ entities: description: Successful operation. schema: foreign_key: - entity: subtenant_light_theme_color + entity: subtenant_dark_theme_image group: Branding properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always ''branding_image''' entity_fieldname: object enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object + - branding_image readOnly: true - required: false - schema_param: true type: string - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. 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 - enum_reference: light_theme_color_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 + enum_reference: subtenant_dark_theme_image_reference_enum in: path is_primary_key: true name: reference required: true type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string - _key: updated_at api_fieldname: updated_at description: Last update time in UTC. entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time - in: body - parameter_fieldname: updated_at readOnly: true - required: false type: string type: object - _key: '401' @@ -37425,7 +57280,7 @@ entities: - type type: object - _key: '404' - description: Color or account not found. + description: Unknown image reference, or account not found. schema: properties: - _key: code @@ -37475,40 +57330,31 @@ entities: return_info: custom: false self: true - type: subtenant_dark_theme_color - return_type: subtenant_dark_theme_color - summary: Get dark theme branding color. + type: subtenant_light_theme_image + return_type: subtenant_light_theme_image + summary: Get metadata of a light theme image. x_deprecation: null x_filter: {} - _key: update - description: '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 '' \ - - -H ''content-type: application/json'' \ - - -d ''{ "color": "#f3f93e" }'' + 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. - ```' + Note: This endpoint is restricted to administrators.' drop_fields: - object - etag - type - - groups - filter + - static_uri + - updated_at field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account. entity_fieldname: account_id external_param: true in: path @@ -37516,121 +57362,127 @@ entities: parameter_fieldname: account_id required: true type: string - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true + - _key: image + api_fieldname: image + description: The image in PNG or JPEG format as multipart form data. + entity_fieldname: image + external_param: true + in: stream + name: image + parameter_fieldname: image + required: true + type: file - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. entity_fieldname: reference - enum: *id007 - enum_reference: subtenant_dark_theme_color_reference_enum + enum: *id015 + enum_reference: subtenant_light_theme_image_reference_enum in: path is_primary_key: true name: reference required: true type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string group_id: Branding - method: put + method: post mode: update - operation_id: setAccountDarkColor + operation_id: uploadAccountLightImageMultipart pagination: false - path: /v3/accounts/{account_id}/branding-colors/dark/{reference} - request_body: json - request_content_type: application/json + path: /v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart + request_body: file + request_content_type: multipart/form-data responses: - - _key: '200' - description: Color has been set successfully. + - _key: '201' + description: Image uploaded successfully. + headers: + - _key: Content-Location + description: Location of the image metadata. + type: string + - _key: Location + description: Location of the image binary. + type: string schema: foreign_key: - entity: subtenant_light_theme_color + entity: subtenant_dark_theme_image group: Branding properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always ''branding_image''' entity_fieldname: object enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object + - branding_image readOnly: true - required: false - schema_param: true type: string - _key: reference _override: true api_fieldname: reference - description: Color name. + description: Name of the image. 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 - enum_reference: light_theme_color_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 + enum_reference: subtenant_dark_theme_image_reference_enum in: path is_primary_key: true name: reference required: true type: string + - _key: static_uri + api_fieldname: static_uri + description: The static link to the image. + entity_fieldname: static_uri + example: https://static.mbed.com/123456789.jpg + format: uri + readOnly: true + type: string - _key: updated_at api_fieldname: updated_at description: Last update time in UTC. entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time - in: body - parameter_fieldname: updated_at readOnly: true - required: false type: string type: object - _key: '400' - description: Error in input data format. + description: Error in input data format, for example, image is too large. schema: properties: - _key: code @@ -37774,7 +57626,7 @@ entities: - type type: object - _key: '404' - description: Color or account not found. + description: Unknown image reference. schema: properties: - _key: code @@ -37824,178 +57676,365 @@ entities: return_info: custom: false self: true - type: subtenant_dark_theme_color - return_type: subtenant_dark_theme_color - summary: Updates a dark theme branding color. + type: subtenant_light_theme_image + return_type: subtenant_light_theme_image + summary: Upload a light theme image. x_deprecation: null x_filter: {} primary_key_field: reference swagger_models: - - BrandingColor + - BrandingImage tags: - - Tenant user interface configuration - colors -- _key: subtenant_dark_theme_image + - Tenant user interface configuration - images +- _key: subtenant_policy_group field_renames: [] fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the 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 - enum_reference: subtenant_dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' readOnly: false - required: false + required: true type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + example: 0 + format: int32 + 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. + example: '2018-02-13T09:35:20Z' + format: date-time readOnly: true required: false type: string + - _key: id + api_fieldname: id + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + in: path + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' + readOnly: false + required: true + type: string + - _key: name + api_fieldname: name + description: The name of the group. + example: Administrators + in: body + maxLength: 100 + parameter_fieldname: name + readOnly: false + required: true + type: string - _key: updated_at api_fieldname: updated_at - description: Last update time in UTC. + description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time readOnly: true required: false type: string - group_id: Branding + - _key: user_count + api_fieldname: user_count + description: The number of users in this group. + example: 1 + format: int32 + readOnly: true + required: false + type: integer + group_id: Accounts methods: - - _key: delete - description: 'Revert an account branding image to dark theme default. + - _key: api_keys + description: 'Retrieve an array of API keys associated with a policy 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/dark/{reference}/clear + 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: - object - etag - type - - groups - filter + - total_count + - has_more + - data field_renames: [] fields: - _key: account_id api_fieldname: account_id description: Account ID. entity_fieldname: account_id - external_param: true + external_param: false in: path name: account_id parameter_fieldname: account_id required: true type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the branding images (icon or picture). - entity_fieldname: reference - enum: &id008 - - 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 - enum_reference: subtenant_dark_theme_image_reference_enum + - _key: after + api_fieldname: after + 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: id + api_fieldname: group_id + description: The ID of the group to retrieve API keys for. + entity_fieldname: id + external_param: false in: path - is_primary_key: true - name: reference + name: group_id + parameter_fieldname: group_id required: true type: string - group_id: Branding - method: post - mode: delete - operation_id: clearAccountDarkImage - pagination: false - path: /v3/accounts/{account_id}/branding-images/dark/{reference}/clear + - _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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: subtenant_policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: subtenant_api_key + group_id: Accounts + method: get + mode: api_keys + operation_id: getApiKeysOfAccountGroup + pagination: true + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups/{group_id}/api-keys request_body: json request_content_type: application/json responses: - - _key: '204' - description: Image reverted successfully. + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: api_key + group: Accounts + pagination: true + properties: + - _key: after + api_fieldname: after + 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 + description: A list of entities. + entity_fieldname: data + items: + description: Represents an API key in Device Management. + foreign_key: + entity: api_key + group: Accounts + properties: + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: created_at + description: Creation UTC time RFC3339. + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: creation_time + description: The timestamp of the API key creation in the storage, in + milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: groups + description: A list of group IDs this API key belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the API key. + example: 01619571f7020242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: key + description: The API key. + example: ak_1MDE2MTk1NzFmNmU4MDI0MmFjMTIwMDA2MDAwMDAwMDA01619571f7020242ac12000600000000 + type: string + - _key: last_login_time + description: The timestamp of the latest API key usage, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: name + description: The display name for the API key. + example: API key gorgon + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always ''api-key''' + enum: + - api-key + type: string + - _key: owner + description: The owner of this API key, who is the creator by default. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: status + description: The status of the API key. + enum: + - ACTIVE + - INACTIVE + example: ACTIVE + type: string + - _key: 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 + 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 + 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 + description: 'Entity name: always `list`.' + entity_fieldname: object + enum: + - list + type: string + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object - _key: '401' description: Authentication failure. schema: @@ -38093,7 +58132,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference, or account not found. + description: An account or group with that ID does not exist. schema: properties: - _key: code @@ -38142,246 +58181,211 @@ entities: type: object return_info: custom: false - self: true - type: subtenant_dark_theme_image - return_type: subtenant_dark_theme_image - summary: Revert an image to dark theme default. - x_deprecation: null + self: false + type: subtenant_api_key + return_type: paginated_response(subtenant_api_key) + 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: read - description: 'Retrieve metadata of one account dark theme branding image. + - _key: create + description: 'Create a new group. + + Note: 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} + 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'' \ + + -d ''{"name": "MyGroup1"}'' ```' drop_fields: - object - etag - type - - groups - filter - - static_uri + - id + - created_at - updated_at + - user_count + - application_count + - apikey_count field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account this group belongs to. entity_fieldname: account_id - external_param: true + example: 01619571e2e90242ac12000600000000 in: path - name: account_id parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' required: true type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id008 - enum_reference: subtenant_dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference + - _key: members + api_fieldname: members + description: Represents arrays of user and API key IDs. + entity_fieldname: members + external_param: true + in: body + name: members + parameter_fieldname: members + properties: + - _key: apikeys + description: An array of API key IDs. + 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: + type: string + type: array + required: false + schema_param: true + type: object + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + in: body + maxLength: 100 + parameter_fieldname: name required: true type: string - group_id: Branding - method: get - mode: read - operation_id: getAccountDarkImageData + group_id: Accounts + method: post + mode: create + operation_id: createAccountGroup pagination: false - path: /v3/accounts/{account_id}/branding-images/dark/{reference} + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. + - _key: '201' + description: New entity created. schema: + description: This object contains basic information about groups. foreign_key: - entity: subtenant_light_theme_image - group: Branding + entity: policy_group + group: Accounts properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - enum_reference: light_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - type: object - - _key: '401' - description: Authentication failure. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + entity_fieldname: apikey_count + example: 0 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 + 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: 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 + - _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 + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 + in: path + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + in: body + maxLength: 100 + parameter_fieldname: name + required: true type: string - _key: object - description: Entity name, always `error`. + api_fieldname: object + description: 'Entity name: always `group`.' + entity_fieldname: object enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + - group type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + - _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: user_count + api_fieldname: user_count + description: The number of users in this group. + entity_fieldname: user_count + example: 1 + format: int32 + type: integer required: - - code - - message + - account_id + - apikey_count + - etag + - id + - name - object - - request_id - - type + - user_count type: object - - _key: '404' - description: Unknown image reference, or account not found. + - _key: '400' + description: Error in input data, for example, invalid group name. schema: properties: - _key: code @@ -38428,162 +58432,8 @@ entities: - request_id - type type: object - return_info: - custom: false - self: true - type: subtenant_dark_theme_image - return_type: subtenant_dark_theme_image - summary: Get metadata of a dark theme image. - x_deprecation: null - x_filter: {} - - _key: update - additional_operations: - - 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 - or JPEG format. - drop_fields: - - object - - etag - - type - - groups - - filter - - static_uri - - updated_at - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: Account ID. - entity_fieldname: account_id - external_param: true - in: path - name: account_id - parameter_fieldname: account_id - required: true - type: string - - _key: image - api_fieldname: image - description: The image in PNG or JPEG format as multipart form data. - entity_fieldname: image - external_param: true - in: stream - name: image - parameter_fieldname: image - required: true - type: file - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id008 - enum_reference: subtenant_dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - group_id: Branding - method: post - mode: update - operation_id: uploadAccountDarkImageMultipart - pagination: false - path: /v3/accounts/{account_id}/branding-images/dark/{reference}/upload-multipart - request_body: file - request_content_type: multipart/form-data - responses: - - _key: '201' - description: Image uploaded successfully. - headers: - - _key: Content-Location - description: Location of the image metadata. - type: string - - _key: Location - description: Location of the image binary. - type: string - schema: - foreign_key: - entity: subtenant_light_theme_image - group: Branding - properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - enum_reference: light_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - type: string - type: object - - _key: '400' - description: Error in input data format, for example, image is too large. + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -38630,8 +58480,8 @@ entities: - request_id - type type: object - - _key: '401' - description: Authentication failure. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -38678,8 +58528,8 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + - _key: '404' + description: An account with the specified ID does not exist. schema: properties: - _key: code @@ -38726,8 +58576,8 @@ entities: - request_id - type type: object - - _key: '404' - description: Unknown image reference. + - _key: '409' + description: A group with that name already exists. schema: properties: - _key: code @@ -38777,212 +58627,67 @@ entities: return_info: custom: false self: true - type: subtenant_dark_theme_image - return_type: subtenant_dark_theme_image - summary: Upload a dark theme image. + type: subtenant_policy_group + return_type: subtenant_policy_group + summary: Create a new group. x_deprecation: null x_filter: {} - primary_key_field: reference - swagger_models: - - BrandingImage - tags: - - Tenant user interface configuration - images -- _key: subtenant_light_theme_color - field_renames: [] - fields: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - example: '#f3f93e' - in: body - parameter_fieldname: color - readOnly: false - required: false - type: string - x-nullable: true - - _key: reference - _override: true - api_fieldname: reference - 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 - enum_reference: subtenant_light_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - readOnly: false - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string - group_id: Branding - methods: - _key: delete - description: 'Resets the branding color of a tenant account to its light theme - default. + 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}/branding-colors/light/{reference} + 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: - object - etag - type - - groups - filter - - color - - updated_at field_renames: [] fields: - _key: account_id api_fieldname: account_id description: Account ID. entity_fieldname: account_id - external_param: true + external_param: false in: path name: account_id parameter_fieldname: account_id required: true type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference - enum: &id009 - - 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 - enum_reference: subtenant_light_theme_color_reference_enum + - _key: id + api_fieldname: group_id + description: The ID of the group to delete. + entity_fieldname: id + external_param: false in: path - is_primary_key: true - name: reference + name: group_id + parameter_fieldname: group_id required: true type: string - group_id: Branding + group_id: Accounts method: delete mode: delete - operation_id: resetAccountLightColor + operation_id: deleteAccountGroup pagination: false - path: /v3/accounts/{account_id}/branding-colors/light/{reference} + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups/{group_id} request_body: json request_content_type: application/json responses: - - _key: '200' - description: Successful operation. - schema: - foreign_key: - entity: subtenant_dark_theme_color - group: Branding - properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_color''' - entity_fieldname: object - enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object - readOnly: true - required: false - schema_param: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - 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 - enum_reference: subtenant_dark_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string - type: object + - _key: '204' + description: Deleted successfully. - _key: '401' description: Authentication failure. schema: @@ -39032,7 +58737,7 @@ entities: - type type: object - _key: '403' - description: Forbidden. + description: Forbidden, or Administrators group cannot be removed. schema: properties: - _key: code @@ -39080,7 +58785,7 @@ entities: - type type: object - _key: '404' - description: Color or account not found. + description: An account or group with that ID does not exist. schema: properties: - _key: code @@ -39128,66 +58833,114 @@ entities: - type type: object return_info: - custom: true - self: false - type: void - return_type: void - spec: - return_type: void - summary: Reset branding color to default. + custom: false + self: true + type: subtenant_policy_group + return_type: subtenant_policy_group + summary: Delete a group. x_deprecation: null x_filter: {} - - _key: read - description: 'Retrieve the requested light theme branding color. + - _key: list + description: 'Retrieve an array of policy groups. + + 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/{reference} + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups + \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - - color - - updated_at + - total_count + - has_more + - data + - name__eq field_renames: [] fields: - _key: account_id api_fieldname: account_id description: Account ID. entity_fieldname: account_id - external_param: true + external_param: false in: path name: account_id parameter_fieldname: account_id required: true type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference - enum: *id009 - enum_reference: subtenant_light_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true + - _key: after + api_fieldname: after + 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 - group_id: Branding + - _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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: subtenant_policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: subtenant_policy_group + group: Accounts + foreign_key_priority: self + group_id: Accounts method: get - mode: read - operation_id: getAccountLightColor - pagination: false - path: /v3/accounts/{account_id}/branding-colors/light/{reference} + mode: list + operation_id: getAllAccountGroups + pagination: true + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups request_body: json request_content_type: application/json responses: @@ -39195,72 +58948,151 @@ entities: description: Successful operation. schema: foreign_key: - entity: subtenant_dark_theme_color - group: Branding + entity: subtenant_policy_group + group: Accounts + pagination: true properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color + - _key: after + api_fieldname: after + 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 + description: A list of entities. + entity_fieldname: data + items: + description: This object contains basic information about groups. + foreign_key: + entity: subtenant_policy_group + group: Accounts + properties: + - _key: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: 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: [] + - _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' + format: date-time + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: name + description: The name of the group. + example: Administrators + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always `group`.' + enum: + - group + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: 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 + 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 + 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: string - x-nullable: true + type: integer - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always `list`.' entity_fieldname: object enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object - readOnly: true - required: false - schema_param: true + - list type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order 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 - enum_reference: subtenant_dark_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true + - ASC + - DESC + enum_reference: policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order required: false type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count type: object - _key: '401' description: Authentication failure. @@ -39359,7 +59191,7 @@ entities: - type type: object - _key: '404' - description: Color or account not found. + description: An account with the specified ID does not exist. schema: properties: - _key: code @@ -39409,207 +59241,169 @@ entities: return_info: custom: false self: true - type: subtenant_light_theme_color - return_type: subtenant_light_theme_color - summary: Get light theme branding color. + type: subtenant_policy_group + return_type: paginated_response(subtenant_policy_group) + summary: Get policy groups. x_deprecation: null - x_filter: {} - - _key: update - description: 'Update a light theme branding color of a tenant account. + x_filter: + name: + - eq + - _key: read + description: 'Retrieve policy group details. + + Note: 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 + curl -X GET https://api.us-east-1.mbedcloud.com/v3/accounts/{account_id}/policy-groups/{group_id} \ - -H ''Authorization: Bearer '' \ - - -H ''content-type: application/json'' \ - - -d ''{ "color": "purple" }'' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter + - created_at + - updated_at + - name + - user_count + - application_count + - apikey_count field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account this group belongs to. entity_fieldname: account_id - external_param: true + example: 01619571e2e90242ac12000600000000 in: path - name: account_id parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' required: true type: string - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' - in: body - parameter_fieldname: color - required: false - type: string - x-nullable: true - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - entity_fieldname: reference - enum: *id009 - enum_reference: subtenant_light_theme_color_reference_enum + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 in: path - is_primary_key: true - name: reference + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' required: true type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false - type: string - group_id: Branding - method: put - mode: update - operation_id: setAccountLightColor + group_id: Accounts + method: get + mode: read + operation_id: getAccountGroupSummary pagination: false - path: /v3/accounts/{account_id}/branding-colors/light/{reference} + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups/{group_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Color set successfully. + description: Successful operation. schema: + description: This object contains basic information about groups. foreign_key: - entity: subtenant_dark_theme_color - group: Branding + entity: policy_group + group: Accounts properties: - - _key: color - api_fieldname: color - description: The color given as name (purple) or as a hex code. - entity_fieldname: color - example: '#f3f93e' + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + entity_fieldname: apikey_count + 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. + entity_fieldname: created_at + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 + in: path + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators in: body - parameter_fieldname: color - required: false + maxLength: 100 + parameter_fieldname: name + required: true type: string - x-nullable: true - _key: object api_fieldname: object - description: 'Entity name: always ''branding_color''' + description: 'Entity name: always `group`.' entity_fieldname: object enum: - - branding_color - external_param: true - in: body - name: object - parameter_fieldname: object - readOnly: true - required: false - schema_param: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Color name. - 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 - enum_reference: subtenant_dark_theme_color_reference_enum - in: path - is_primary_key: true - name: reference - required: true + - group type: string - _key: updated_at api_fieldname: updated_at - description: Last update time in UTC. + description: Last update UTC time RFC3339. entity_fieldname: updated_at example: '2018-02-14T15:24:14Z' format: date-time - in: body - parameter_fieldname: updated_at - readOnly: true - required: false type: string - type: object - - _key: '400' - description: Error in input data format. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 + - _key: user_count + api_fieldname: user_count + description: The number of users in this group. + entity_fieldname: user_count + example: 1 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 + - account_id + - apikey_count + - etag + - id + - name - object - - request_id - - type + - user_count type: object - _key: '401' description: Authentication failure. @@ -39708,7 +59502,7 @@ entities: - type type: object - _key: '404' - description: Color or account not found. + description: An account or group with that ID does not exist. schema: properties: - _key: code @@ -39758,176 +59552,229 @@ entities: return_info: custom: false self: true - type: subtenant_light_theme_color - return_type: subtenant_light_theme_color - summary: Updates light theme branding color. + type: subtenant_policy_group + return_type: subtenant_policy_group + summary: Get policy group. x_deprecation: null x_filter: {} - primary_key_field: reference - swagger_models: - - BrandingColor - tags: - - Tenant user interface configuration - colors -- _key: subtenant_light_theme_image - field_renames: [] - fields: - - _key: reference - _override: true - api_fieldname: reference - description: Name of the 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 - enum_reference: subtenant_light_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - readOnly: false - required: false - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - required: false - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true - required: false - type: string - group_id: Branding - methods: - - _key: delete - description: 'Revert an account branding image to light theme default. + - _key: update + description: 'Update a group name. + + 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 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'' \ + + -d ''{"name": "TestGroup2"}'' ```' drop_fields: - object - etag - type - - groups - filter + - created_at + - updated_at + - user_count + - application_count + - apikey_count field_renames: [] fields: - _key: account_id api_fieldname: account_id - description: Account ID. + description: The ID of the account this group belongs to. entity_fieldname: account_id - external_param: true + example: 01619571e2e90242ac12000600000000 in: path - name: account_id parameter_fieldname: account_id + pattern: '[a-f0-9]{32}' required: true type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the branding images (icon or picture). - entity_fieldname: reference - enum: &id010 - - 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 - enum_reference: subtenant_light_theme_image_reference_enum + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 in: path - is_primary_key: true - name: reference + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' required: true type: string - group_id: Branding - method: post - mode: delete - operation_id: clearAccountLightImage + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + in: body + maxLength: 100 + parameter_fieldname: name + required: true + type: string + group_id: Accounts + method: put + mode: update + operation_id: updateAccountGroupName pagination: false - path: /v3/accounts/{account_id}/branding-images/light/{reference}/clear + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups/{group_id} request_body: json request_content_type: application/json responses: - - _key: '204' - description: Image reverted successfully. + - _key: '200' + description: Successful operation. + schema: + description: This object contains basic information about groups. + foreign_key: + entity: policy_group + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The ID of the account this group belongs to. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: apikey_count + api_fieldname: apikey_count + description: The number of API keys in this group. + entity_fieldname: apikey_count + 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. + entity_fieldname: created_at + example: '2018-02-13T09:35:20Z' + format: date-time + type: string + - _key: etag + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag + example: '1' + type: string + - _key: id + api_fieldname: id + description: The ID of the group. + entity_fieldname: id + example: 01619571dec00242ac12000600000000 + in: path + parameter_fieldname: group_id + pattern: '[a-f0-9]{32}' + required: true + type: string + - _key: name + api_fieldname: name + description: The name of the group. + entity_fieldname: name + example: Administrators + in: body + maxLength: 100 + parameter_fieldname: name + required: true + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always `group`.' + entity_fieldname: object + enum: + - group + 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: user_count + api_fieldname: user_count + description: The number of users in this group. + entity_fieldname: user_count + example: 1 + format: int32 + type: integer + required: + - account_id + - apikey_count + - etag + - id + - name + - object + - user_count + type: object + - _key: '400' + description: Error in input data, for example, the group name is too long. + 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: @@ -40025,7 +59872,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference, or account not found. + description: A group with that ID does not exist. schema: properties: - _key: code @@ -40075,63 +59922,122 @@ entities: return_info: custom: false self: true - type: subtenant_light_theme_image - return_type: subtenant_light_theme_image - summary: Revert an image to light theme default. + type: subtenant_policy_group + return_type: subtenant_policy_group + summary: Update the group name. x_deprecation: null x_filter: {} - - _key: read - description: 'Retrieve metadata for one account light theme branding image. + - _key: users + 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}/branding-images/light/{reference} + 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: - object - etag - type - - groups - filter - - static_uri - - updated_at + - total_count + - has_more + - data + - status__eq + - status__in + - status__nin field_renames: [] fields: - _key: account_id api_fieldname: account_id description: Account ID. entity_fieldname: account_id - external_param: true + external_param: false in: path name: account_id parameter_fieldname: account_id required: true type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id010 - enum_reference: subtenant_light_theme_image_reference_enum + - _key: after + api_fieldname: after + 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: id + api_fieldname: group_id + description: The ID of the group to retrieve users for. + entity_fieldname: id + external_param: false in: path - is_primary_key: true - name: reference + name: group_id + parameter_fieldname: group_id required: true type: string - group_id: Branding + - _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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: subtenant_policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: subtenant_user + group_id: Accounts method: get - mode: read - operation_id: getAccountLightImageData - pagination: false - path: /v3/accounts/{account_id}/branding-images/light/{reference} + mode: users + operation_id: getUsersOfAccountGroup + pagination: true + parameter_map: + group_id: id + path: /v3/accounts/{account_id}/policy-groups/{group_id}/users request_body: json request_content_type: application/json responses: @@ -40139,426 +60045,385 @@ entities: description: Successful operation. schema: foreign_key: - entity: subtenant_dark_theme_image - group: Branding + entity: user + group: Accounts + pagination: true properties: - - _key: object - api_fieldname: object - description: 'Entity name: always ''branding_image''' - entity_fieldname: object - enum: - - branding_image - readOnly: true - type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - 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 - enum_reference: subtenant_dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - _key: after + api_fieldname: after + 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 - 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. + - _key: data + api_fieldname: data + description: A list of entities. + entity_fieldname: data items: + description: Represents a user in Device Management. + foreign_key: + entity: user + group: Accounts properties: - - _key: message - description: Message describing the error condition. + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: active_sessions + description: List of active user sessions. + items: + description: Represents an active user session. + foreign_key: + entity: active_session + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The UUID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: login_time + api_fieldname: login_time + description: The login time of the user. + entity_fieldname: login_time + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''user-session''' + entity_fieldname: object + enum: + - user-session + type: string + - _key: reference_token + api_fieldname: reference_token + description: The reference token. + entity_fieldname: reference_token + example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk + type: string + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + type: array + - _key: address + description: Address. + example: 110 Fulbourn Rd, Cambridge, United Kingdom + 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: creation_time + description: A timestamp of the user creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: custom_fields + additionalProperties: + type: string + description: User's account-specific custom properties. The value is + a string. + type: object + x-nullable: true + - _key: email + description: The email address. + example: user@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + - _key: email_verified + description: A flag indicating whether the user's email address has + been verified or not. + example: true + type: boolean + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: full_name + description: The full name of the user. + example: User Doe + maxLength: 100 + type: string + x-nullable: true + - _key: groups + description: A list of IDs of the groups this user belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the user. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_gtc_accepted + description: A flag indicating that the user has accepted General Terms + and Conditions. + example: true + type: boolean + - _key: is_marketing_accepted + description: A flag indicating that the user has consented to receive + marketing information. + example: true + type: boolean + - _key: is_totp_enabled + description: A flag indicating whether two-factor authentication (TOTP) + has been enabled. + example: true + type: boolean + - _key: last_login_time + description: A timestamp of the latest login of the user, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: 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: + description: Represents an entry in login history. + foreign_key: + entity: login_history + group: Accounts + properties: + - _key: date + api_fieldname: date + description: UTC time RFC3339 for this login attempt. + entity_fieldname: date + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: success + api_fieldname: success + description: Flag indicating whether login attempt was successful + or not. + entity_fieldname: success + example: true + type: boolean + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + maxItems: 5 + type: array + - _key: login_profiles + description: A list of login profiles for the user. Specified as the + identity providers the user is associated with. + items: + description: Represents a user login profile in Device Management. + foreign_key: + 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 + _override: true + 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: + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE + readOnly: true + type: string + required: + - id + type: object + type: array + x-nullable: true + - _key: object + description: 'Entity name: always `user`.' + enum: + - user type: string - - _key: name - description: Name of the field which caused the error. + - _key: password + description: The password when creating a new user. It will be generated + when not present in the request. + example: PZf9eEUH43DAPE9ULINFeuj 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. + x-nullable: true + - _key: password_changed_time + description: A timestamp of the latest change of the user password, + in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: phone_number + description: Phone number. + example: +44 (1223) 400 400 + maxLength: 100 type: string - - _key: name - description: Name of the field which caused the error. + x-nullable: true + - _key: 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 - 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: Unknown image reference, or account 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. + - _key: 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 + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string - - _key: name - description: Name of the field which caused the error. + - _key: username + description: A username. + example: admin + pattern: '[\w\-,._@+=]{4,30}' type: string + x-nullable: true required: - - name - - message + - account_id + - email + - etag + - id + - object + - status 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: subtenant_light_theme_image - return_type: subtenant_light_theme_image - summary: Get metadata of a light theme image. - x_deprecation: null - x_filter: {} - - _key: update - 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. - drop_fields: - - object - - etag - - type - - groups - - filter - - static_uri - - updated_at - field_renames: [] - fields: - - _key: account_id - api_fieldname: account_id - description: Account ID. - entity_fieldname: account_id - external_param: true - in: path - name: account_id - parameter_fieldname: account_id - required: true - type: string - - _key: image - api_fieldname: image - description: The image in PNG or JPEG format as multipart form data. - entity_fieldname: image - external_param: true - in: stream - name: image - parameter_fieldname: image - required: true - type: file - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference - enum: *id010 - enum_reference: subtenant_light_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - group_id: Branding - method: post - mode: update - operation_id: uploadAccountLightImageMultipart - pagination: false - path: /v3/accounts/{account_id}/branding-images/light/{reference}/upload-multipart - request_body: file - request_content_type: multipart/form-data - responses: - - _key: '201' - description: Image uploaded successfully. - headers: - - _key: Content-Location - description: Location of the image metadata. - type: string - - _key: Location - description: Location of the image binary. - type: string - schema: - foreign_key: - entity: subtenant_dark_theme_image - group: Branding - properties: + - _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 + 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 - description: 'Entity name: always ''branding_image''' + description: 'Entity name: always `list`.' entity_fieldname: object enum: - - branding_image - readOnly: true + - list type: string - - _key: reference - _override: true - api_fieldname: reference - description: Name of the image. - entity_fieldname: reference + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order 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 - enum_reference: subtenant_dark_theme_image_reference_enum - in: path - is_primary_key: true - name: reference - required: true - type: string - - _key: static_uri - api_fieldname: static_uri - description: The static link to the image. - entity_fieldname: static_uri - example: https://static.mbed.com/123456789.jpg - format: uri - readOnly: true - type: string - - _key: updated_at - api_fieldname: updated_at - description: Last update time in UTC. - entity_fieldname: updated_at - example: '2018-02-14T15:24:14Z' - format: date-time - readOnly: true + - ASC + - DESC + enum_reference: policy_group_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string - type: object - - _key: '400' - description: Error in input data format, for example, image is too large. - schema: - properties: - - _key: code - description: HTTP response code - example: 400 + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 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 + - data + - has_more + - limit - object - - request_id - - type + - total_count type: object - _key: '401' description: Authentication failure. @@ -40657,7 +60522,7 @@ entities: - type type: object - _key: '404' - description: Unknown image reference. + description: An account or group with that ID does not exist. schema: properties: - _key: code @@ -40706,17 +60571,26 @@ entities: type: object return_info: custom: false - self: true - type: subtenant_light_theme_image - return_type: subtenant_light_theme_image - summary: Upload a light theme image. + self: false + type: subtenant_user + return_type: paginated_response(subtenant_user) + summary: Get users in a policy group. x_deprecation: null - x_filter: {} - primary_key_field: reference + x_filter: + status: + - eq + - in + - nin + primary_key_field: id swagger_models: - - BrandingImage + - ApiKeyInfoRespList + - GroupCreationInfo + - GroupSummary + - GroupSummaryList + - GroupUpdateInfo + - UserInfoRespList tags: - - Tenant user interface configuration - images + - Tenant accounts - policy groups - _key: subtenant_trusted_certificate field_renames: [] fields: @@ -40773,13 +60647,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. @@ -40884,7 +60764,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:** @@ -40894,7 +60776,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'' \ @@ -40906,7 +60788,6 @@ entities: - object - etag - type - - groups - filter - signature - id @@ -40953,13 +60834,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 @@ -40983,7 +60870,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: &id011 + enum: &id017 - lwm2m - bootstrap enum_reference: subtenant_trusted_certificate_service_enum @@ -40995,7 +60882,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: &id012 + enum: &id018 - ACTIVE - INACTIVE enum_reference: subtenant_trusted_certificate_status_enum @@ -41071,13 +60958,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. @@ -41289,7 +61182,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 @@ -41393,7 +61286,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:** @@ -41403,14 +61298,13 @@ 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: - object - etag - type - - groups - filter - signature field_renames: [] @@ -41506,7 +61400,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 @@ -41554,7 +61448,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 @@ -41606,7 +61500,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 @@ -41621,14 +61515,13 @@ 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: - object - etag - type - - groups - filter - signature - created_at @@ -42099,7 +61992,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:** @@ -42109,14 +62004,13 @@ 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: - object - etag - type - - groups - filter - signature - created_at @@ -42233,13 +62127,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. @@ -42402,7 +62302,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 @@ -42450,7 +62350,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 @@ -42502,19 +62402,18 @@ 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 - etag - type - - groups - filter - signature - created_at @@ -42560,13 +62459,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. @@ -42600,7 +62505,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: *id011 + enum: *id017 enum_reference: subtenant_trusted_certificate_service_enum in: body parameter_fieldname: service @@ -42610,7 +62515,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: *id012 + enum: *id018 enum_reference: subtenant_trusted_certificate_status_enum example: ACTIVE in: body @@ -42686,13 +62591,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. @@ -42904,7 +62815,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 @@ -43014,8 +62925,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: @@ -43043,6 +62954,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -43151,6 +63069,16 @@ entities: required: false type: string x-nullable: true + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups this user belongs to. + in: body + items: + type: string + parameter_fieldname: groups + readOnly: false + required: false + type: array - _key: id api_fieldname: id description: The ID of the user. @@ -43255,11 +63183,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 @@ -43267,17 +63203,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -43372,6 +63310,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:** @@ -43380,7 +63320,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'' \ @@ -43391,7 +63331,6 @@ entities: - object - etag - type - - groups - filter - id - created_at @@ -43460,6 +63399,16 @@ entities: required: false type: string x-nullable: true + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups this user belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: is_gtc_accepted api_fieldname: is_gtc_accepted description: A flag indicating that the user has accepted General Terms and @@ -43492,11 +63441,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 @@ -43504,20 +63461,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: type - enum: &id013 + entity_fieldname: login_profile_type + enum: &id019 - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string - required: &id014 + required: &id020 - id type: object parameter_fieldname: login_profiles @@ -43600,6 +63559,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -43710,19 +63676,14 @@ entities: x-nullable: true - _key: groups api_fieldname: groups - description: A list of group IDs this user belongs to. Can be updated by - the Account Admin only. + description: A list of IDs of the groups this user belongs to. entity_fieldname: groups - external_param: true in: body items: type: string - name: groups parameter_fieldname: groups required: false - schema_param: true type: array - x-nullable: true - _key: id api_fieldname: id description: The ID of the user. @@ -43828,11 +63789,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 @@ -43840,17 +63809,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -44195,29 +64166,289 @@ entities: self: true type: subtenant_user return_type: subtenant_user - summary: Create a new user. + summary: Create a new user. + x_deprecation: null + x_filter: {} + - _key: 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 '' + + ```' + drop_fields: + - object + - etag + - type + - filter + field_renames: [] + fields: + - _key: account_id + api_fieldname: account_id + description: Account ID. + entity_fieldname: account_id + external_param: false + in: path + name: account_id + parameter_fieldname: account_id + required: true + type: string + - _key: id + api_fieldname: user_id + description: The ID of the user to delete. + entity_fieldname: id + external_param: false + in: path + name: user_id + parameter_fieldname: user_id + required: true + type: string + group_id: Accounts + method: delete + mode: delete + operation_id: deleteAccountUser + pagination: false + parameter_map: + user_id: id + path: /v3/accounts/{account_id}/users/{user_id} + request_body: json + request_content_type: application/json + responses: + - _key: '204' + description: Deleted successfully. + - _key: '400' + description: Bad request, for example, trying to delete an active user. + 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: '404' + description: An account or user with the specified ID does not exist. + 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: subtenant_user + return_type: subtenant_user + summary: Delete a user. x_deprecation: null x_filter: {} - - _key: delete - description: 'Delete a user. + - _key: policy_groups + description: 'Retrieve an array of policy groups associated with 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} + 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: - object - etag - type - - groups - filter + - total_count + - has_more + - data field_renames: [] fields: - _key: account_id @@ -44230,9 +64461,21 @@ entities: parameter_fieldname: account_id required: true type: string + - _key: after + api_fieldname: after + 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: id api_fieldname: user_id - description: The ID of the user to delete. + description: The ID of the user. entity_fieldname: id external_param: false in: path @@ -44240,66 +64483,208 @@ entities: parameter_fieldname: user_id required: true 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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: subtenant_user_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: subtenant_policy_group group_id: Accounts - method: delete - mode: delete - operation_id: deleteAccountUser - pagination: false + method: get + mode: policy_groups + operation_id: getGroupsOfAccountUser + pagination: true parameter_map: user_id: id - path: /v3/accounts/{account_id}/users/{user_id} + path: /v3/accounts/{account_id}/users/{user_id}/groups request_body: json request_content_type: application/json responses: - - _key: '204' - description: Deleted successfully. - - _key: '400' - description: Bad request, for example, trying to delete an active user. + - _key: '200' + description: Successful operation. schema: + foreign_key: + entity: subtenant_policy_group + group: Accounts + pagination: true properties: - - _key: code - description: HTTP response code - example: 400 - format: int32 - type: integer - - _key: fields - description: Request fields which failed validation. + - _key: after + api_fieldname: after + 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 + description: A list of entities. + entity_fieldname: data items: + description: This object contains basic information about groups. + foreign_key: + entity: subtenant_policy_group + group: Accounts properties: - - _key: message - description: Message describing the error condition. + - _key: account_id + description: The ID of the account this group belongs to. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: 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: [] + - _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' + format: date-time + type: string + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: id + description: The ID of the group. + example: 01619571dec00242ac12000600000000 + pattern: '[a-f0-9]{32}' type: string - _key: name - description: Name of the field which caused the error. + description: The name of the group. + example: Administrators + maxLength: 100 + type: string + - _key: object + description: 'Entity name: always `group`.' + enum: + - group + type: string + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time type: string + - _key: user_count + description: The number of users in this group. + example: 1 + format: int32 + type: integer required: + - account_id + - apikey_count + - etag + - id - name - - message + - object + - user_count type: object type: array - - _key: message - description: A human readable informative explanation - example: Validation error - type: string + - _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 + 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 - description: Entity name, always `error`. + api_fieldname: object + description: 'Entity name: always `list`.' + entity_fieldname: object enum: - - error - type: string - - _key: request_id - description: ID of the request. - example: 0161991d63150242ac12000600000000 + - list type: string - - _key: type - description: Error type used to categorise the error. - example: validation_error + - _key: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: user_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false type: string + - _key: total_count + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer required: - - code - - message + - data + - has_more + - limit - object - - request_id - - type + - total_count type: object - _key: '401' description: Authentication failure. @@ -44447,15 +64832,17 @@ entities: type: object return_info: custom: false - self: true - type: subtenant_user - return_type: subtenant_user - summary: Delete a user. + self: false + type: subtenant_policy_group + return_type: paginated_response(subtenant_policy_group) + 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:** @@ -44464,14 +64851,13 @@ 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: - object - etag - type - - groups - filter - created_at - updated_at @@ -44482,6 +64868,7 @@ entities: - email - address - phone_number + - groups - is_gtc_accepted - is_marketing_accepted - email_verified @@ -44559,6 +64946,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -44669,19 +65063,14 @@ entities: x-nullable: true - _key: groups api_fieldname: groups - description: A list of group IDs this user belongs to. Can be updated by - the Account Admin only. + description: A list of IDs of the groups this user belongs to. entity_fieldname: groups - external_param: true in: body items: type: string - name: groups parameter_fieldname: groups required: false - schema_param: true type: array - x-nullable: true - _key: id api_fieldname: id description: The ID of the user. @@ -44787,11 +65176,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 @@ -44799,17 +65196,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -45064,6 +65463,8 @@ entities: - _key: update description: 'Update user details. + Note: This endpoint is restricted to administrators. + **Example:** @@ -45072,7 +65473,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'' \ @@ -45083,7 +65484,6 @@ entities: - object - etag - type - - groups - filter - email - two_factor_auth_enabled @@ -45132,6 +65532,16 @@ entities: required: false type: string x-nullable: true + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups this user belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: id api_fieldname: id description: The ID of the user. @@ -45184,11 +65594,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 @@ -45196,16 +65614,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: type - enum: *id013 + entity_fieldname: login_profile_type + enum: *id019 + example: NATIVE readOnly: true type: string - required: *id014 + required: *id020 type: object parameter_fieldname: login_profiles required: false @@ -45276,6 +65696,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -45386,19 +65813,14 @@ entities: x-nullable: true - _key: groups api_fieldname: groups - description: A list of group IDs this user belongs to. Can be updated by - the Account Admin only. + description: A list of IDs of the groups this user belongs to. entity_fieldname: groups - external_param: true in: body items: type: string - name: groups parameter_fieldname: groups required: false - schema_param: true type: array - x-nullable: true - _key: id api_fieldname: id description: The ID of the user. @@ -45504,11 +65926,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 @@ -45516,17 +65946,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -45877,6 +66309,8 @@ entities: - _key: validate_email description: 'Validate user email. + Note: This endpoint is restricted to administrators. + **Example:** @@ -45885,14 +66319,13 @@ 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: - object - etag - type - - groups - filter field_renames: [] fields: @@ -46083,6 +66516,7 @@ entities: x_filter: {} primary_key_field: id swagger_models: + - GroupSummaryList - UserInfoReq - UserInfoResp - UserUpdateReq @@ -46125,6 +66559,16 @@ entities: readOnly: true required: false type: string + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups the user is invited to. + in: body + items: + type: string + parameter_fieldname: groups + readOnly: false + required: false + type: array - _key: id api_fieldname: id description: The ID of the invitation. @@ -46146,11 +66590,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 @@ -46158,17 +66610,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -46200,6 +66654,8 @@ entities: - _key: create description: 'Invite a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -46208,7 +66664,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'' \ @@ -46219,7 +66675,6 @@ entities: - object - etag - type - - groups - filter - id - created_at @@ -46248,6 +66703,16 @@ entities: pattern: ^(?=.{3,254}$).+\@.+ required: true type: string + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups the user is invited to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: login_profiles api_fieldname: login_profiles description: A list of login profiles for the user. Specified as the identity @@ -46260,11 +66725,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 @@ -46272,17 +66745,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -46365,16 +66840,13 @@ entities: type: string - _key: groups api_fieldname: groups - description: A list of IDs of the groups this user has been invited to. + description: A list of IDs of the groups the user is invited to. entity_fieldname: groups - external_param: true in: body items: type: string - name: groups parameter_fieldname: groups required: false - schema_param: true type: array - _key: id api_fieldname: id @@ -46398,11 +66870,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 @@ -46410,17 +66890,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -46614,6 +67096,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:** @@ -46622,14 +67106,13 @@ 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: - object - etag - type - - groups - filter field_renames: [] fields: @@ -46822,6 +67305,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:** @@ -46830,19 +67315,19 @@ 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: - object - etag - type - - groups - filter - created_at - updated_at - email - user_id + - groups - expiration - login_profiles field_renames: [] @@ -46925,16 +67410,13 @@ entities: type: string - _key: groups api_fieldname: groups - description: A list of IDs of the groups this user has been invited to. + description: A list of IDs of the groups the user is invited to. entity_fieldname: groups - external_param: true in: body items: type: string - name: groups parameter_fieldname: groups required: false - schema_param: true type: array - _key: id api_fieldname: id @@ -46958,11 +67440,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 @@ -46970,17 +67460,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -47229,11 +67721,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. @@ -47332,6 +67830,8 @@ entities: - _key: create description: 'Upload new trusted certificates. + Note: This endpoint is restricted to administrators. + **Example:** @@ -47339,7 +67839,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'' \ @@ -47351,7 +67851,6 @@ entities: - object - etag - type - - groups - filter - signature - id @@ -47389,13 +67888,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 @@ -47419,7 +67924,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: &id015 + enum: &id022 - lwm2m - bootstrap enum_reference: trusted_certificate_service_enum @@ -47431,7 +67936,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: &id016 + enum: &id023 - ACTIVE - INACTIVE enum_reference: trusted_certificate_status_enum @@ -47501,10 +68006,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. @@ -47701,7 +68212,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 @@ -47815,14 +68326,13 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - signature field_renames: [] @@ -47956,7 +68466,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -48023,14 +68533,13 @@ 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: - object - etag - type - - groups - filter - signature - created_at @@ -48501,7 +69010,7 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: 'Retrieve trusted certificates in an array. + description: 'Retrieve an array of trusted certificates. **Example:** @@ -48510,14 +69019,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - signature - total_count @@ -48533,12 +69041,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 @@ -48584,7 +69093,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: @@ -48620,7 +69129,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}' @@ -48665,9 +69174,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' @@ -48891,6 +69406,8 @@ entities: summary: Get all trusted certificates. x_deprecation: null x_filter: + certificate_fingerprint: + - eq device_execution_mode: - eq - neq @@ -48913,7 +69430,7 @@ entities: valid: - eq - _key: read - description: 'Retrieve a trusted certificate by ID. + description: 'Retrieve a trusted certificate. **Example:** @@ -48923,14 +69440,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/trusted-certificates/{cert_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - signature - created_at @@ -49032,10 +69548,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. @@ -49232,7 +69754,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -49284,7 +69806,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 @@ -49298,7 +69820,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'' \ @@ -49309,7 +69831,6 @@ entities: - object - etag - type - - groups - filter - signature - created_at @@ -49346,13 +69867,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. @@ -49386,7 +69913,7 @@ entities: api_fieldname: service description: Service name where the certificate is used. entity_fieldname: service - enum: *id015 + enum: *id022 enum_reference: trusted_certificate_service_enum in: body parameter_fieldname: service @@ -49396,7 +69923,7 @@ entities: api_fieldname: status description: Status of the certificate. entity_fieldname: status - enum: *id016 + enum: *id023 enum_reference: trusted_certificate_status_enum example: ACTIVE in: body @@ -49466,10 +69993,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. @@ -49714,7 +70247,7 @@ entities: - type type: object - _key: '404' - description: Certificate not found. + description: A certificate not found. schema: properties: - _key: code @@ -49825,11 +70358,42 @@ 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: + - _key: active_at + api_fieldname: active_at + description: The time the campaign entered the active state. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: approval_required + api_fieldname: approval_required + description: Flag indicating whether approval is needed to start the campaign. + example: 'false' + readOnly: false + required: false + type: boolean + - _key: archived_at + api_fieldname: archived_at + description: The time the campaign was archived. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: autostop + api_fieldname: autostop + description: Flag indicating whether the campaign should be auto-stopped on reaching + a threshold. + example: 'false' + readOnly: false + required: false + type: boolean - _key: autostop_reason api_fieldname: autostop_reason description: Text description of why a campaign failed to start or why a campaign @@ -49838,9 +70402,30 @@ entities: readOnly: true required: false type: string + - _key: autostop_success_percent + api_fieldname: autostop_success_percent + description: Percent of successful device updates to auto stop the campaign. + example: '85.00' + format: double + readOnly: false + required: false + type: number + - _key: campaign_strategy + api_fieldname: campaign_strategy + 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 + enum_reference: update_campaign_strategy_enum + readOnly: false + required: false + type: string - _key: created_at api_fieldname: created_at - description: The time the update campaign was created + description: The time the entity was created. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -49848,16 +70433,17 @@ entities: type: string - _key: description api_fieldname: description - description: An optional description of the campaign - example: '' + description: An optional description of the campaign. + example: This campaign updates Class XX devices to version 1.34 maxLength: 2000 readOnly: false required: false 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 @@ -49876,7 +70462,7 @@ entities: type: filter - _key: finished api_fieldname: finished - description: The campaign finish timestamp + description: The time the campaign finished. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -49884,14 +70470,15 @@ entities: type: string - _key: id api_fieldname: id - description: The campaign ID - example: '00000000000000000000000000000000' + description: The campaign ID. + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' readOnly: false required: true type: string - _key: name api_fieldname: name - description: The campaign name + description: The campaign name. example: campaign maxLength: 128 readOnly: false @@ -49899,24 +70486,64 @@ entities: type: string - _key: phase api_fieldname: phase - description: The current phase of the campaign. + description: The phase of the campaign. + enum: + - draft + - awaiting_approval + - timed + - starting + - active + - stopping + - stopped + - deleted + - archived + enum_reference: update_campaign_phase_enum readOnly: true required: false type: string - _key: root_manifest_id api_fieldname: root_manifest_id - example: '00000000000000000000000000000000' + description: The ID of the manifest that will be sent to the device as part of + the campaign. + example: 016e83dce36a00000000000100100102 readOnly: false required: false type: string - _key: root_manifest_url api_fieldname: root_manifest_url - example: http://example.com/00000000000000000000000000000000 + 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 readOnly: true required: false type: string - _key: started_at api_fieldname: started_at + description: The time the campaign was started. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: starting_at + api_fieldname: starting_at + description: The time the campaign will be started. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: stopped_at + api_fieldname: stopped_at + description: The time the campaign was stopped. + example: '2017-05-22T12:37:55.576563Z' + format: date-time + readOnly: true + required: false + type: string + - _key: stopping_at + api_fieldname: stopping_at + description: The time the campaign will be stopped. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -49924,7 +70551,7 @@ entities: type: string - _key: updated_at api_fieldname: updated_at - description: The time the object was updated + description: The time the entity was updated. example: '2017-05-22T12:37:55.576563Z' format: date-time readOnly: true @@ -49943,12 +70570,26 @@ entities: group_id: Device_Update methods: - _key: archive - description: This command will archive a campaign. + description: 'Archive a campaign. + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc649000000000001001000b8/archive + \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state field_renames: [] @@ -49967,12 +70608,13 @@ entities: type: filter - _key: id api_fieldname: campaign_id - description: The campaign ID + description: The campaign ID. entity_fieldname: id external_param: false in: path name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -49990,12 +70632,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 @@ -50005,29 +70831,83 @@ entities: x_deprecation: null x_filter: {} - _key: create - description: Create an update campaign. + 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" drop_fields: - object - etag - type - - groups - filter - state - - autostop_reason - - phase - created_at + - updated_at + - active_at + - archived_at + - autostop_reason - finished - id - root_manifest_url + - starting_at - started_at - - updated_at + - stopping_at + - stopped_at + - phase field_renames: [] fields: + - _key: approval_required + api_fieldname: approval_required + description: Flag indicating whether approval is needed to start the campaign. + entity_fieldname: approval_required + example: 'false' + in: body + parameter_fieldname: approval_required + required: false + type: boolean + - _key: autostop + api_fieldname: autostop + description: Flag indicating whether the campaign should be auto-stopped on + reaching a threshold. + entity_fieldname: autostop + example: 'false' + in: body + parameter_fieldname: autostop + required: false + type: boolean + - _key: autostop_success_percent + api_fieldname: autostop_success_percent + description: Percent of successful device updates to auto stop the campaign. + entity_fieldname: autostop_success_percent + example: '85.00' + format: double + in: body + parameter_fieldname: autostop_success_percent + required: false + type: number + - _key: campaign_strategy + api_fieldname: campaign_strategy + 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`. + entity_fieldname: campaign_strategy + enum: + - one-shot + - continuous + enum_reference: update_campaign_strategy_enum + in: body + parameter_fieldname: campaign_strategy + required: false + type: string - _key: description api_fieldname: description - description: An optional description of the campaign + description: An optional description of the campaign. entity_fieldname: description - example: '' + example: This campaign updates Class XX devices to version 1.34 in: body maxLength: 2000 parameter_fieldname: description @@ -50035,9 +70915,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 @@ -50056,7 +70937,7 @@ entities: type: filter - _key: name api_fieldname: name - description: The campaign name + description: The campaign name. entity_fieldname: name example: campaign in: body @@ -50066,8 +70947,10 @@ entities: type: string - _key: root_manifest_id api_fieldname: root_manifest_id + 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 @@ -50091,17 +70974,44 @@ entities: pagination: false parameter_map: campaign_id: id - path: /v3/update-campaigns/ + path: /v3/update-campaigns request_body: json request_content_type: application/json responses: - _key: '201' - description: Update campaign created + description: Update campaign created. schema: - _key: foreign_key entity: update_campaign group: Device_Update - _key: properties + active_at: + api_fieldname: active_at + description: The time the campaign entered the active state. + entity_fieldname: active_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + approval_required: + api_fieldname: approval_required + description: Flag indicating whether approval is needed to start the campaign. + entity_fieldname: approval_required + example: 'false' + type: boolean + archived_at: + api_fieldname: archived_at + description: The time the campaign was archived. + entity_fieldname: archived_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + autostop: + api_fieldname: autostop + description: Flag indicating whether the campaign should be auto-stopped + on reaching a threshold. + entity_fieldname: autostop + example: 'false' + type: boolean autostop_reason: api_fieldname: autostop_reason description: Text description of why a campaign failed to start or why a @@ -50109,83 +71019,125 @@ entities: entity_fieldname: autostop_reason example: Insufficient billing credit. type: string + autostop_success_percent: + api_fieldname: autostop_success_percent + description: Percent of successful device updates to auto stop the campaign. + entity_fieldname: autostop_success_percent + example: '85.00' + format: double + type: number + campaign_strategy: + api_fieldname: campaign_strategy + 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`. + entity_fieldname: campaign_strategy + enum: + - one-shot + - continuous + type: string created_at: api_fieldname: created_at - description: The time the update campaign was created + description: The time the entity was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string description: api_fieldname: description - description: An optional description of the campaign + description: An optional description of the campaign. entity_fieldname: description - example: '' + example: This campaign updates Class XX devices to version 1.34 maxLength: 2000 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 - description: The entity instance signature + description: API resource entity version. entity_fieldname: etag example: '2017-05-22T12:37:58.753425Z' type: string finished: api_fieldname: finished - description: The campaign finish timestamp + description: The time the campaign finished. entity_fieldname: finished example: '2017-05-22T12:37:55.576563Z' format: date-time type: string id: api_fieldname: id - description: The campaign ID + description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name - description: The campaign name + description: The campaign name. entity_fieldname: name example: campaign maxLength: 128 type: string object: api_fieldname: object - description: The API resource entity + description: 'Entity name: always ''update-campaign''.' entity_fieldname: object example: update-campaign type: string phase: api_fieldname: phase - description: The current phase of the campaign. + description: The phase of the campaign. entity_fieldname: phase - readOnly: true + enum: + - draft + - awaiting_approval + - timed + - starting + - active + - stopping + - stopped + - deleted + - archived type: string root_manifest_id: api_fieldname: root_manifest_id + 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 + description: The time the campaign was started. entity_fieldname: started_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + starting_at: + api_fieldname: starting_at + description: The time the campaign will be started. + entity_fieldname: starting_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string state: api_fieldname: state - description: 'DEPRECATED: The state of the campaign (use phase instead).' + description: The state of the campaign. entity_fieldname: state enum: - draft @@ -50213,9 +71165,23 @@ entities: end_of_life_at: '2020-03-18T14:55:20+00:00' issued_at: '2019-03-18T14:55:20+00:00' links: [] + stopped_at: + api_fieldname: stopped_at + description: The time the campaign was stopped. + entity_fieldname: stopped_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + stopping_at: + api_fieldname: stopping_at + description: The time the campaign will be stopped. + entity_fieldname: stopping_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string updated_at: api_fieldname: updated_at - description: The time the object was updated + description: The time the entity was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -50231,11 +71197,151 @@ entities: x-nullable: true - _key: '400' description: 'Validation error: The data used to create the campaign did not - validate + 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 + 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 @@ -50245,12 +71351,26 @@ entities: x_deprecation: null x_filter: {} - _key: delete - description: Delete an update campaign. + description: 'Delete an update campaign. + +
+ + **Usage example:** + + ``` + + curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/update-campaigns/1123457f9012ab567890120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state field_renames: [] @@ -50269,12 +71389,13 @@ entities: type: filter - _key: id api_fieldname: campaign_id - description: The ID of the update campaign + description: The campaign ID. entity_fieldname: id external_param: false in: path name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -50284,21 +71405,159 @@ entities: pagination: false parameter_map: campaign_id: id - path: /v3/update-campaigns/{campaign_id}/ + path: /v3/update-campaigns/{campaign_id} request_body: json request_content_type: application/json responses: - _key: '204' - description: Update campaign deleted + description: Update campaign deleted. - _key: '400' description: 'Validation error: The data used to update the campaign did not - validate + 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 + 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 + 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: @@ -50356,12 +71615,26 @@ entities: x_deprecation: null x_filter: {} - _key: device_metadata - description: Get campaign device metadata. + description: 'Get metadata for all devices in a campaign. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56790120000789012/campaign-device-metadata + \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state - has_more @@ -50371,7 +71644,7 @@ entities: fields: - _key: after api_fieldname: after - description: The ID of the 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: 'null' external_param: true @@ -50394,18 +71667,19 @@ entities: type: filter - _key: id api_fieldname: campaign_id - description: The update campaign ID + description: The campaign ID. entity_fieldname: id external_param: false in: path name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - _key: include api_fieldname: include description: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' entity_fieldname: include external_param: true in: query @@ -50430,7 +71704,7 @@ entities: type: integer - _key: order api_fieldname: order - description: ASC or DESC + description: ASC or DESC. entity_fieldname: order enum: - ASC @@ -50453,12 +71727,12 @@ entities: pagination: true parameter_map: campaign_id: id - path: /v3/update-campaigns/{campaign_id}/campaign-device-metadata/ + path: /v3/update-campaigns/{campaign_id}/campaign-device-metadata request_body: json request_content_type: application/json responses: - _key: '200' - description: Request successful + description: Request successful. schema: foreign_key: entity: campaign_device_metadata @@ -50467,13 +71741,13 @@ entities: properties: - _key: after api_fieldname: after - description: The entity ID to fetch after the given one + description: The entity ID to fetch after the given one. entity_fieldname: after example: 'null' type: string - _key: data api_fieldname: data - description: A list of entities + description: A list of entities. entity_fieldname: data items: foreign_key: @@ -50482,7 +71756,7 @@ entities: properties: - _key: campaign api_fieldname: campaign - description: The device's campaign ID + description: The device's campaign ID. entity_fieldname: campaign_id example: 015bf72fccda00000000000100100280 in: path @@ -50491,14 +71765,14 @@ entities: type: string - _key: created_at api_fieldname: created_at - description: The time the campaign was created + description: The time the entity was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string - _key: deployment_state api_fieldname: deployment_state - description: The state of the update campaign on the device + description: The state of the update campaign on the device. entity_fieldname: deployment_state enum: - pending @@ -50510,69 +71784,69 @@ entities: type: string - _key: description api_fieldname: description - description: Description + description: Description. entity_fieldname: description - example: '' + example: a description maxLength: 2000 type: string - _key: device_id api_fieldname: device_id - description: The device ID + description: The device ID. entity_fieldname: device_id example: 015c2fec9bba0000000000010010036f type: string - _key: etag api_fieldname: etag - description: API resource entity version + description: API resource entity version. entity_fieldname: etag example: '2017-05-22T12:37:58.753425Z' type: string - _key: id api_fieldname: id - description: The metadata record ID + description: The metadata record ID. entity_fieldname: id example: 015c3029f6f7000000000001001000c3 in: path parameter_fieldname: campaign_device_metadata_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string - _key: mechanism api_fieldname: mechanism - description: How the firmware is delivered (connector or direct) + description: How the firmware is delivered (connector or direct). entity_fieldname: mechanism example: connector type: string - _key: mechanism_url api_fieldname: mechanism_url - description: The Device Management Connect URL + description: The Device Management Connect URL. entity_fieldname: mechanism_url - example: '' type: string - _key: name api_fieldname: name - description: The record name + default: default_object_name + description: The record name. entity_fieldname: name - example: default_object_name maxLength: 128 type: string - _key: object api_fieldname: object - description: 'The entity name: always ''update-campaign-device-metadata''' + 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 - description: 'The record was modified in the database format: date-time' + description: The time the entity was updated. entity_fieldname: updated_at - example: '2017-05-22T12:37:58.776736Z' + example: '2017-05-22T12:37:55.576563Z' format: date-time type: string type: object type: array - _key: has_more api_fieldname: has_more - description: A flag indicating whether there are more results + description: A flag indicating whether there are more results. entity_fieldname: has_more example: 'false' type: boolean @@ -50588,14 +71862,14 @@ entities: type: integer - _key: object api_fieldname: object - description: 'The entity name: always ''list''' + 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' + DESC. Default: ASC.' entity_fieldname: order enum: - ASC @@ -50621,12 +71895,25 @@ entities: x_deprecation: null x_filter: {} - _key: list - description: Get update campaigns for devices specified by a filter. + description: 'Get update campaigns for devices specified by a filter. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state - data @@ -50680,7 +71967,7 @@ entities: fields: - _key: after api_fieldname: after - description: The ID of the 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: null external_param: true @@ -50704,7 +71991,7 @@ entities: - _key: include api_fieldname: include description: 'A comma-separated list of data fields to return. Currently supported: - total_count' + total_count.' entity_fieldname: include external_param: true in: query @@ -50729,7 +72016,7 @@ entities: - _key: order api_fieldname: order description: 'The order of the records. Acceptable values: ASC, DESC. Default: - ASC' + ASC.' entity_fieldname: order enum: - ASC @@ -50753,12 +72040,12 @@ entities: pagination: true parameter_map: campaign_id: id - path: /v3/update-campaigns/ + path: /v3/update-campaigns request_body: json request_content_type: application/json responses: - _key: '200' - description: Request successful + description: Request successful. schema: foreign_key: entity: update_campaign @@ -50773,69 +72060,128 @@ entities: - _key: data api_fieldname: data entity_fieldname: data - example: '[]' items: - _key: foreign_key entity: update_campaign group: Device_Update - _key: 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: + 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: - description: The time the update campaign was created + api_fieldname: created_at + description: The time the entity was created. + entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string description: - description: An optional description of the campaign - example: '' + 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 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: - description: The entity instance signature + api_fieldname: etag + description: API resource entity version. + entity_fieldname: etag example: '2017-05-22T12:37:58.753425Z' type: string finished: - description: The campaign finish timestamp + description: The time the campaign finished. example: '2017-05-22T12:37:55.576563Z' format: date-time type: string id: - description: The campaign ID - example: '00000000000000000000000000000000' + description: The campaign ID. + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: - description: The campaign name + description: The campaign name. example: campaign maxLength: 128 type: string object: - description: The API resource entity + description: 'Entity name: always ''update-campaign''.' example: update-campaign type: string phase: - description: The current phase of the campaign. - readOnly: true + description: The phase of the campaign. + enum: + - draft + - awaiting_approval + - timed + - starting + - active + - stopping + - stopped + - deleted + - archived type: string root_manifest_id: - example: '00000000000000000000000000000000' + 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: - example: http://example.com/00000000000000000000000000000000 + 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: 'DEPRECATED: The state of the campaign (use phase instead).' + description: The state of the campaign. enum: - draft - scheduled @@ -50862,55 +72208,206 @@ entities: 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: - description: The time the object was updated + api_fieldname: updated_at + description: The time the entity was updated. + entity_fieldname: updated_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + 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 - 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 + x-nullable: true + type: array + - _key: has_more + api_fieldname: has_more + entity_fieldname: has_more + type: boolean + - _key: limit + api_fieldname: limit + entity_fieldname: limit + type: integer + - _key: object + api_fieldname: object + description: '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 + entity_fieldname: total_count + type: integer + - _key: '400' + description: 'Validation error: The data used to update the campaign did not + 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 - x-nullable: true + required: + - name + - message + type: object type: array - - _key: has_more - api_fieldname: has_more - entity_fieldname: has_more - type: boolean - - _key: limit - api_fieldname: limit - entity_fieldname: limit - type: integer - - _key: object - api_fieldname: object - entity_fieldname: object - example: list + - _key: message + description: A human readable informative explanation + example: Validation error type: string - - _key: order - api_fieldname: order - description: 'The order of the records to return. Acceptable values: ASC, - DESC. Default: ASC' - entity_fieldname: order + - _key: object + description: Entity name, always `error`. enum: - - ASC - - DESC - example: ASC + - error type: string - - _key: total_count - api_fieldname: total_count - entity_fieldname: total_count - type: integer - - _key: '400' - description: 'Validation error: The data used to update the campaign did not - validate - - ' - - _key: '401' - description: Not authenticated + - _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 + 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 @@ -50975,26 +72472,49 @@ entities: - lte - gte - _key: read - description: Get an update campaign. + description: 'Get an update campaign. + +
+ + **Usage example:** + + ``` + + curl -X GET https://api.us-east-1.mbedcloud.com/v3/update-campaigns/11234567f9012ab56890120000789012 + \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state - - autostop_reason - - phase - created_at + - updated_at + - campaign_strategy + - active_at + - approval_required + - archived_at + - autostop + - autostop_success_percent + - autostop_reason - description - device_filter - finished - name - root_manifest_id - root_manifest_url + - starting_at - started_at + - stopping_at + - stopped_at + - phase - when - - updated_at field_renames: [] fields: - _key: device_filter_helper @@ -51011,11 +72531,12 @@ entities: type: filter - _key: id api_fieldname: id - description: The campaign 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 @@ -51025,17 +72546,44 @@ entities: pagination: false parameter_map: campaign_id: id - path: /v3/update-campaigns/{campaign_id}/ + path: /v3/update-campaigns/{campaign_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Retrieved result successfully + description: Retrieved result successfully. schema: - _key: foreign_key entity: update_campaign group: Device_Update - _key: properties + active_at: + api_fieldname: active_at + description: The time the campaign entered the active state. + entity_fieldname: active_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + approval_required: + api_fieldname: approval_required + description: Flag indicating whether approval is needed to start the campaign. + entity_fieldname: approval_required + example: 'false' + type: boolean + archived_at: + api_fieldname: archived_at + description: The time the campaign was archived. + entity_fieldname: archived_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + autostop: + api_fieldname: autostop + description: Flag indicating whether the campaign should be auto-stopped + on reaching a threshold. + entity_fieldname: autostop + example: 'false' + type: boolean autostop_reason: api_fieldname: autostop_reason description: Text description of why a campaign failed to start or why a @@ -51043,83 +72591,125 @@ entities: entity_fieldname: autostop_reason example: Insufficient billing credit. type: string + autostop_success_percent: + api_fieldname: autostop_success_percent + description: Percent of successful device updates to auto stop the campaign. + entity_fieldname: autostop_success_percent + example: '85.00' + format: double + type: number + campaign_strategy: + api_fieldname: campaign_strategy + 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`. + entity_fieldname: campaign_strategy + enum: + - one-shot + - continuous + type: string created_at: api_fieldname: created_at - description: The time the update campaign was created + description: The time the entity was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string description: api_fieldname: description - description: An optional description of the campaign + description: An optional description of the campaign. entity_fieldname: description - example: '' + example: This campaign updates Class XX devices to version 1.34 maxLength: 2000 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 - description: The entity instance signature + description: API resource entity version. entity_fieldname: etag example: '2017-05-22T12:37:58.753425Z' type: string finished: api_fieldname: finished - description: The campaign finish timestamp + description: The time the campaign finished. entity_fieldname: finished example: '2017-05-22T12:37:55.576563Z' format: date-time type: string id: api_fieldname: id - description: The campaign ID + description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name - description: The campaign name + description: The campaign name. entity_fieldname: name example: campaign maxLength: 128 type: string object: api_fieldname: object - description: The API resource entity + description: 'Entity name: always ''update-campaign''.' entity_fieldname: object example: update-campaign type: string phase: api_fieldname: phase - description: The current phase of the campaign. + description: The phase of the campaign. entity_fieldname: phase - readOnly: true + enum: + - draft + - awaiting_approval + - timed + - starting + - active + - stopping + - stopped + - deleted + - archived type: string root_manifest_id: api_fieldname: root_manifest_id + 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 + description: The time the campaign was started. entity_fieldname: started_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + starting_at: + api_fieldname: starting_at + description: The time the campaign will be started. + entity_fieldname: starting_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string state: api_fieldname: state - description: 'DEPRECATED: The state of the campaign (use phase instead).' + description: The state of the campaign. entity_fieldname: state enum: - draft @@ -51147,9 +72737,23 @@ entities: end_of_life_at: '2020-03-18T14:55:20+00:00' issued_at: '2019-03-18T14:55:20+00:00' links: [] + stopped_at: + api_fieldname: stopped_at + description: The time the campaign was stopped. + entity_fieldname: stopped_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + stopping_at: + api_fieldname: stopping_at + description: The time the campaign will be stopped. + entity_fieldname: stopping_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string updated_at: api_fieldname: updated_at - description: The time the object was updated + description: The time the entity was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -51165,13 +72769,151 @@ entities: x-nullable: true - _key: '400' description: 'Validation error: The data used to update the campaign did not - validate + 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 + 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 + 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 @@ -51181,12 +72923,26 @@ entities: x_deprecation: null x_filter: {} - _key: start - description: This command will begin the process of starting a campaign. + description: 'Start a campaign. + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/5d645eaec2315a8900002e655cd94fa8/start + \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state field_renames: [] @@ -51205,12 +72961,13 @@ entities: type: filter - _key: id api_fieldname: campaign_id - description: The campaign ID + description: The campaign ID. entity_fieldname: id external_param: false in: path name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -51228,12 +72985,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 @@ -51243,12 +73184,27 @@ entities: x_deprecation: null x_filter: {} - _key: stop - description: This command will begin the process of stopping a campaign. + description: 'Stop a campaign. Stopping is a process that requires the campaign + go through several [phases](https://www.pelion.com/docs/device-management/current/updating-firmware/device-management-update-using-the-apis.html). + +
+ + **Usage example:** + + ``` + + curl -X POST https://api.us-east-1.mbedcloud.com/v3/update-campaigns/016e83ddc645000000000001001000b5/stop + \ + + -H ''Authorization: Bearer '' + + ``` + + ' drop_fields: - object - etag - type - - groups - filter - state field_renames: [] @@ -51267,12 +73223,13 @@ entities: type: filter - _key: id api_fieldname: campaign_id - description: The campaign ID + description: The campaign ID. entity_fieldname: id external_param: false in: path name: campaign_id parameter_fieldname: campaign_id + pattern: '[A-Fa-f0-9]{32}' required: true type: string group_id: Device_Update @@ -51290,12 +73247,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 @@ -51305,28 +73446,67 @@ entities: x_deprecation: null x_filter: {} - _key: update - description: Modify an update campaign. + 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" drop_fields: - object - etag - type - - groups - filter - state - - autostop_reason - - phase - created_at + - updated_at + - campaign_strategy + - active_at + - archived_at + - autostop_reason - finished - root_manifest_url + - starting_at - started_at - - updated_at + - stopping_at + - stopped_at + - phase field_renames: [] fields: + - _key: approval_required + api_fieldname: approval_required + description: Flag indicating whether approval is needed to start the campaign. + entity_fieldname: approval_required + example: 'false' + in: body + parameter_fieldname: approval_required + required: false + type: boolean + - _key: autostop + api_fieldname: autostop + description: Flag indicating whether the campaign should be auto-stopped on + reaching a threshold. + entity_fieldname: autostop + example: 'false' + in: body + parameter_fieldname: autostop + required: false + type: boolean + - _key: autostop_success_percent + api_fieldname: autostop_success_percent + description: Percent of successful device updates to auto stop the campaign. + entity_fieldname: autostop_success_percent + example: '85.00' + format: double + in: body + parameter_fieldname: autostop_success_percent + required: false + type: number - _key: description api_fieldname: description - description: An optional description of the campaign + description: An optional description of the campaign. entity_fieldname: description - example: '' + example: This campaign updates Class XX devices to version 1.34 in: body maxLength: 2000 parameter_fieldname: description @@ -51334,9 +73514,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 @@ -51355,16 +73536,17 @@ entities: type: filter - _key: id api_fieldname: id - description: The campaign 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 api_fieldname: name - description: The campaign name + description: The campaign name. entity_fieldname: name example: campaign in: body @@ -51374,8 +73556,10 @@ entities: type: string - _key: root_manifest_id api_fieldname: root_manifest_id + 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 @@ -51399,17 +73583,44 @@ entities: pagination: false parameter_map: campaign_id: id - path: /v3/update-campaigns/{campaign_id}/ + path: /v3/update-campaigns/{campaign_id} request_body: json request_content_type: application/json responses: - _key: '200' - description: Update campaign updated + description: Update campaign updated. schema: - _key: foreign_key entity: update_campaign group: Device_Update - _key: properties + active_at: + api_fieldname: active_at + description: The time the campaign entered the active state. + entity_fieldname: active_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + approval_required: + api_fieldname: approval_required + description: Flag indicating whether approval is needed to start the campaign. + entity_fieldname: approval_required + example: 'false' + type: boolean + archived_at: + api_fieldname: archived_at + description: The time the campaign was archived. + entity_fieldname: archived_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + autostop: + api_fieldname: autostop + description: Flag indicating whether the campaign should be auto-stopped + on reaching a threshold. + entity_fieldname: autostop + example: 'false' + type: boolean autostop_reason: api_fieldname: autostop_reason description: Text description of why a campaign failed to start or why a @@ -51417,83 +73628,125 @@ entities: entity_fieldname: autostop_reason example: Insufficient billing credit. type: string + autostop_success_percent: + api_fieldname: autostop_success_percent + description: Percent of successful device updates to auto stop the campaign. + entity_fieldname: autostop_success_percent + example: '85.00' + format: double + type: number + campaign_strategy: + api_fieldname: campaign_strategy + 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`. + entity_fieldname: campaign_strategy + enum: + - one-shot + - continuous + type: string created_at: api_fieldname: created_at - description: The time the update campaign was created + description: The time the entity was created. entity_fieldname: created_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string description: api_fieldname: description - description: An optional description of the campaign + description: An optional description of the campaign. entity_fieldname: description - example: '' + example: This campaign updates Class XX devices to version 1.34 maxLength: 2000 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 - description: The entity instance signature + description: API resource entity version. entity_fieldname: etag example: '2017-05-22T12:37:58.753425Z' type: string finished: api_fieldname: finished - description: The campaign finish timestamp + description: The time the campaign finished. entity_fieldname: finished example: '2017-05-22T12:37:55.576563Z' format: date-time type: string id: api_fieldname: id - description: The campaign ID + description: The campaign ID. entity_fieldname: id - example: '00000000000000000000000000000000' + example: 016e83ddc648000000000001001000f5 + pattern: '[A-Fa-f0-9]{32}' type: string name: api_fieldname: name - description: The campaign name + description: The campaign name. entity_fieldname: name example: campaign maxLength: 128 type: string object: api_fieldname: object - description: The API resource entity + description: 'Entity name: always ''update-campaign''.' entity_fieldname: object example: update-campaign type: string phase: api_fieldname: phase - description: The current phase of the campaign. + description: The phase of the campaign. entity_fieldname: phase - readOnly: true + enum: + - draft + - awaiting_approval + - timed + - starting + - active + - stopping + - stopped + - deleted + - archived type: string root_manifest_id: api_fieldname: root_manifest_id + 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 + description: The time the campaign was started. entity_fieldname: started_at example: '2017-05-22T12:37:55.576563Z' format: date-time type: string + starting_at: + api_fieldname: starting_at + description: The time the campaign will be started. + entity_fieldname: starting_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string state: api_fieldname: state - description: 'DEPRECATED: The state of the campaign (use phase instead).' + description: The state of the campaign. entity_fieldname: state enum: - draft @@ -51521,9 +73774,23 @@ entities: end_of_life_at: '2020-03-18T14:55:20+00:00' issued_at: '2019-03-18T14:55:20+00:00' links: [] + stopped_at: + api_fieldname: stopped_at + description: The time the campaign was stopped. + entity_fieldname: stopped_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string + stopping_at: + api_fieldname: stopping_at + description: The time the campaign will be stopped. + entity_fieldname: stopping_at + example: '2017-05-22T12:37:55.576563Z' + format: date-time + type: string updated_at: api_fieldname: updated_at - description: The time the object was updated + description: The time the entity was updated. entity_fieldname: updated_at example: '2017-05-22T12:37:55.576563Z' format: date-time @@ -51539,16 +73806,16 @@ entities: x-nullable: true - _key: '400' description: 'Validation error: The data used to update the campaign did not - validate + validate. ' - _key: '401' - description: Not authenticated + description: Not authenticated. - _key: '403' description: Fields apart from 'name', 'description' and 'state' cannot be modified when the state is not 'draft'. - _key: '404' - description: Update campaign can't be found + description: Update campaign can't be found. return_info: custom: false self: true @@ -51564,7 +73831,8 @@ entities: - UpdateCampaignPage - UpdateCampaignPostRequest - UpdateCampaignPutRequest - tags: [] + tags: + - Device update - campaigns - _key: user field_renames: [] fields: @@ -51592,6 +73860,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -51694,6 +73969,14 @@ entities: required: false type: string x-nullable: true + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups this user belongs to. + items: + type: string + readOnly: false + required: false + type: array - _key: id api_fieldname: id description: The ID of the user. @@ -51789,11 +74072,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 @@ -51801,17 +74092,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -51894,8 +74187,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:** @@ -51904,7 +74199,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'' \ @@ -51915,7 +74210,6 @@ entities: - object - etag - type - - groups - filter - id - created_at @@ -51975,6 +74269,16 @@ entities: required: false type: string x-nullable: true + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups this user belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: is_gtc_accepted api_fieldname: is_gtc_accepted description: A flag indicating that the user has accepted General Terms and @@ -52007,11 +74311,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 @@ -52019,20 +74331,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: type - enum: &id017 + entity_fieldname: login_profile_type + enum: &id024 - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string - required: &id018 + required: &id025 - id type: object parameter_fieldname: login_profiles @@ -52115,6 +74429,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -52313,11 +74634,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 @@ -52325,17 +74654,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -52624,6 +74955,8 @@ entities: - _key: delete description: 'Delete a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -52631,14 +74964,13 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter field_renames: [] fields: @@ -52713,8 +75045,104 @@ entities: - request_id - type type: object - - _key: '401' - description: Authentication failure. + - _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: '404' + description: A user with the specified ID does not exist. schema: properties: - _key: code @@ -52761,8 +75189,479 @@ entities: - request_id - type type: object - - _key: '403' - description: Forbidden. + return_info: + custom: false + self: true + type: user + return_type: user + summary: Delete a user. + x_deprecation: null + x_filter: {} + - _key: list + 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/users \ + + -H ''Authorization: Bearer '' + + ```' + drop_fields: + - object + - etag + - type + - filter + - total_count + - has_more + - data + - email__eq + - status__eq + - status__in + - status__nin + - login_profiles__eq + field_renames: [] + fields: + - _key: after + api_fieldname: after + 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: 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 + 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: order + api_fieldname: order + default: ASC + description: 'Record order based on creation. Acceptable values: ASC, DESC. + Default: ASC.' + entity_fieldname: order + enum: + - ASC + - DESC + enum_reference: user_order_enum + external_param: true + in: query + name: order + parameter_fieldname: order + required: false + type: string + foreign_key: + entity: user + group: Accounts + foreign_key_priority: self + group_id: Accounts + method: get + mode: list + operation_id: getAllUsers + pagination: true + parameter_map: + user_id: id + path: /v3/users + request_body: json + request_content_type: application/json + responses: + - _key: '200' + description: Successful operation. + schema: + foreign_key: + entity: user + group: Accounts + 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: + description: Represents a user in Device Management. + foreign_key: + entity: user + group: Accounts + properties: + - _key: account_id + description: The ID of the account. + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: active_sessions + description: List of active user sessions. + items: + description: Represents an active user session. + foreign_key: + entity: active_session + group: Accounts + properties: + - _key: account_id + api_fieldname: account_id + description: The UUID of the account. + entity_fieldname: account_id + example: 01619571e2e90242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _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 + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: login_time + api_fieldname: login_time + description: The login time of the user. + entity_fieldname: login_time + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: object + api_fieldname: object + description: 'Entity name: always ''user-session''' + entity_fieldname: object + enum: + - user-session + type: string + - _key: reference_token + api_fieldname: reference_token + description: The reference token. + entity_fieldname: reference_token + example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk + type: string + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + type: array + - _key: address + description: Address. + example: 110 Fulbourn Rd, Cambridge, United Kingdom + 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: creation_time + description: A timestamp of the user creation in the storage, in milliseconds. + example: 1518630727683 + format: int64 + type: integer + - _key: custom_fields + additionalProperties: + type: string + description: User's account-specific custom properties. The value is + a string. + type: object + x-nullable: true + - _key: email + description: The email address. + example: user@arm.com + pattern: ^(?=.{3,254}$).+\@.+ + type: string + - _key: email_verified + description: A flag indicating whether the user's email address has + been verified or not. + example: true + type: boolean + - _key: etag + description: API resource entity version. + example: '1' + type: string + - _key: full_name + description: The full name of the user. + example: User Doe + maxLength: 100 + type: string + x-nullable: true + - _key: groups + description: A list of IDs of the groups this user belongs to. + items: + type: string + type: array + - _key: id + description: The ID of the user. + example: 01619571e2e89242ac12000600000000 + pattern: '[a-f0-9]{32}' + type: string + - _key: is_gtc_accepted + description: A flag indicating that the user has accepted General Terms + and Conditions. + example: true + type: boolean + - _key: is_marketing_accepted + description: A flag indicating that the user has consented to receive + marketing information. + example: true + type: boolean + - _key: is_totp_enabled + description: A flag indicating whether two-factor authentication (TOTP) + has been enabled. + example: true + type: boolean + - _key: last_login_time + description: A timestamp of the latest login of the user, in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: 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: + description: Represents an entry in login history. + foreign_key: + entity: login_history + group: Accounts + properties: + - _key: date + api_fieldname: date + description: UTC time RFC3339 for this login attempt. + entity_fieldname: date + example: '2018-02-14T17:52:07Z' + format: date-time + type: string + - _key: ip_address + api_fieldname: ip_address + description: IP address of the client. + entity_fieldname: ip_address + example: 127.0.0.1 + type: string + - _key: success + api_fieldname: success + description: Flag indicating whether login attempt was successful + or not. + entity_fieldname: success + example: true + type: boolean + - _key: user_agent + api_fieldname: user_agent + description: User Agent header from the login request. + entity_fieldname: user_agent + 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 + maxItems: 5 + type: array + - _key: login_profiles + description: A list of login profiles for the user. Specified as the + identity providers the user is associated with. + items: + description: Represents a user login profile in Device Management. + foreign_key: + 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 + _override: true + 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: + - NATIVE + - MBED + - SAML2 + - OIDC + example: NATIVE + readOnly: true + type: string + required: + - id + type: object + type: array + x-nullable: true + - _key: object + description: 'Entity name: always `user`.' + enum: + - user + type: string + - _key: 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 + - _key: password_changed_time + description: A timestamp of the latest change of the user password, + in milliseconds. + example: 1518630727688 + format: int64 + type: integer + - _key: phone_number + description: Phone number. + example: +44 (1223) 400 400 + maxLength: 100 + type: string + x-nullable: true + - _key: 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 + - _key: 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 + - _key: updated_at + description: Last update UTC time RFC3339. + example: '2018-02-14T15:24:14Z' + format: date-time + type: string + - _key: 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 + 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 (2-1000), 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 + api_fieldname: total_count + description: The total number of records, if requested. + entity_fieldname: total_count + example: 20 + format: int32 + type: integer + required: + - data + - has_more + - limit + - object + - total_count + type: object + - _key: '401' + description: Authentication failure. schema: properties: - _key: code @@ -52809,8 +75708,8 @@ entities: - request_id - type type: object - - _key: '404' - description: A user with the specified ID does not exist. + - _key: '403' + description: Forbidden. schema: properties: - _key: code @@ -52861,42 +75760,46 @@ entities: custom: false self: true type: user - return_type: user - summary: Delete a user. + return_type: paginated_response(user) + summary: Get users. x_deprecation: null - x_filter: {} - - _key: list - description: 'Retrieve the details of all users. + x_filter: + email: + - eq + login_profiles: + - eq + status: + - eq + - in + - nin + - _key: policy_groups + 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/users \ + curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id}/groups \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - total_count - has_more - data - - email__eq - - status__eq - - status__in - - status__nin - - login_profiles__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 @@ -52906,6 +75809,16 @@ entities: pattern: '[a-f0-9]{32}' required: false type: string + - _key: id + api_fieldname: user_id + description: The ID of the user. + entity_fieldname: id + external_param: false + in: path + name: user_id + parameter_fieldname: user_id + required: true + type: string - _key: include api_fieldname: include description: 'Comma-separated additional data to return. Currently supported: @@ -52933,7 +75846,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: @@ -52947,17 +75860,15 @@ entities: required: false type: string foreign_key: - entity: user - group: Accounts - foreign_key_priority: self + entity: policy_group group_id: Accounts method: get - mode: list - operation_id: getAllUsers + mode: policy_groups + operation_id: getGroupsOfUser pagination: true parameter_map: user_id: id - path: /v3/users + path: /v3/users/{user_id}/groups request_body: json request_content_type: application/json responses: @@ -52965,13 +75876,13 @@ entities: description: Successful operation. schema: foreign_key: - entity: user + entity: subtenant_policy_group group: Accounts 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}' @@ -52981,290 +75892,73 @@ entities: description: A list of entities. entity_fieldname: data items: - description: Represents a user in Device Management. + description: This object contains basic information about groups. foreign_key: - entity: user + entity: subtenant_policy_group group: Accounts properties: - _key: account_id - description: The ID of the account. + description: The ID of the account this group belongs to. example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string - - _key: active_sessions - description: List of active user sessions. - items: - description: Represents an active user session. - foreign_key: - entity: active_session - group: Accounts - properties: - - _key: account_id - api_fieldname: account_id - description: The UUID of the account. - entity_fieldname: account_id - example: 01619571e2e90242ac12000600000000 - pattern: '[a-f0-9]{32}' - type: string - - _key: ip_address - api_fieldname: ip_address - description: IP address of the client. - entity_fieldname: ip_address - example: 127.0.0.1 - type: string - - _key: login_time - api_fieldname: login_time - description: The login time of the user. - entity_fieldname: login_time - example: '2018-02-14T17:52:07Z' - format: date-time - type: string - - _key: object - api_fieldname: object - description: 'Entity name: always ''user-session''' - entity_fieldname: object - enum: - - user-session - type: string - - _key: reference_token - api_fieldname: reference_token - description: The reference token. - entity_fieldname: reference_token - example: rt_CI6+5hS8p9DrCmkRyS6u4doUdiXr71dX7MqD+g0327hYQthEkYTxMMnCwHyf1rDdk - type: string - - _key: user_agent - api_fieldname: user_agent - description: User Agent header from the login request. - entity_fieldname: user_agent - 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 - type: array - - _key: address - description: Address. - example: 110 Fulbourn Rd, Cambridge, United Kingdom - type: string - x-nullable: true + - _key: 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: [] + - _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' format: date-time type: string - - _key: creation_time - description: A timestamp of the user creation in the storage, in milliseconds. - example: 1518630727683 - format: int64 - type: integer - - _key: custom_fields - additionalProperties: - type: string - description: User's account-specific custom properties. The value is - a string. - type: object - x-nullable: true - - _key: email - description: The email address. - example: user@arm.com - pattern: ^(?=.{3,254}$).+\@.+ - type: string - - _key: email_verified - description: A flag indicating whether the user's email address has - been verified or not. - example: true - type: boolean - _key: etag description: API resource entity version. example: '1' type: string - - _key: full_name - description: The full name of the user. - example: User Doe - maxLength: 100 - type: string - x-nullable: true - - _key: groups - description: A list of IDs of the groups this user belongs to. - items: - type: string - type: array - _key: id - description: The ID of the user. - example: 01619571e2e89242ac12000600000000 + description: The ID of the group. + example: 01619571dec00242ac12000600000000 pattern: '[a-f0-9]{32}' type: string - - _key: is_gtc_accepted - description: A flag indicating that the user has accepted General Terms - and Conditions. - example: true - type: boolean - - _key: is_marketing_accepted - description: A flag indicating that the user has consented to receive - marketing information. - example: true - type: boolean - - _key: is_totp_enabled - description: A flag indicating whether two-factor authentication (TOTP) - has been enabled. - example: true - type: boolean - - _key: last_login_time - description: A timestamp of the latest login of the user, in milliseconds. - example: 1518630727688 - format: int64 - type: integer - - _key: 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: - description: Represents an entry in login history. - foreign_key: - entity: login_history - group: Accounts - properties: - - _key: date - api_fieldname: date - description: UTC time RFC3339 for this login attempt. - entity_fieldname: date - example: '2018-02-14T17:52:07Z' - format: date-time - type: string - - _key: ip_address - api_fieldname: ip_address - description: IP address of the client. - entity_fieldname: ip_address - example: 127.0.0.1 - type: string - - _key: success - api_fieldname: success - description: Flag indicating whether login attempt was successful - or not. - entity_fieldname: success - example: true - type: boolean - - _key: user_agent - api_fieldname: user_agent - description: User Agent header from the login request. - entity_fieldname: user_agent - 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 - maxItems: 5 - type: array - - _key: login_profiles - description: A list of login profiles for the user. Specified as the - identity providers the user is associated with. - items: - description: Represents a user login profile in Device Management. - foreign_key: - entity: login_profile - group: Accounts - properties: - - _key: id - _override: true - api_fieldname: id - description: ID of the identity provider. - entity_fieldname: id - readOnly: false - type: string - - _key: name - _override: true - api_fieldname: name - description: Name of the identity provider. - entity_fieldname: name - readOnly: false - type: string - - _key: type - api_fieldname: type - description: Identity provider type. - entity_fieldname: type - enum: - - NATIVE - - MBED - - SAML2 - - OIDC - readOnly: true - type: string - required: - - id - type: object - type: array - x-nullable: true - - _key: object - description: 'Entity name: always `user`.' - enum: - - user - type: string - - _key: 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 - - _key: password_changed_time - description: A timestamp of the latest change of the user password, - in milliseconds. - example: 1518630727688 - format: int64 - type: integer - - _key: phone_number - description: Phone number. - example: +44 (1223) 400 400 + - _key: name + description: The name of the group. + example: Administrators maxLength: 100 type: string - x-nullable: true - - _key: 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. + - _key: object + description: 'Entity name: always `group`.' enum: - - ENROLLING - - INVITED - - ACTIVE - - RESET - - INACTIVE - example: ACTIVE + - group type: string - - _key: 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 - _key: updated_at description: Last update UTC time RFC3339. example: '2018-02-14T15:24:14Z' format: date-time type: string - - _key: username - description: A username. - example: admin - pattern: '[\w\-,._@+=]{4,30}' - type: string - x-nullable: true + - _key: user_count + description: The number of users in this group. + example: 1 + format: int32 + type: integer required: - account_id - - email + - apikey_count - etag - id + - name - object - - status + - user_count type: object type: array - _key: has_more @@ -53406,25 +76100,67 @@ entities: - request_id - type type: object + - _key: '404' + description: A user with the given ID does not exist. + 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: user - return_type: paginated_response(user) - summary: Get the details of all users. + self: false + type: policy_group + return_type: paginated_response(policy_group) + summary: Get policy groups for a user. x_deprecation: null - x_filter: - email: - - eq - login_profiles: - - eq - status: - - eq - - in - - nin + x_filter: {} - _key: read description: 'Retrieve the details of a user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -53432,14 +76168,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/users/{user_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - created_at - updated_at @@ -53450,6 +76185,7 @@ entities: - email - address - phone_number + - groups - is_gtc_accepted - is_marketing_accepted - email_verified @@ -53518,6 +76254,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -53716,11 +76459,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 @@ -53728,17 +76479,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -53977,7 +76730,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:** @@ -53986,7 +76741,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'' \ @@ -53997,7 +76752,6 @@ entities: - object - etag - type - - groups - filter - email - two_factor_auth_enabled @@ -54037,6 +76791,16 @@ entities: required: false type: string x-nullable: true + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups this user belongs to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: id api_fieldname: id description: The ID of the user. @@ -54089,11 +76853,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 @@ -54101,16 +76873,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: type - enum: *id017 + entity_fieldname: login_profile_type + enum: *id024 + example: NATIVE readOnly: true type: string - required: *id018 + required: *id025 type: object parameter_fieldname: login_profiles required: false @@ -54181,6 +76955,13 @@ entities: example: 01619571e2e90242ac12000600000000 pattern: '[a-f0-9]{32}' type: string + - _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 + type: string - _key: ip_address api_fieldname: ip_address description: IP address of the client. @@ -54379,11 +77160,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 @@ -54391,17 +77180,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -54737,6 +77528,7 @@ entities: x_filter: {} primary_key_field: id swagger_models: + - GroupSummaryList - UserInfoReq - UserInfoResp - UserInfoRespList @@ -54778,6 +77570,14 @@ entities: readOnly: true required: false type: string + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups the user is invited to. + items: + type: string + readOnly: false + required: false + type: array - _key: id api_fieldname: id description: The ID of the invitation. @@ -54796,11 +77596,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 @@ -54808,17 +77616,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -54849,6 +77659,8 @@ entities: - _key: create description: 'Invite a new or existing user. + Note: This endpoint is restricted to administrators. + **Example:** @@ -54856,7 +77668,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'' \ @@ -54867,7 +77679,6 @@ entities: - object - etag - type - - groups - filter - id - created_at @@ -54887,6 +77698,16 @@ entities: pattern: ^(?=.{3,254}$).+\@.+ required: true type: string + - _key: groups + api_fieldname: groups + description: A list of IDs of the groups the user is invited to. + entity_fieldname: groups + in: body + items: + type: string + parameter_fieldname: groups + required: false + type: array - _key: login_profiles api_fieldname: login_profiles description: A list of login profiles for the user. Specified as the identity @@ -54899,11 +77720,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 @@ -54911,17 +77740,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -55024,11 +77855,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 @@ -55036,17 +77875,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -55238,6 +78079,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:** @@ -55246,14 +78089,13 @@ entities: curl -X DELETE https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter field_renames: [] fields: @@ -55433,7 +78275,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:** @@ -55442,14 +78286,13 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - total_count - has_more @@ -55459,7 +78302,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 @@ -55485,7 +78328,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: @@ -55523,7 +78366,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}' @@ -55581,11 +78424,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 @@ -55593,17 +78444,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -55779,7 +78632,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: @@ -55787,6 +78640,8 @@ entities: - _key: read description: 'Retrieve the details of an active user invitation. + Note: This endpoint is restricted to administrators. + **Example:** @@ -55795,20 +78650,20 @@ entities: curl -X GET https://api.us-east-1.mbedcloud.com/v3/user-invitations/{invitation_id} \ - -H ''Authorization: Bearer '' + -H ''Authorization: Bearer '' ```' drop_fields: - object - etag - type - - groups - filter - created_at - updated_at - email - user_id - account_id + - groups - expiration - login_profiles field_renames: [] @@ -55901,11 +78756,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 @@ -55913,17 +78776,19 @@ 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: type + entity_fieldname: login_profile_type enum: - NATIVE - MBED - SAML2 - OIDC + example: NATIVE readOnly: true type: string required: @@ -56124,18 +78989,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 @@ -56147,6 +79008,14 @@ entities: - CertificateIssuerVerifyResponse tags: [] enums: +- _key: account_business_model_enum + entity_name: account + enum_name: account_business_model_enum + field_name: business_model + group_id: Accounts + values: + - active_device_business_model + - api_calls_1_business_model - _key: account_mfa_status_enum entity_name: account enum_name: account_mfa_status_enum @@ -56351,14 +79220,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 @@ -56367,6 +79228,14 @@ enums: values: - ASC - DESC +- _key: device_lifecycle_status_enum + entity_name: device + enum_name: device_lifecycle_status_enum + field_name: lifecycle_status + group_id: Devices + values: + - blocked + - enabled - _key: device_mechanism_enum entity_name: device enum_name: device_mechanism_enum @@ -56394,6 +79263,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 @@ -56402,6 +79279,56 @@ 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: + - '1' + - '3' +- _key: identity_provider_algorithm_enum + entity_name: identity_provider + enum_name: identity_provider_algorithm_enum + field_name: algorithm + group_id: Accounts + values: + - EC224 + - EC256 + - EC384 + - EC521 + - ECDSA224 + - ECDSA256 + - ECDSA384 + - ECDSA521 + - RSA2048 + - RSA3072 +- _key: identity_provider_order_enum + entity_name: identity_provider + enum_name: identity_provider_order_enum + field_name: order + group_id: Accounts + values: + - ASC + - DESC +- _key: identity_provider_status_enum + entity_name: identity_provider + enum_name: identity_provider_status_enum + field_name: status + group_id: Accounts + values: + - ACTIVE + - SUSPENDED +- _key: identity_provider_type_enum + entity_name: identity_provider + enum_name: identity_provider_type_enum + field_name: identity_provider_type + group_id: Accounts + values: + - MBED + - NATIVE + - OIDC + - SAML2 - _key: light_theme_color_reference_enum entity_name: light_theme_color enum_name: light_theme_color_reference_enum @@ -56467,6 +79394,49 @@ enums: - desktop_background_landscape - desktop_background_portrait - desktop_background_square +- _key: login_profile_type_enum + entity_name: login_profile + enum_name: login_profile_type_enum + field_name: login_profile_type + group_id: Accounts + values: + - MBED + - NATIVE + - OIDC + - SAML2 +- _key: oidc_request_token_mode_enum + entity_name: oidc_request + enum_name: oidc_request_token_mode_enum + field_name: token_request_mode + group_id: Accounts + values: + - GET + - POST +- _key: policy_group_order_enum + entity_name: policy_group + enum_name: policy_group_order_enum + field_name: order + group_id: Accounts + values: + - ASC + - DESC +- _key: policy_inherited_type_enum + entity_name: policy + enum_name: policy_inherited_type_enum + field_name: inherited_type + group_id: Accounts + values: + - account + - template + - tier_template +- _key: subtenant_api_key_order_enum + entity_name: subtenant_api_key + enum_name: subtenant_api_key_order_enum + field_name: order + group_id: Accounts + values: + - ASC + - DESC - _key: subtenant_api_key_status_enum entity_name: subtenant_api_key enum_name: subtenant_api_key_status_enum @@ -56540,6 +79510,38 @@ enums: - desktop_background_landscape - desktop_background_portrait - desktop_background_square +- _key: subtenant_identity_provider_algorithm_enum + entity_name: subtenant_identity_provider + enum_name: subtenant_identity_provider_algorithm_enum + field_name: algorithm + group_id: Accounts + values: + - EC224 + - EC256 + - EC384 + - EC521 + - ECDSA224 + - ECDSA256 + - ECDSA384 + - ECDSA521 + - RSA2048 + - RSA3072 +- _key: subtenant_identity_provider_order_enum + entity_name: subtenant_identity_provider + enum_name: subtenant_identity_provider_order_enum + field_name: order + group_id: Accounts + values: + - ASC + - DESC +- _key: subtenant_identity_provider_status_enum + entity_name: subtenant_identity_provider + enum_name: subtenant_identity_provider_status_enum + field_name: status + group_id: Accounts + values: + - ACTIVE + - SUSPENDED - _key: subtenant_light_theme_color_reference_enum entity_name: subtenant_light_theme_color enum_name: subtenant_light_theme_color_reference_enum @@ -56605,6 +79607,14 @@ enums: - desktop_background_landscape - desktop_background_portrait - desktop_background_square +- _key: subtenant_policy_group_order_enum + entity_name: subtenant_policy_group + enum_name: subtenant_policy_group_order_enum + field_name: order + group_id: Accounts + values: + - ASC + - DESC - _key: subtenant_trusted_certificate_service_enum entity_name: subtenant_trusted_certificate enum_name: subtenant_trusted_certificate_service_enum @@ -56621,6 +79631,14 @@ enums: values: - ACTIVE - INACTIVE +- _key: subtenant_user_order_enum + entity_name: subtenant_user + enum_name: subtenant_user_order_enum + field_name: order + group_id: Accounts + values: + - ASC + - DESC - _key: subtenant_user_status_enum entity_name: subtenant_user enum_name: subtenant_user_status_enum @@ -56664,6 +79682,29 @@ enums: values: - ASC - DESC +- _key: update_campaign_phase_enum + entity_name: update_campaign + enum_name: update_campaign_phase_enum + field_name: phase + group_id: Device_Update + values: + - active + - archived + - awaiting_approval + - deleted + - draft + - starting + - stopped + - stopping + - timed +- _key: update_campaign_strategy_enum + entity_name: update_campaign + enum_name: update_campaign_strategy_enum + field_name: campaign_strategy + group_id: Device_Update + values: + - continuous + - one-shot - _key: user_invitation_order_enum entity_name: user_invitation enum_name: user_invitation_order_enum @@ -56707,17 +79748,40 @@ groups: - api_key - subtenant_api_key - account + - policy_group + - subtenant_policy_group + - identity_provider + - subtenant_identity_provider + - saml2_request + - oidc_request + - oidc_request_claim_mapping + - identity_provider_public_key enums: + - policy_inherited_type_enum + - login_profile_type_enum - user_status_enum - user_order_enum - subtenant_user_status_enum + - subtenant_user_order_enum - user_invitation_order_enum - api_key_status_enum - api_key_order_enum - subtenant_api_key_status_enum + - subtenant_api_key_order_enum - account_status_enum - account_mfa_status_enum + - account_business_model_enum - account_order_enum + - policy_group_order_enum + - subtenant_policy_group_order_enum + - identity_provider_status_enum + - identity_provider_type_enum + - identity_provider_order_enum + - identity_provider_algorithm_enum + - subtenant_identity_provider_status_enum + - subtenant_identity_provider_order_enum + - subtenant_identity_provider_algorithm_enum + - oidc_request_token_mode_enum - _key: Branding entities: - dark_theme_color @@ -56747,10 +79811,14 @@ groups: - firmware_manifest enums: - campaign_device_metadata_deployment_state_enum + - update_campaign_strategy_enum + - update_campaign_phase_enum - update_campaign_order_enum - 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: @@ -56760,15 +79828,14 @@ groups: - device_enrollment_bulk_create - device_enrollment_bulk_delete - device_enrollment - - device_enrollment_denial enums: + - device_lifecycle_status_enum - device_deployed_state_enum - device_mechanism_enum - device_state_enum - 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/src/mbed_cloud/foundation/__init__.py b/src/mbed_cloud/foundation/__init__.py index 1e05327f..30628abb 100644 --- a/src/mbed_cloud/foundation/__init__.py +++ b/src/mbed_cloud/foundation/__init__.py @@ -15,12 +15,20 @@ - :mod:`mbed_cloud.foundation.entities.accounts.account` - :mod:`mbed_cloud.foundation.entities.accounts.active_session` - :mod:`mbed_cloud.foundation.entities.accounts.api_key` +- :mod:`mbed_cloud.foundation.entities.accounts.identity_provider` +- :mod:`mbed_cloud.foundation.entities.accounts.identity_provider_public_key` - :mod:`mbed_cloud.foundation.entities.accounts.login_history` - :mod:`mbed_cloud.foundation.entities.accounts.login_profile` +- :mod:`mbed_cloud.foundation.entities.accounts.oidc_request` +- :mod:`mbed_cloud.foundation.entities.accounts.oidc_request_claim_mapping` - :mod:`mbed_cloud.foundation.entities.accounts.parent_account` - :mod:`mbed_cloud.foundation.entities.accounts.password_policy` - :mod:`mbed_cloud.foundation.entities.accounts.policy` +- :mod:`mbed_cloud.foundation.entities.accounts.policy_group` +- :mod:`mbed_cloud.foundation.entities.accounts.saml2_request` - :mod:`mbed_cloud.foundation.entities.accounts.subtenant_api_key` +- :mod:`mbed_cloud.foundation.entities.accounts.subtenant_identity_provider` +- :mod:`mbed_cloud.foundation.entities.accounts.subtenant_policy_group` - :mod:`mbed_cloud.foundation.entities.accounts.subtenant_user` - :mod:`mbed_cloud.foundation.entities.accounts.subtenant_user_invitation` - :mod:`mbed_cloud.foundation.entities.accounts.user` @@ -93,12 +101,20 @@ accounts = pelion_dm_sdk.foundation.account() active_sessions = pelion_dm_sdk.foundation.active_session() api_keys = pelion_dm_sdk.foundation.api_key() + identity_providers = pelion_dm_sdk.foundation.identity_provider() + identity_provider_public_keys = pelion_dm_sdk.foundation.identity_provider_public_key() login_historys = pelion_dm_sdk.foundation.login_history() login_profiles = pelion_dm_sdk.foundation.login_profile() + oidc_requests = pelion_dm_sdk.foundation.oidc_request() + oidc_request_claim_mappings = pelion_dm_sdk.foundation.oidc_request_claim_mapping() parent_accounts = pelion_dm_sdk.foundation.parent_account() password_policys = pelion_dm_sdk.foundation.password_policy() policys = pelion_dm_sdk.foundation.policy() + policy_groups = pelion_dm_sdk.foundation.policy_group() + saml2_requests = pelion_dm_sdk.foundation.saml2_request() subtenant_api_keys = pelion_dm_sdk.foundation.subtenant_api_key() + subtenant_identity_providers = pelion_dm_sdk.foundation.subtenant_identity_provider() + subtenant_policy_groups = pelion_dm_sdk.foundation.subtenant_policy_group() subtenant_users = pelion_dm_sdk.foundation.subtenant_user() subtenant_user_invitations = pelion_dm_sdk.foundation.subtenant_user_invitation() users = pelion_dm_sdk.foundation.user() @@ -141,12 +157,20 @@ from mbed_cloud.foundation import Account from mbed_cloud.foundation import ActiveSession from mbed_cloud.foundation import ApiKey + from mbed_cloud.foundation import IdentityProvider + from mbed_cloud.foundation import IdentityProviderPublicKey from mbed_cloud.foundation import LoginHistory from mbed_cloud.foundation import LoginProfile + from mbed_cloud.foundation import OidcRequest + from mbed_cloud.foundation import OidcRequestClaimMapping from mbed_cloud.foundation import ParentAccount from mbed_cloud.foundation import PasswordPolicy from mbed_cloud.foundation import Policy + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud.foundation import Saml2Request from mbed_cloud.foundation import SubtenantApiKey + from mbed_cloud.foundation import SubtenantIdentityProvider + from mbed_cloud.foundation import SubtenantPolicyGroup from mbed_cloud.foundation import SubtenantUser from mbed_cloud.foundation import SubtenantUserInvitation from mbed_cloud.foundation import User @@ -188,12 +212,20 @@ from mbed_cloud.foundation.entities.accounts.account import Account from mbed_cloud.foundation.entities.accounts.active_session import ActiveSession from mbed_cloud.foundation.entities.accounts.api_key import ApiKey +from mbed_cloud.foundation.entities.accounts.identity_provider import IdentityProvider +from mbed_cloud.foundation.entities.accounts.identity_provider_public_key import IdentityProviderPublicKey from mbed_cloud.foundation.entities.accounts.login_history import LoginHistory from mbed_cloud.foundation.entities.accounts.login_profile import LoginProfile +from mbed_cloud.foundation.entities.accounts.oidc_request import OidcRequest +from mbed_cloud.foundation.entities.accounts.oidc_request_claim_mapping import OidcRequestClaimMapping from mbed_cloud.foundation.entities.accounts.parent_account import ParentAccount from mbed_cloud.foundation.entities.accounts.password_policy import PasswordPolicy from mbed_cloud.foundation.entities.accounts.policy import Policy +from mbed_cloud.foundation.entities.accounts.policy_group import PolicyGroup +from mbed_cloud.foundation.entities.accounts.saml2_request import Saml2Request from mbed_cloud.foundation.entities.accounts.subtenant_api_key import SubtenantApiKey +from mbed_cloud.foundation.entities.accounts.subtenant_identity_provider import SubtenantIdentityProvider +from mbed_cloud.foundation.entities.accounts.subtenant_policy_group import SubtenantPolicyGroup from mbed_cloud.foundation.entities.accounts.subtenant_user import SubtenantUser from mbed_cloud.foundation.entities.accounts.subtenant_user_invitation import SubtenantUserInvitation from mbed_cloud.foundation.entities.accounts.user import User @@ -252,20 +284,28 @@ "DeviceGroup", "FirmwareImage", "FirmwareManifest", + "IdentityProvider", + "IdentityProviderPublicKey", "LightThemeColor", "LightThemeImage", "LoginHistory", "LoginProfile", + "OidcRequest", + "OidcRequestClaimMapping", "ParentAccount", "PasswordPolicy", "Policy", + "PolicyGroup", "PreSharedKey", + "Saml2Request", "ServerCredentials", "SubtenantApiKey", "SubtenantDarkThemeColor", "SubtenantDarkThemeImage", + "SubtenantIdentityProvider", "SubtenantLightThemeColor", "SubtenantLightThemeImage", + "SubtenantPolicyGroup", "SubtenantTrustedCertificate", "SubtenantUser", "SubtenantUserInvitation", diff --git a/src/mbed_cloud/foundation/entities/accounts/__init__.py b/src/mbed_cloud/foundation/entities/accounts/__init__.py index 68ced441..35c72562 100644 --- a/src/mbed_cloud/foundation/entities/accounts/__init__.py +++ b/src/mbed_cloud/foundation/entities/accounts/__init__.py @@ -11,12 +11,20 @@ - :mod:`mbed_cloud.foundation.entities.accounts.account` - :mod:`mbed_cloud.foundation.entities.accounts.active_session` - :mod:`mbed_cloud.foundation.entities.accounts.api_key` +- :mod:`mbed_cloud.foundation.entities.accounts.identity_provider` +- :mod:`mbed_cloud.foundation.entities.accounts.identity_provider_public_key` - :mod:`mbed_cloud.foundation.entities.accounts.login_history` - :mod:`mbed_cloud.foundation.entities.accounts.login_profile` +- :mod:`mbed_cloud.foundation.entities.accounts.oidc_request` +- :mod:`mbed_cloud.foundation.entities.accounts.oidc_request_claim_mapping` - :mod:`mbed_cloud.foundation.entities.accounts.parent_account` - :mod:`mbed_cloud.foundation.entities.accounts.password_policy` - :mod:`mbed_cloud.foundation.entities.accounts.policy` +- :mod:`mbed_cloud.foundation.entities.accounts.policy_group` +- :mod:`mbed_cloud.foundation.entities.accounts.saml2_request` - :mod:`mbed_cloud.foundation.entities.accounts.subtenant_api_key` +- :mod:`mbed_cloud.foundation.entities.accounts.subtenant_identity_provider` +- :mod:`mbed_cloud.foundation.entities.accounts.subtenant_policy_group` - :mod:`mbed_cloud.foundation.entities.accounts.subtenant_user` - :mod:`mbed_cloud.foundation.entities.accounts.subtenant_user_invitation` - :mod:`mbed_cloud.foundation.entities.accounts.user` @@ -31,12 +39,20 @@ from mbed_cloud.foundation import Account from mbed_cloud.foundation import ActiveSession from mbed_cloud.foundation import ApiKey + from mbed_cloud.foundation import IdentityProvider + from mbed_cloud.foundation import IdentityProviderPublicKey from mbed_cloud.foundation import LoginHistory from mbed_cloud.foundation import LoginProfile + from mbed_cloud.foundation import OidcRequest + from mbed_cloud.foundation import OidcRequestClaimMapping from mbed_cloud.foundation import ParentAccount from mbed_cloud.foundation import PasswordPolicy from mbed_cloud.foundation import Policy + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud.foundation import Saml2Request from mbed_cloud.foundation import SubtenantApiKey + from mbed_cloud.foundation import SubtenantIdentityProvider + from mbed_cloud.foundation import SubtenantPolicyGroup from mbed_cloud.foundation import SubtenantUser from mbed_cloud.foundation import SubtenantUserInvitation from mbed_cloud.foundation import User diff --git a/src/mbed_cloud/foundation/entities/accounts/account.py b/src/mbed_cloud/foundation/entities/accounts/account.py index da58136d..2e01a952 100644 --- a/src/mbed_cloud/foundation/entities/accounts/account.py +++ b/src/mbed_cloud/foundation/entities/accounts/account.py @@ -69,6 +69,8 @@ class Account(Entity): "admin_name", "admin_password", "aliases", + "business_model", + "business_model_history", "city", "company", "contact", @@ -84,6 +86,7 @@ class Account(Entity): "expiration_warning_threshold", "id", "idle_timeout", + "limitations", "limits", "mfa_status", "notification_emails", @@ -101,6 +104,7 @@ class Account(Entity): "status", "template_id", "tier", + "tier_history", "updated_at", "upgraded_at", ] @@ -126,6 +130,8 @@ def __init__( admin_name=None, admin_password=None, aliases=None, + business_model=None, + business_model_history=None, city=None, company=None, contact=None, @@ -141,6 +147,7 @@ def __init__( expiration_warning_threshold=None, id=None, idle_timeout=None, + limitations=None, limits=None, mfa_status=None, notification_emails=None, @@ -158,6 +165,7 @@ def __init__( status=None, template_id=None, tier=None, + tier_history=None, updated_at=None, upgraded_at=None, ): @@ -180,7 +188,8 @@ def __init__( :param admin_full_name: The full name of the admin user created for this account. Present only in the response for account creation. :type admin_full_name: str - :param admin_id: The ID of the admin user created for this account. + :param admin_id: The ID of the admin user created for this account. Present only in + the response for the account creation. :type admin_id: str :param admin_key: The admin API key created for this account. Present only in the response for account creation. @@ -193,6 +202,11 @@ def __init__( :type admin_password: str :param aliases: An array of aliases. :type aliases: list + :param business_model: Business model for this account. Manageable by the root admin + only. + :type business_model: str + :param business_model_history: Business model history for this account. + :type business_model_history: list :param city: The city part of the postal address. :type city: str :param company: The name of the company. @@ -224,6 +238,8 @@ def __init__( :type id: str :param idle_timeout: The reference token expiration time, in minutes, for this account. :type idle_timeout: int + :param limitations: List of account limitation objects. + :type limitations: list :param limits: List of limits as key-value pairs if requested. :type limits: dict :param mfa_status: The enforcement status of multi-factor authentication, either @@ -261,6 +277,8 @@ def __init__( account, `2`: partner tier. Other values are reserved for the future. :type tier: str + :param tier_history: Tier history for this account. + :type tier_history: list :param updated_at: Last update UTC time RFC3339. :type updated_at: datetime :param upgraded_at: Time when upgraded to commercial account in UTC format RFC3339. @@ -285,6 +303,8 @@ def __init__( self._admin_name = fields.StringField(value=admin_name) self._admin_password = fields.StringField(value=admin_password) self._aliases = fields.ListField(value=aliases) + self._business_model = fields.StringField(value=business_model, enum=enums.AccountBusinessModelEnum) + self._business_model_history = fields.ListField(value=business_model_history) self._city = fields.StringField(value=city) self._company = fields.StringField(value=company) self._contact = fields.StringField(value=contact) @@ -300,6 +320,7 @@ def __init__( self._expiration_warning_threshold = fields.IntegerField(value=expiration_warning_threshold) self._id = fields.StringField(value=id) self._idle_timeout = fields.IntegerField(value=idle_timeout) + self._limitations = fields.ListField(value=limitations) self._limits = fields.DictField(value=limits) self._mfa_status = fields.StringField(value=mfa_status, enum=enums.AccountMfaStatusEnum) self._notification_emails = fields.ListField(value=notification_emails) @@ -317,6 +338,7 @@ def __init__( self._status = fields.StringField(value=status, enum=enums.AccountStatusEnum) self._template_id = fields.StringField(value=template_id) self._tier = fields.StringField(value=tier) + self._tier_history = fields.ListField(value=tier_history) self._updated_at = fields.DateTimeField(value=updated_at) self._upgraded_at = fields.DateTimeField(value=upgraded_at) @@ -408,7 +430,8 @@ def admin_full_name(self, value): @property def admin_id(self): - """The ID of the admin user created for this account. + """The ID of the admin user created for this account. Present only in the + response for the account creation. api example: '01619571e2e89242ac12000600000000' @@ -493,6 +516,36 @@ def aliases(self, value): self._aliases.set(value) + @property + def business_model(self): + """Business model for this account. Manageable by the root admin only. + + api example: 'api_calls_1_business_model' + + :rtype: str + """ + + return self._business_model.value + + @business_model.setter + def business_model(self, value): + """Set value of `business_model` + + :param value: value to set + :type value: str + """ + + self._business_model.set(value) + + @property + def business_model_history(self): + """Business model history for this account. + + :rtype: list + """ + + return self._business_model_history.value + @property def city(self): """The city part of the postal address. @@ -789,6 +842,15 @@ def idle_timeout(self, value): self._idle_timeout.set(value) + @property + def limitations(self): + """List of account limitation objects. + + :rtype: list + """ + + return self._limitations.value + @property def limits(self): """List of limits as key-value pairs if requested. @@ -1044,6 +1106,15 @@ def tier(self): return self._tier.value + @property + def tier_history(self): + """Tier history for this account. + + :rtype: list + """ + + return self._tier_history.value + @property def updated_at(self): """Last update UTC time RFC3339. @@ -1151,10 +1222,10 @@ def create(self, action="create"): :param action: 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.
  • +
  • `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 @@ -1181,6 +1252,8 @@ def create(self, action="create"): body_params["admin_password"] = self._admin_password.to_api() if self._aliases.value_set: body_params["aliases"] = self._aliases.to_api() + if self._business_model.value_set: + body_params["business_model"] = self._business_model.to_api() if self._city.value_set: body_params["city"] = self._city.to_api() if self._company.value_set: @@ -1210,7 +1283,7 @@ def create(self, action="create"): method="post", path="/v3/accounts", content_type="application/json", - query_params={"action": fields.StringField(action).to_api()}, + query_params={"action": fields.StringField(action).to_api(),}, body_params=body_params, unpack=self, ) @@ -1478,7 +1551,7 @@ def list( :type page_size: int :param include: Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts. + limits, policies, sub_accounts, history. :type include: str :param format: Format information for the query response. Supported: @@ -1522,7 +1595,7 @@ def list( ) def me(self, include=None, properties=None): - """Get account info. + """Get account information. `REST API Documentation `_. @@ -1583,7 +1656,7 @@ def _paginate_api_keys(self, after=None, filter=None, order="ASC", limit=50, inc path="/v3/accounts/{account_id}/api-keys", content_type="application/json", query_params=query_params, - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) @@ -1616,7 +1689,7 @@ def _paginate_dark_theme_branding_colors(self, after=None, filter=None, order=No method="get", path="/v3/accounts/{account_id}/branding-colors/dark", content_type="application/json", - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) @@ -1649,7 +1722,7 @@ def _paginate_dark_theme_branding_images(self, after=None, filter=None, order=No method="get", path="/v3/accounts/{account_id}/branding-images/dark", content_type="application/json", - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) @@ -1682,7 +1755,7 @@ def _paginate_light_theme_branding_colors(self, after=None, filter=None, order=N method="get", path="/v3/accounts/{account_id}/branding-colors/light", content_type="application/json", - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) @@ -1715,7 +1788,7 @@ def _paginate_light_theme_branding_images(self, after=None, filter=None, order=N method="get", path="/v3/accounts/{account_id}/branding-images/light", content_type="application/json", - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) @@ -1737,7 +1810,7 @@ def _paginate_list( :type limit: int :param include: Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts. + limits, policies, sub_accounts, history. :type include: str :param format: Format information for the query response. Supported: @@ -1761,11 +1834,11 @@ def _paginate_list( query_params["properties"] = fields.StringField(properties).to_api() return self._client.call_api( - method="get", path="/v3/accounts", content_type="application/json", query_params=query_params, unpack=False + method="get", path="/v3/accounts", content_type="application/json", query_params=query_params, unpack=False, ) def _paginate_trusted_certificates(self, after=None, filter=None, order="ASC", limit=50, include=None): - """Get all trusted certificates. + """Get trusted certificates. :param after: The entity ID to fetch after the given one. :type after: str @@ -1800,12 +1873,12 @@ def _paginate_trusted_certificates(self, after=None, filter=None, order="ASC", l path="/v3/accounts/{account_id}/trusted-certificates", content_type="application/json", query_params=query_params, - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) def _paginate_user_invitations(self, after=None, filter=None, order="ASC", limit=50, include=None): - """Get the details of all user invitations. + """Get user invitations. :param after: The entity ID to fetch after the given one. :type after: str @@ -1839,12 +1912,12 @@ def _paginate_user_invitations(self, after=None, filter=None, order="ASC", limit path="/v3/accounts/{account_id}/user-invitations", content_type="application/json", query_params=query_params, - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) def _paginate_users(self, after=None, filter=None, order="ASC", limit=50, include=None): - """Get the details of all users. + """Get users. :param after: The entity ID to fetch after the given one. :type after: str @@ -1879,17 +1952,17 @@ def _paginate_users(self, after=None, filter=None, order="ASC", limit=50, includ path="/v3/accounts/{account_id}/users", content_type="application/json", query_params=query_params, - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=False, ) def read(self, include=None, properties=None): - """Get account info. + """Get account information. `REST API Documentation `_. :param include: Comma-separated additional data to return. Currently supported: - limits, policies, sub_accounts. + limits, policies, sub_accounts, history. :type include: str :param properties: Property name to return from account-specific properties. @@ -1902,7 +1975,7 @@ def read(self, include=None, properties=None): method="get", path="/v3/accounts/{account_id}", content_type="application/json", - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, query_params={ "include": fields.StringField(include).to_api(), "properties": fields.StringField(properties).to_api(), @@ -1911,7 +1984,7 @@ def read(self, include=None, properties=None): ) def trusted_certificates(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): - """Get all trusted certificates. + """Get trusted certificates. `REST API Documentation `_. @@ -2021,6 +2094,8 @@ def update(self): body_params["address_line2"] = self._address_line2.to_api() if self._aliases.value_set: body_params["aliases"] = self._aliases.to_api() + if self._business_model.value_set: + body_params["business_model"] = self._business_model.to_api() if self._city.value_set: body_params["city"] = self._city.to_api() if self._company.value_set: @@ -2067,12 +2142,12 @@ def update(self): path="/v3/accounts/{account_id}", content_type="application/json", body_params=body_params, - path_params={"account_id": self._id.to_api()}, + path_params={"account_id": self._id.to_api(),}, unpack=self, ) def user_invitations(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): - """Get the details of all user invitations. + """Get user invitations. `REST API Documentation `_. @@ -2147,7 +2222,7 @@ def user_invitations(self, filter=None, order="ASC", max_results=None, page_size ) def users(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): - """Get the details of all users. + """Get users. `REST API Documentation `_. diff --git a/src/mbed_cloud/foundation/entities/accounts/active_session.py b/src/mbed_cloud/foundation/entities/accounts/active_session.py index 48b5134e..94b8e82c 100644 --- a/src/mbed_cloud/foundation/entities/accounts/active_session.py +++ b/src/mbed_cloud/foundation/entities/accounts/active_session.py @@ -44,7 +44,7 @@ class ActiveSession(Entity): """Represents the `ActiveSession` entity in Pelion Device Management""" # List of fields that are serialised between the API and SDK - _api_fieldnames = ["account_id", "ip_address", "login_time", "reference_token", "user_agent"] + _api_fieldnames = ["account_id", "created_at", "ip_address", "login_time", "reference_token", "user_agent"] # List of fields that are available for the user of the SDK _sdk_fieldnames = _api_fieldnames @@ -56,7 +56,14 @@ class ActiveSession(Entity): _renames_to_api = {} def __init__( - self, _client=None, account_id=None, ip_address=None, login_time=None, reference_token=None, user_agent=None + self, + _client=None, + account_id=None, + created_at=None, + ip_address=None, + login_time=None, + reference_token=None, + user_agent=None, ): """Creates a local `ActiveSession` instance @@ -69,6 +76,8 @@ def __init__( :param account_id: The UUID of the account. :type account_id: str + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime :param ip_address: IP address of the client. :type ip_address: str :param login_time: The login time of the user. @@ -85,6 +94,7 @@ def __init__( # fields self._account_id = fields.StringField(value=account_id) + self._created_at = fields.DateTimeField(value=created_at) self._ip_address = fields.StringField(value=ip_address) self._login_time = fields.DateTimeField(value=login_time) self._reference_token = fields.StringField(value=reference_token) @@ -101,6 +111,17 @@ def account_id(self): return self._account_id.value + @property + def created_at(self): + """Creation UTC time RFC3339. + + api example: '2018-02-13T09:35:20Z' + + :rtype: datetime + """ + + return self._created_at.value + @property def ip_address(self): """IP address of the client. diff --git a/src/mbed_cloud/foundation/entities/accounts/api_key.py b/src/mbed_cloud/foundation/entities/accounts/api_key.py index 20ee7f85..58850b54 100644 --- a/src/mbed_cloud/foundation/entities/accounts/api_key.py +++ b/src/mbed_cloud/foundation/entities/accounts/api_key.py @@ -14,6 +14,7 @@ - :meth:`ApiKey.delete` - :meth:`ApiKey.list` - :meth:`ApiKey.me` +- :meth:`ApiKey.policy_groups` - :meth:`ApiKey.read` - :meth:`ApiKey.update` @@ -56,6 +57,7 @@ class ApiKey(Entity): "account_id", "created_at", "creation_time", + "groups", "id", "key", "last_login_time", @@ -80,6 +82,7 @@ def __init__( account_id=None, created_at=None, creation_time=None, + groups=None, id=None, key=None, last_login_time=None, @@ -104,6 +107,8 @@ def __init__( :param creation_time: The timestamp of the API key creation in the storage, in milliseconds. :type creation_time: int + :param groups: A list of group IDs this API key belongs to. + :type groups: list :param id: (Required) The ID of the API key. :type id: str :param key: The API key. @@ -128,6 +133,7 @@ def __init__( self._account_id = fields.StringField(value=account_id) self._created_at = fields.DateTimeField(value=created_at) self._creation_time = fields.IntegerField(value=creation_time) + self._groups = fields.ListField(value=groups) self._id = fields.StringField(value=id) self._key = fields.StringField(value=key) self._last_login_time = fields.IntegerField(value=last_login_time) @@ -169,6 +175,25 @@ def creation_time(self): return self._creation_time.value + @property + def groups(self): + """A list of group IDs this API key belongs to. + + :rtype: list + """ + + return self._groups.value + + @groups.setter + def groups(self, value): + """Set value of `groups` + + :param value: value to set + :type value: list + """ + + self._groups.set(value) + @property def id(self): """The ID of the API key. @@ -302,6 +327,8 @@ def create(self): # Conditionally setup the message body, fields which have not been set will not be sent to the API. # This avoids null fields being rejected and allows the default value to be used. body_params = {} + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._name.value_set: body_params["name"] = self._name.to_api() if self._owner.value_set: @@ -310,7 +337,7 @@ def create(self): body_params["status"] = self._status.to_api() return self._client.call_api( - method="post", path="/v3/api-keys", content_type="application/json", body_params=body_params, unpack=self + method="post", path="/v3/api-keys", content_type="application/json", body_params=body_params, unpack=self, ) def delete(self): @@ -325,7 +352,7 @@ def delete(self): method="delete", path="/v3/api-keys/{apikey_id}", content_type="application/json", - path_params={"apikey_id": self._id.to_api()}, + path_params={"apikey_id": self._id.to_api(),}, unpack=self, ) @@ -408,14 +435,16 @@ def list(self, filter=None, order="ASC", max_results=None, page_size=50, include ) def me(self): - """Get API key details. + """Get current API key. `REST API Documentation `_. :rtype: ApiKey """ - return self._client.call_api(method="get", path="/v3/api-keys/me", content_type="application/json", unpack=self) + return self._client.call_api( + method="get", path="/v3/api-keys/me", content_type="application/json", unpack=self, + ) def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): """Get all API keys. @@ -449,11 +478,105 @@ def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include query_params["include"] = fields.StringField(include).to_api() return self._client.call_api( - method="get", path="/v3/api-keys", content_type="application/json", query_params=query_params, unpack=False + method="get", path="/v3/api-keys", content_type="application/json", query_params=query_params, unpack=False, + ) + + def _paginate_policy_groups(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get policy groups of an API key. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.ApiKeyOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/api-keys/{apikey_id}/groups", + content_type="application/json", + query_params=query_params, + path_params={"apikey_id": self._id.to_api(),}, + unpack=False, + ) + + def policy_groups(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get policy groups of an API key. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(PolicyGroup) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=PolicyGroup._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = PolicyGroup._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=PolicyGroup, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_policy_groups, ) def read(self): - """Get API key details. + """Get API key. `REST API Documentation `_. @@ -464,7 +587,7 @@ def read(self): method="get", path="/v3/api-keys/{apikey_id}", content_type="application/json", - path_params={"apikey_id": self._id.to_api()}, + path_params={"apikey_id": self._id.to_api(),}, unpack=self, ) @@ -479,6 +602,8 @@ def update(self): # Conditionally setup the message body, fields which have not been set will not be sent to the API. # This avoids null fields being rejected and allows the default value to be used. body_params = {} + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._name.value_set: body_params["name"] = self._name.to_api() if self._owner.value_set: @@ -490,7 +615,7 @@ def update(self): method="put", path="/v3/api-keys/{apikey_id}", content_type="application/json", - path_params={"apikey_id": self._id.to_api()}, body_params=body_params, + path_params={"apikey_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/accounts/enums.py b/src/mbed_cloud/foundation/entities/accounts/enums.py index df59a91d..7c03c6bf 100644 --- a/src/mbed_cloud/foundation/entities/accounts/enums.py +++ b/src/mbed_cloud/foundation/entities/accounts/enums.py @@ -8,12 +8,27 @@ This module contains all Enums used by Foundation Entities in the Accounts category: +- :class:`AccountBusinessModelEnum` - :class:`AccountMfaStatusEnum` - :class:`AccountOrderEnum` - :class:`AccountStatusEnum` - :class:`ApiKeyOrderEnum` - :class:`ApiKeyStatusEnum` +- :class:`IdentityProviderAlgorithmEnum` +- :class:`IdentityProviderOrderEnum` +- :class:`IdentityProviderStatusEnum` +- :class:`IdentityProviderTypeEnum` +- :class:`LoginProfileTypeEnum` +- :class:`OidcRequestTokenModeEnum` +- :class:`PolicyGroupOrderEnum` +- :class:`PolicyInheritedTypeEnum` +- :class:`SubtenantApiKeyOrderEnum` - :class:`SubtenantApiKeyStatusEnum` +- :class:`SubtenantIdentityProviderAlgorithmEnum` +- :class:`SubtenantIdentityProviderOrderEnum` +- :class:`SubtenantIdentityProviderStatusEnum` +- :class:`SubtenantPolicyGroupOrderEnum` +- :class:`SubtenantUserOrderEnum` - :class:`SubtenantUserStatusEnum` - :class:`UserInvitationOrderEnum` - :class:`UserOrderEnum` @@ -25,12 +40,27 @@ .. code-block:: python + from mbed_cloud.foundation.enums import AccountBusinessModelEnum from mbed_cloud.foundation.enums import AccountMfaStatusEnum from mbed_cloud.foundation.enums import AccountOrderEnum from mbed_cloud.foundation.enums import AccountStatusEnum from mbed_cloud.foundation.enums import ApiKeyOrderEnum from mbed_cloud.foundation.enums import ApiKeyStatusEnum + from mbed_cloud.foundation.enums import IdentityProviderAlgorithmEnum + from mbed_cloud.foundation.enums import IdentityProviderOrderEnum + from mbed_cloud.foundation.enums import IdentityProviderStatusEnum + from mbed_cloud.foundation.enums import IdentityProviderTypeEnum + from mbed_cloud.foundation.enums import LoginProfileTypeEnum + from mbed_cloud.foundation.enums import OidcRequestTokenModeEnum + from mbed_cloud.foundation.enums import PolicyGroupOrderEnum + from mbed_cloud.foundation.enums import PolicyInheritedTypeEnum + from mbed_cloud.foundation.enums import SubtenantApiKeyOrderEnum from mbed_cloud.foundation.enums import SubtenantApiKeyStatusEnum + from mbed_cloud.foundation.enums import SubtenantIdentityProviderAlgorithmEnum + from mbed_cloud.foundation.enums import SubtenantIdentityProviderOrderEnum + from mbed_cloud.foundation.enums import SubtenantIdentityProviderStatusEnum + from mbed_cloud.foundation.enums import SubtenantPolicyGroupOrderEnum + from mbed_cloud.foundation.enums import SubtenantUserOrderEnum from mbed_cloud.foundation.enums import SubtenantUserStatusEnum from mbed_cloud.foundation.enums import UserInvitationOrderEnum from mbed_cloud.foundation.enums import UserOrderEnum @@ -47,6 +77,22 @@ from mbed_cloud.foundation.common.enum_base import BaseEnum +class AccountBusinessModelEnum(BaseEnum): + """Represents expected values of `AccountBusinessModelEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ACTIVE_DEVICE_BUSINESS_MODEL = "active_device_business_model" + API_CALLS_1_BUSINESS_MODEL = "api_calls_1_business_model" + + values = frozenset(("active_device_business_model", "api_calls_1_business_model",)) + + class AccountMfaStatusEnum(BaseEnum): """Represents expected values of `AccountMfaStatusEnum` @@ -60,7 +106,7 @@ class AccountMfaStatusEnum(BaseEnum): ENFORCED = "enforced" OPTIONAL = "optional" - values = frozenset(("enforced", "optional")) + values = frozenset(("enforced", "optional",)) class AccountOrderEnum(BaseEnum): @@ -76,7 +122,7 @@ class AccountOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class AccountStatusEnum(BaseEnum): @@ -94,7 +140,7 @@ class AccountStatusEnum(BaseEnum): RESTRICTED = "RESTRICTED" SUSPENDED = "SUSPENDED" - values = frozenset(("ACTIVE", "ENROLLING", "RESTRICTED", "SUSPENDED")) + values = frozenset(("ACTIVE", "ENROLLING", "RESTRICTED", "SUSPENDED",)) class ApiKeyOrderEnum(BaseEnum): @@ -110,7 +156,7 @@ class ApiKeyOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class ApiKeyStatusEnum(BaseEnum): @@ -126,7 +172,166 @@ class ApiKeyStatusEnum(BaseEnum): ACTIVE = "ACTIVE" INACTIVE = "INACTIVE" - values = frozenset(("ACTIVE", "INACTIVE")) + values = frozenset(("ACTIVE", "INACTIVE",)) + + +class IdentityProviderAlgorithmEnum(BaseEnum): + """Represents expected values of `IdentityProviderAlgorithmEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + EC224 = "EC224" + EC256 = "EC256" + EC384 = "EC384" + EC521 = "EC521" + ECDSA224 = "ECDSA224" + ECDSA256 = "ECDSA256" + ECDSA384 = "ECDSA384" + ECDSA521 = "ECDSA521" + RSA2048 = "RSA2048" + RSA3072 = "RSA3072" + + values = frozenset( + ("EC224", "EC256", "EC384", "EC521", "ECDSA224", "ECDSA256", "ECDSA384", "ECDSA521", "RSA2048", "RSA3072",) + ) + + +class IdentityProviderOrderEnum(BaseEnum): + """Represents expected values of `IdentityProviderOrderEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ASC = "ASC" + DESC = "DESC" + + values = frozenset(("ASC", "DESC",)) + + +class IdentityProviderStatusEnum(BaseEnum): + """Represents expected values of `IdentityProviderStatusEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ACTIVE = "ACTIVE" + SUSPENDED = "SUSPENDED" + + values = frozenset(("ACTIVE", "SUSPENDED",)) + + +class IdentityProviderTypeEnum(BaseEnum): + """Represents expected values of `IdentityProviderTypeEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + MBED = "MBED" + NATIVE = "NATIVE" + OIDC = "OIDC" + SAML2 = "SAML2" + + values = frozenset(("MBED", "NATIVE", "OIDC", "SAML2",)) + + +class LoginProfileTypeEnum(BaseEnum): + """Represents expected values of `LoginProfileTypeEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + MBED = "MBED" + NATIVE = "NATIVE" + OIDC = "OIDC" + SAML2 = "SAML2" + + values = frozenset(("MBED", "NATIVE", "OIDC", "SAML2",)) + + +class OidcRequestTokenModeEnum(BaseEnum): + """Represents expected values of `OidcRequestTokenModeEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + GET = "GET" + POST = "POST" + + values = frozenset(("GET", "POST",)) + + +class PolicyGroupOrderEnum(BaseEnum): + """Represents expected values of `PolicyGroupOrderEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ASC = "ASC" + DESC = "DESC" + + values = frozenset(("ASC", "DESC",)) + + +class PolicyInheritedTypeEnum(BaseEnum): + """Represents expected values of `PolicyInheritedTypeEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ACCOUNT = "account" + TEMPLATE = "template" + TIER_TEMPLATE = "tier_template" + + values = frozenset(("account", "template", "tier_template",)) + + +class SubtenantApiKeyOrderEnum(BaseEnum): + """Represents expected values of `SubtenantApiKeyOrderEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ASC = "ASC" + DESC = "DESC" + + values = frozenset(("ASC", "DESC",)) class SubtenantApiKeyStatusEnum(BaseEnum): @@ -142,7 +347,97 @@ class SubtenantApiKeyStatusEnum(BaseEnum): ACTIVE = "ACTIVE" INACTIVE = "INACTIVE" - values = frozenset(("ACTIVE", "INACTIVE")) + values = frozenset(("ACTIVE", "INACTIVE",)) + + +class SubtenantIdentityProviderAlgorithmEnum(BaseEnum): + """Represents expected values of `SubtenantIdentityProviderAlgorithmEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + EC224 = "EC224" + EC256 = "EC256" + EC384 = "EC384" + EC521 = "EC521" + ECDSA224 = "ECDSA224" + ECDSA256 = "ECDSA256" + ECDSA384 = "ECDSA384" + ECDSA521 = "ECDSA521" + RSA2048 = "RSA2048" + RSA3072 = "RSA3072" + + values = frozenset( + ("EC224", "EC256", "EC384", "EC521", "ECDSA224", "ECDSA256", "ECDSA384", "ECDSA521", "RSA2048", "RSA3072",) + ) + + +class SubtenantIdentityProviderOrderEnum(BaseEnum): + """Represents expected values of `SubtenantIdentityProviderOrderEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ASC = "ASC" + DESC = "DESC" + + values = frozenset(("ASC", "DESC",)) + + +class SubtenantIdentityProviderStatusEnum(BaseEnum): + """Represents expected values of `SubtenantIdentityProviderStatusEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ACTIVE = "ACTIVE" + SUSPENDED = "SUSPENDED" + + values = frozenset(("ACTIVE", "SUSPENDED",)) + + +class SubtenantPolicyGroupOrderEnum(BaseEnum): + """Represents expected values of `SubtenantPolicyGroupOrderEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ASC = "ASC" + DESC = "DESC" + + values = frozenset(("ASC", "DESC",)) + + +class SubtenantUserOrderEnum(BaseEnum): + """Represents expected values of `SubtenantUserOrderEnum` + + This is used by Entities in the "accounts" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ASC = "ASC" + DESC = "DESC" + + values = frozenset(("ASC", "DESC",)) class SubtenantUserStatusEnum(BaseEnum): @@ -161,7 +456,7 @@ class SubtenantUserStatusEnum(BaseEnum): INVITED = "INVITED" RESET = "RESET" - values = frozenset(("ACTIVE", "ENROLLING", "INACTIVE", "INVITED", "RESET")) + values = frozenset(("ACTIVE", "ENROLLING", "INACTIVE", "INVITED", "RESET",)) class UserInvitationOrderEnum(BaseEnum): @@ -177,7 +472,7 @@ class UserInvitationOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class UserOrderEnum(BaseEnum): @@ -193,7 +488,7 @@ class UserOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class UserStatusEnum(BaseEnum): @@ -212,4 +507,4 @@ class UserStatusEnum(BaseEnum): INVITED = "INVITED" RESET = "RESET" - values = frozenset(("ACTIVE", "ENROLLING", "INACTIVE", "INVITED", "RESET")) + values = frozenset(("ACTIVE", "ENROLLING", "INACTIVE", "INVITED", "RESET",)) diff --git a/src/mbed_cloud/foundation/entities/accounts/identity_provider.py b/src/mbed_cloud/foundation/entities/accounts/identity_provider.py new file mode 100644 index 00000000..1372dcef --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/identity_provider.py @@ -0,0 +1,583 @@ +""" +.. warning:: + IdentityProvider should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: IdentityProvider +=================================== + +Entities normally contain methods to create, read, update, delete and list resources. Other +actions may also be possible on the entity depending on the capabilities present in the API. +This entity has the following methods: + +- :meth:`IdentityProvider.create` +- :meth:`IdentityProvider.delete` +- :meth:`IdentityProvider.delete_service_provider_certificate` +- :meth:`IdentityProvider.generate_service_provider_certificate` +- :meth:`IdentityProvider.list` +- :meth:`IdentityProvider.read` +- :meth:`IdentityProvider.refresh_tokens` +- :meth:`IdentityProvider.update` + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + identity_providers = pelion_dm_sdk.foundation.identity_provider() + +How to import IdentityProvider directly: + +.. code-block:: python + + from mbed_cloud.foundation import IdentityProvider + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class IdentityProvider(Entity): + """Represents the `IdentityProvider` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "account_id", + "created_at", + "description", + "id", + "identity_provider_type", + "is_default", + "name", + "saml2_attributes", + "status", + "updated_at", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = { + "type": "identity_provider_type", + } + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = { + "identity_provider_type": "type", + } + + def __init__( + self, + _client=None, + account_id=None, + created_at=None, + description=None, + id=None, + identity_provider_type=None, + is_default=None, + name=None, + saml2_attributes=None, + status=None, + updated_at=None, + ): + """Creates a local `IdentityProvider` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param account_id: The ID of the account the identity provider belongs to. + :type account_id: str + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param description: Description for the identity provider. + :type description: str + :param id: (Required) Entity ID. + :type id: str + :param identity_provider_type: (Required) Identity provider type. + :type identity_provider_type: str + :param is_default: Flag indicating whether this is the global default identity + provider. + :type is_default: bool + :param name: (Required) Name of the identity provider. + :type name: str + :param saml2_attributes: Represents SAML2 specific attributes in responses. + :type saml2_attributes: dict + :param status: Status of the identity provider. + :type status: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._account_id = fields.StringField(value=account_id) + self._created_at = fields.DateTimeField(value=created_at) + self._description = fields.StringField(value=description) + self._id = fields.StringField(value=id) + self._identity_provider_type = fields.StringField( + value=identity_provider_type, enum=enums.IdentityProviderTypeEnum + ) + self._is_default = fields.BooleanField(value=is_default) + self._name = fields.StringField(value=name) + self._saml2_attributes = fields.DictField(value=saml2_attributes) + self._status = fields.StringField(value=status, enum=enums.IdentityProviderStatusEnum) + self._updated_at = fields.DateTimeField(value=updated_at) + + @property + def account_id(self): + """The ID of the account the identity provider belongs to. + + api example: '01619571e2e90242ac12000600000000' + + :rtype: str + """ + + return self._account_id.value + + @property + def created_at(self): + """Creation UTC time RFC3339. + + api example: '2018-02-13T09:35:20Z' + + :rtype: datetime + """ + + return self._created_at.value + + @property + def description(self): + """Description for the identity provider. + + :rtype: str + """ + + return self._description.value + + @description.setter + def description(self, value): + """Set value of `description` + + :param value: value to set + :type value: str + """ + + self._description.set(value) + + @property + def id(self): + """Entity ID. + + This field must be set when updating or deleting an existing IdentityProvider Entity. + + api example: '01619571d01d0242ac12000600000000' + + :rtype: str + """ + + return self._id.value + + @id.setter + def id(self, value): + """Set value of `id` + + :param value: value to set + :type value: str + """ + + self._id.set(value) + + @property + def identity_provider_type(self): + """Identity provider type. + + This field must be set when creating a new IdentityProvider Entity. + + :rtype: str + """ + + return self._identity_provider_type.value + + @identity_provider_type.setter + def identity_provider_type(self, value): + """Set value of `identity_provider_type` + + :param value: value to set + :type value: str + """ + + self._identity_provider_type.set(value) + + @property + def is_default(self): + """Flag indicating whether this is the global default identity provider. + + :rtype: bool + """ + + return self._is_default.value + + @property + def name(self): + """Name of the identity provider. + + This field must be set when creating a new IdentityProvider Entity. + + :rtype: str + """ + + return self._name.value + + @name.setter + def name(self, value): + """Set value of `name` + + :param value: value to set + :type value: str + """ + + self._name.set(value) + + @property + def saml2_attributes(self): + """Represents SAML2 specific attributes in responses. + + :rtype: dict + """ + + return self._saml2_attributes.value + + @saml2_attributes.setter + def saml2_attributes(self, value): + """Set value of `saml2_attributes` + + :param value: value to set + :type value: dict + """ + + self._saml2_attributes.set(value) + + @property + def status(self): + """Status of the identity provider. + + :rtype: str + """ + + return self._status.value + + @status.setter + def status(self, value): + """Set value of `status` + + :param value: value to set + :type value: str + """ + + self._status.set(value) + + @property + def updated_at(self): + """Last update UTC time RFC3339. + + api example: '2018-02-14T15:24:14Z' + + :rtype: datetime + """ + + return self._updated_at.value + + def create(self, discovery=None, oidc_attributes=None): + """Create a new identity provider. + + `REST API Documentation `_. + + :param discovery: 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 + :type discovery: bool + + :param oidc_attributes: Represents OIDC specific attributes. + :type oidc_attributes: mbed_cloud.foundation.entities.OidcRequest + + :rtype: IdentityProvider + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + if self._description.value_set: + body_params["description"] = self._description.to_api() + if self._identity_provider_type.value_set: + body_params["type"] = self._identity_provider_type.to_api() + if self._name.value_set: + body_params["name"] = self._name.to_api() + # Method parameters are unconditionally sent even if set to None + body_params["oidc_attributes"] = fields.DictField(oidc_attributes).to_api() + if self._saml2_attributes.value_set: + body_params["saml2_attributes"] = self._saml2_attributes.to_api() + if self._status.value_set: + body_params["status"] = self._status.to_api() + + return self._client.call_api( + method="post", + path="/v3/identity-providers", + content_type="application/json", + body_params=body_params, + query_params={"discovery": fields.BooleanField(discovery).to_api(),}, + unpack=self, + ) + + def delete(self): + """Delete an identity provider by ID. + + `REST API Documentation `_. + + :rtype: IdentityProvider + """ + + return self._client.call_api( + method="delete", + path="/v3/identity-providers/{identity_provider_id}", + content_type="application/json", + path_params={"identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def delete_service_provider_certificate(self): + """Delete the service provider certificate. + + `REST API Documentation `_. + + :rtype: IdentityProvider + """ + + return self._client.call_api( + method="post", + path="/v3/identity-providers/{identity_provider_id}/delete-sp-certificate", + content_type="application/json", + path_params={"identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def generate_service_provider_certificate(self, algorithm=None, validity=None): + """Generate a new service provider certificate. + + `REST API Documentation `_. + + :param algorithm: The algorithm and its key size used for generating the certificate. + Defaults to RSA2048. + :type algorithm: str + + :param validity: Validity for the certificate in days. + :type validity: int + + :rtype: IdentityProvider + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + # Method parameters are unconditionally sent even if set to None + body_params["algorithm"] = fields.StringField(algorithm, enum=enums.IdentityProviderAlgorithmEnum).to_api() + # Method parameters are unconditionally sent even if set to None + body_params["validity"] = fields.IntegerField(validity).to_api() + + return self._client.call_api( + method="post", + path="/v3/identity-providers/{identity_provider_id}/generate-sp-certificate", + content_type="application/json", + body_params=body_params, + path_params={"identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def list(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get all identity providers. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(IdentityProvider) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import IdentityProvider + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=IdentityProvider._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = IdentityProvider._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=IdentityProvider, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_list, + ) + + def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get all identity providers. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.IdentityProviderOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/identity-providers", + content_type="application/json", + query_params=query_params, + unpack=False, + ) + + def read(self): + """Get identity provider. + + `REST API Documentation `_. + + :rtype: IdentityProvider + """ + + return self._client.call_api( + method="get", + path="/v3/identity-providers/{identity_provider_id}", + content_type="application/json", + path_params={"identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def refresh_tokens(self): + """Refreshes the OIDC signing keys. + + `REST API Documentation `_. + + :rtype: IdentityProvider + """ + + return self._client.call_api( + method="post", + path="/v3/identity-providers/{identity_provider_id}/refresh-jwks", + content_type="application/json", + path_params={"identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def update(self, discovery=None, oidc_attributes=None): + """Update an existing identity provider. + + `REST API Documentation `_. + + :param discovery: 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 + :type discovery: bool + + :param oidc_attributes: Represents OIDC specific attributes. + :type oidc_attributes: mbed_cloud.foundation.entities.OidcRequest + + :rtype: IdentityProvider + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + if self._description.value_set: + body_params["description"] = self._description.to_api() + if self._identity_provider_type.value_set: + body_params["type"] = self._identity_provider_type.to_api() + if self._name.value_set: + body_params["name"] = self._name.to_api() + # Method parameters are unconditionally sent even if set to None + body_params["oidc_attributes"] = fields.DictField(oidc_attributes).to_api() + if self._saml2_attributes.value_set: + body_params["saml2_attributes"] = self._saml2_attributes.to_api() + if self._status.value_set: + body_params["status"] = self._status.to_api() + + return self._client.call_api( + method="put", + path="/v3/identity-providers/{identity_provider_id}", + content_type="application/json", + body_params=body_params, + query_params={"discovery": fields.BooleanField(discovery).to_api(),}, + path_params={"identity_provider_id": self._id.to_api(),}, + unpack=self, + ) diff --git a/src/mbed_cloud/foundation/entities/accounts/identity_provider_public_key.py b/src/mbed_cloud/foundation/entities/accounts/identity_provider_public_key.py new file mode 100644 index 00000000..c83d334b --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/identity_provider_public_key.py @@ -0,0 +1,100 @@ +""" +.. warning:: + IdentityProviderPublicKey should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: IdentityProviderPublicKey +============================================ + +The IdentityProviderPublicKey entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + identity_provider_public_keys = pelion_dm_sdk.foundation.identity_provider_public_key() + +How to import IdentityProviderPublicKey directly: + +.. code-block:: python + + from mbed_cloud.foundation import IdentityProviderPublicKey + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class IdentityProviderPublicKey(Entity): + """Represents the `IdentityProviderPublicKey` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = ["key", "kid"] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, _client=None, key=None, kid=None, + ): + """Creates a local `IdentityProviderPublicKey` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param key: The public key. + :type key: str + :param kid: The public key ID. + :type kid: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._key = fields.StringField(value=key) + self._kid = fields.StringField(value=kid) + + @property + def key(self): + """The public key. + + :rtype: str + """ + + return self._key.value + + @property + def kid(self): + """The public key ID. + + :rtype: str + """ + + return self._kid.value diff --git a/src/mbed_cloud/foundation/entities/accounts/idppublickey.py b/src/mbed_cloud/foundation/entities/accounts/idppublickey.py new file mode 100644 index 00000000..65f1c4ea --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/idppublickey.py @@ -0,0 +1,98 @@ +""" +.. warning:: + IdpPublicKey should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: IdpPublicKey +=============================== + +The IdpPublicKey entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + idppublickeys = pelion_dm_sdk.foundation.idppublickey() + +How to import IdpPublicKey directly: + +.. code-block:: python + + from mbed_cloud.foundation import IdpPublicKey + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class IdpPublicKey(Entity): + """Represents the `IdpPublicKey` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = ["key", "kid"] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__(self, _client=None, key=None, kid=None): + """Creates a local `IdpPublicKey` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param key: The public key. + :type key: str + :param kid: The public key ID. + :type kid: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._key = fields.StringField(value=key) + self._kid = fields.StringField(value=kid) + + @property + def key(self): + """The public key. + + :rtype: str + """ + + return self._key.value + + @property + def kid(self): + """The public key ID. + + :rtype: str + """ + + return self._kid.value diff --git a/src/mbed_cloud/foundation/entities/accounts/login_history.py b/src/mbed_cloud/foundation/entities/accounts/login_history.py index 3a6d240c..07ec3b46 100644 --- a/src/mbed_cloud/foundation/entities/accounts/login_history.py +++ b/src/mbed_cloud/foundation/entities/accounts/login_history.py @@ -55,7 +55,9 @@ class LoginHistory(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, date=None, ip_address=None, success=None, user_agent=None): + def __init__( + self, _client=None, date=None, ip_address=None, success=None, user_agent=None, + ): """Creates a local `LoginHistory` instance Parameters can be supplied on creation of the instance or given by diff --git a/src/mbed_cloud/foundation/entities/accounts/login_profile.py b/src/mbed_cloud/foundation/entities/accounts/login_profile.py index 30818fcb..df7f7c8b 100644 --- a/src/mbed_cloud/foundation/entities/accounts/login_profile.py +++ b/src/mbed_cloud/foundation/entities/accounts/login_profile.py @@ -44,18 +44,24 @@ class LoginProfile(Entity): """Represents the `LoginProfile` entity in Pelion Device Management""" # List of fields that are serialised between the API and SDK - _api_fieldnames = ["id", "name"] + _api_fieldnames = ["foreign_id", "id", "login_profile_type", "name"] # List of fields that are available for the user of the SDK _sdk_fieldnames = _api_fieldnames # Renames to be performed by the SDK when receiving data {: } - _renames = {} + _renames = { + "type": "login_profile_type", + } # Renames to be performed by the SDK when sending data {: } - _renames_to_api = {} + _renames_to_api = { + "login_profile_type": "type", + } - def __init__(self, _client=None, id=None, name=None): + def __init__( + self, _client=None, foreign_id=None, id=None, login_profile_type=None, name=None, + ): """Creates a local `LoginProfile` instance Parameters can be supplied on creation of the instance or given by @@ -65,8 +71,12 @@ def __init__(self, _client=None, id=None, name=None): on the entity. For details on when they are required please see the documentation for the setter method. + :param foreign_id: The ID of the user in the identity provider's service. + :type foreign_id: str :param id: ID of the identity provider. :type id: str + :param login_profile_type: Identity provider type. + :type login_profile_type: str :param name: Name of the identity provider. :type name: str """ @@ -76,9 +86,20 @@ def __init__(self, _client=None, id=None, name=None): # inline imports for avoiding circular references and bulk imports # fields + self._foreign_id = fields.StringField(value=foreign_id) self._id = fields.StringField(value=id) + self._login_profile_type = fields.StringField(value=login_profile_type, enum=enums.LoginProfileTypeEnum) self._name = fields.StringField(value=name) + @property + def foreign_id(self): + """The ID of the user in the identity provider's service. + + :rtype: str + """ + + return self._foreign_id.value + @property def id(self): """ID of the identity provider. @@ -98,6 +119,15 @@ def id(self, value): self._id.set(value) + @property + def login_profile_type(self): + """Identity provider type. + + :rtype: str + """ + + return self._login_profile_type.value + @property def name(self): """Name of the identity provider. diff --git a/src/mbed_cloud/foundation/entities/accounts/oidc_request.py b/src/mbed_cloud/foundation/entities/accounts/oidc_request.py new file mode 100644 index 00000000..4eb53843 --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/oidc_request.py @@ -0,0 +1,325 @@ +""" +.. warning:: + OidcRequest should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: OidcRequest +============================== + +The OidcRequest entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + oidc_requests = pelion_dm_sdk.foundation.oidc_request() + +How to import OidcRequest directly: + +.. code-block:: python + + from mbed_cloud.foundation import OidcRequest + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class OidcRequest(Entity): + """Represents the `OidcRequest` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "authorization_endpoint", + "auto_enrollment", + "claim_mapping", + "client_id", + "client_secret", + "end_session_endpoint", + "issuer", + "jwks_uri", + "keys", + "redirect_uri", + "revocation_endpoint", + "scopes", + "token_endpoint", + "token_request_mode", + "token_response_path", + "userinfo_endpoint", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + authorization_endpoint=None, + auto_enrollment=None, + claim_mapping=None, + client_id=None, + client_secret=None, + end_session_endpoint=None, + issuer=None, + jwks_uri=None, + keys=None, + redirect_uri=None, + revocation_endpoint=None, + scopes=None, + token_endpoint=None, + token_request_mode=None, + token_response_path=None, + userinfo_endpoint=None, + ): + """Creates a local `OidcRequest` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param authorization_endpoint: URL of the OAuth 2.0 authorization endpoint. + :type authorization_endpoint: str + :param auto_enrollment: For future use. + :type auto_enrollment: bool + :param claim_mapping: Mapping for non-standard OIDC claim names. + :type claim_mapping: dict + :param client_id: Client ID needed to authenticate and gain access to identity + provider's API. + :type client_id: str + :param client_secret: Client secret needed to authenticate and gain access to identity + provider's API. + :type client_secret: str + :param end_session_endpoint: URL of the provider's end session endpoint. + :type end_session_endpoint: str + :param issuer: Issuer of the identity provider. + :type issuer: str + :param jwks_uri: URL of the provider's JSON web key set document. + :type jwks_uri: str + :param keys: Provider's public keys and key IDs used to sign ID tokens. PEM- + encoded. + :type keys: list + :param redirect_uri: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + :type redirect_uri: str + :param revocation_endpoint: URL of the provider's token revocation endpoint. + :type revocation_endpoint: str + :param scopes: 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). + :type scopes: str + :param token_endpoint: URL of the OAuth 2.0 authorization endpoint. + :type token_endpoint: str + :param token_request_mode: 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. + :type token_request_mode: str + :param token_response_path: Path to the standard data in the token response. Levels in the + JSON structure must be separated by '.' (dot) characters. + :type token_response_path: str + :param userinfo_endpoint: URL of the OAuth 2.0 UserInfo endpoint. + :type userinfo_endpoint: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + from mbed_cloud.foundation.entities.accounts.oidc_request_claim_mapping import OidcRequestClaimMapping + from mbed_cloud.foundation.entities.accounts.identity_provider_public_key import IdentityProviderPublicKey + + # fields + self._authorization_endpoint = fields.StringField(value=authorization_endpoint) + self._auto_enrollment = fields.BooleanField(value=auto_enrollment) + self._claim_mapping = fields.DictField(value=claim_mapping, entity=OidcRequestClaimMapping) + self._client_id = fields.StringField(value=client_id) + self._client_secret = fields.StringField(value=client_secret) + self._end_session_endpoint = fields.StringField(value=end_session_endpoint) + self._issuer = fields.StringField(value=issuer) + self._jwks_uri = fields.StringField(value=jwks_uri) + self._keys = fields.ListField(value=keys, entity=IdentityProviderPublicKey) + self._redirect_uri = fields.StringField(value=redirect_uri) + self._revocation_endpoint = fields.StringField(value=revocation_endpoint) + self._scopes = fields.StringField(value=scopes) + self._token_endpoint = fields.StringField(value=token_endpoint) + self._token_request_mode = fields.StringField(value=token_request_mode, enum=enums.OidcRequestTokenModeEnum) + self._token_response_path = fields.StringField(value=token_response_path) + self._userinfo_endpoint = fields.StringField(value=userinfo_endpoint) + + @property + def authorization_endpoint(self): + """URL of the OAuth 2.0 authorization endpoint. + + :rtype: str + """ + + return self._authorization_endpoint.value + + @property + def auto_enrollment(self): + """For future use. + + :rtype: bool + """ + + return self._auto_enrollment.value + + @property + def claim_mapping(self): + """Mapping for non-standard OIDC claim names. + + :rtype: dict[OidcRequestClaimMapping] + """ + + return self._claim_mapping.value + + @property + def client_id(self): + """Client ID needed to authenticate and gain access to identity provider's API. + + :rtype: str + """ + + return self._client_id.value + + @property + def client_secret(self): + """Client secret needed to authenticate and gain access to identity provider's + API. + + :rtype: str + """ + + return self._client_secret.value + + @property + def end_session_endpoint(self): + """URL of the provider's end session endpoint. + + :rtype: str + """ + + return self._end_session_endpoint.value + + @property + def issuer(self): + """Issuer of the identity provider. + + :rtype: str + """ + + return self._issuer.value + + @property + def jwks_uri(self): + """URL of the provider's JSON web key set document. + + :rtype: str + """ + + return self._jwks_uri.value + + @property + def keys(self): + """Provider's public keys and key IDs used to sign ID tokens. PEM-encoded. + + :rtype: list[IdentityProviderPublicKey] + """ + + return self._keys.value + + @property + def redirect_uri(self): + """The URI needed to authenticate and gain access to identity provider's API. + Leave this empty to use the default redirect URI. + + :rtype: str + """ + + return self._redirect_uri.value + + @property + def revocation_endpoint(self): + """URL of the provider's token revocation endpoint. + + :rtype: str + """ + + return self._revocation_endpoint.value + + @property + def scopes(self): + """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). + + api example: 'openid email' + + :rtype: str + """ + + return self._scopes.value + + @property + def token_endpoint(self): + """URL of the OAuth 2.0 authorization endpoint. + + :rtype: str + """ + + return self._token_endpoint.value + + @property + def token_request_mode(self): + """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. + + :rtype: str + """ + + return self._token_request_mode.value + + @property + def token_response_path(self): + """Path to the standard data in the token response. Levels in the JSON structure + must be separated by '.' (dot) characters. + + api example: 'oidc.data' + + :rtype: str + """ + + return self._token_response_path.value + + @property + def userinfo_endpoint(self): + """URL of the OAuth 2.0 UserInfo endpoint. + + :rtype: str + """ + + return self._userinfo_endpoint.value diff --git a/src/mbed_cloud/foundation/entities/accounts/oidc_request_claim_mapping.py b/src/mbed_cloud/foundation/entities/accounts/oidc_request_claim_mapping.py new file mode 100644 index 00000000..81d49a3c --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/oidc_request_claim_mapping.py @@ -0,0 +1,210 @@ +""" +.. warning:: + OidcRequestClaimMapping should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: OidcRequestClaimMapping +========================================== + +The OidcRequestClaimMapping entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + oidc_request_claim_mappings = pelion_dm_sdk.foundation.oidc_request_claim_mapping() + +How to import OidcRequestClaimMapping directly: + +.. code-block:: python + + from mbed_cloud.foundation import OidcRequestClaimMapping + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class OidcRequestClaimMapping(Entity): + """Represents the `OidcRequestClaimMapping` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "email", + "email_verified", + "family_name", + "given_name", + "name", + "phone_number", + "sub", + "updated_at", + "updated_at_pattern", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + email=None, + email_verified=None, + family_name=None, + given_name=None, + name=None, + phone_number=None, + sub=None, + updated_at=None, + updated_at_pattern=None, + ): + """Creates a local `OidcRequestClaimMapping` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param email: Custom claim name for 'email'. + :type email: str + :param email_verified: Custom claim name for 'email_verified'. + :type email_verified: str + :param family_name: Custom claim name for 'family_name'. + :type family_name: str + :param given_name: Custom claim name for 'given_name'. + :type given_name: str + :param name: Custom claim name for 'name'. + :type name: str + :param phone_number: Custom claim name for 'phone_number'. + :type phone_number: str + :param sub: Custom claim name for 'sub'. + :type sub: str + :param updated_at: Custom claim name for 'updated_at'. + :type updated_at: str + :param updated_at_pattern: Custom pattern for claim 'updated_at' as defined by the Java + SimpleDateFormat class. + :type updated_at_pattern: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._email = fields.StringField(value=email) + self._email_verified = fields.StringField(value=email_verified) + self._family_name = fields.StringField(value=family_name) + self._given_name = fields.StringField(value=given_name) + self._name = fields.StringField(value=name) + self._phone_number = fields.StringField(value=phone_number) + self._sub = fields.StringField(value=sub) + self._updated_at = fields.StringField(value=updated_at) + self._updated_at_pattern = fields.StringField(value=updated_at_pattern) + + @property + def email(self): + """Custom claim name for 'email'. + + api example: 'email_address' + + :rtype: str + """ + + return self._email.value + + @property + def email_verified(self): + """Custom claim name for 'email_verified'. + + :rtype: str + """ + + return self._email_verified.value + + @property + def family_name(self): + """Custom claim name for 'family_name'. + + :rtype: str + """ + + return self._family_name.value + + @property + def given_name(self): + """Custom claim name for 'given_name'. + + :rtype: str + """ + + return self._given_name.value + + @property + def name(self): + """Custom claim name for 'name'. + + :rtype: str + """ + + return self._name.value + + @property + def phone_number(self): + """Custom claim name for 'phone_number'. + + :rtype: str + """ + + return self._phone_number.value + + @property + def sub(self): + """Custom claim name for 'sub'. + + :rtype: str + """ + + return self._sub.value + + @property + def updated_at(self): + """Custom claim name for 'updated_at'. + + :rtype: str + """ + + return self._updated_at.value + + @property + def updated_at_pattern(self): + """Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat + class. + + api example: "yyyy-MM-dd'T'HH:mm:ssXXX" + + :rtype: str + """ + + return self._updated_at_pattern.value diff --git a/src/mbed_cloud/foundation/entities/accounts/oidcrequest.py b/src/mbed_cloud/foundation/entities/accounts/oidcrequest.py new file mode 100644 index 00000000..407a4415 --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/oidcrequest.py @@ -0,0 +1,327 @@ +""" +.. warning:: + OIDCRequest should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: OIDCRequest +============================== + +The OIDCRequest entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + oidcrequests = pelion_dm_sdk.foundation.oidcrequest() + +How to import OIDCRequest directly: + +.. code-block:: python + + from mbed_cloud.foundation import OIDCRequest + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class OIDCRequest(Entity): + """Represents the `OIDCRequest` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "authorization_endpoint", + "auto_enrollment", + "claim_mapping", + "client_id", + "client_secret", + "end_session_endpoint", + "issuer", + "jwks_uri", + "keys", + "redirect_uri", + "revocation_endpoint", + "scopes", + "token_endpoint", + "token_request_mode", + "token_response_path", + "userinfo_endpoint", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + authorization_endpoint=None, + auto_enrollment=None, + claim_mapping=None, + client_id=None, + client_secret=None, + end_session_endpoint=None, + issuer=None, + jwks_uri=None, + keys=None, + redirect_uri=None, + revocation_endpoint=None, + scopes=None, + token_endpoint=None, + token_request_mode=None, + token_response_path=None, + userinfo_endpoint=None, + ): + """Creates a local `OIDCRequest` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param authorization_endpoint: URL of the OAuth 2.0 authorization endpoint. + :type authorization_endpoint: str + :param auto_enrollment: For future use. + :type auto_enrollment: bool + :param claim_mapping: Mapping for non-standard OIDC claim names. + :type claim_mapping: dict + :param client_id: Client ID needed to authenticate and gain access to identity + provider's API. + :type client_id: str + :param client_secret: Client secret needed to authenticate and gain access to identity + provider's API. + :type client_secret: str + :param end_session_endpoint: URL of the provider's end session endpoint. + :type end_session_endpoint: str + :param issuer: Issuer of the identity provider. + :type issuer: str + :param jwks_uri: URL of the provider's JSON web key set document. + :type jwks_uri: str + :param keys: Provider's public keys and key IDs used to sign ID tokens. PEM- + encoded. + :type keys: list + :param redirect_uri: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + :type redirect_uri: str + :param revocation_endpoint: URL of the provider's token revocation endpoint. + :type revocation_endpoint: str + :param scopes: 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). + :type scopes: str + :param token_endpoint: URL of the OAuth 2.0 authorization endpoint. + :type token_endpoint: str + :param token_request_mode: 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. + :type token_request_mode: str + :param token_response_path: Path to the standard data in the token response. Levels in the + JSON structure must be separated by '.' (dot) characters. + :type token_response_path: str + :param userinfo_endpoint: URL of the OAuth 2.0 UserInfo endpoint. + :type userinfo_endpoint: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + from mbed_cloud.foundation.entities.accounts.oidcrequestclaimmapping import OIDCRequestClaimMapping + from mbed_cloud.foundation.entities.accounts.idppublickey import IdpPublicKey + + # fields + self._authorization_endpoint = fields.StringField(value=authorization_endpoint) + self._auto_enrollment = fields.BooleanField(value=auto_enrollment) + self._claim_mapping = fields.DictField(value=claim_mapping, entity=OIDCRequestClaimMapping) + self._client_id = fields.StringField(value=client_id) + self._client_secret = fields.StringField(value=client_secret) + self._end_session_endpoint = fields.StringField(value=end_session_endpoint) + self._issuer = fields.StringField(value=issuer) + self._jwks_uri = fields.StringField(value=jwks_uri) + self._keys = fields.ListField(value=keys, entity=IdpPublicKey) + self._redirect_uri = fields.StringField(value=redirect_uri) + self._revocation_endpoint = fields.StringField(value=revocation_endpoint) + self._scopes = fields.StringField(value=scopes) + self._token_endpoint = fields.StringField(value=token_endpoint) + self._token_request_mode = fields.StringField( + value=token_request_mode, enum=enums.OIDCRequestTokenRequestModeEnum + ) + self._token_response_path = fields.StringField(value=token_response_path) + self._userinfo_endpoint = fields.StringField(value=userinfo_endpoint) + + @property + def authorization_endpoint(self): + """URL of the OAuth 2.0 authorization endpoint. + + :rtype: str + """ + + return self._authorization_endpoint.value + + @property + def auto_enrollment(self): + """For future use. + + :rtype: bool + """ + + return self._auto_enrollment.value + + @property + def claim_mapping(self): + """Mapping for non-standard OIDC claim names. + + :rtype: dict[OIDCRequestClaimMapping] + """ + + return self._claim_mapping.value + + @property + def client_id(self): + """Client ID needed to authenticate and gain access to identity provider's API. + + :rtype: str + """ + + return self._client_id.value + + @property + def client_secret(self): + """Client secret needed to authenticate and gain access to identity provider's + API. + + :rtype: str + """ + + return self._client_secret.value + + @property + def end_session_endpoint(self): + """URL of the provider's end session endpoint. + + :rtype: str + """ + + return self._end_session_endpoint.value + + @property + def issuer(self): + """Issuer of the identity provider. + + :rtype: str + """ + + return self._issuer.value + + @property + def jwks_uri(self): + """URL of the provider's JSON web key set document. + + :rtype: str + """ + + return self._jwks_uri.value + + @property + def keys(self): + """Provider's public keys and key IDs used to sign ID tokens. PEM-encoded. + + :rtype: list[IdpPublicKey] + """ + + return self._keys.value + + @property + def redirect_uri(self): + """The URI needed to authenticate and gain access to identity provider's API. + Leave this empty to use the default redirect URI. + + :rtype: str + """ + + return self._redirect_uri.value + + @property + def revocation_endpoint(self): + """URL of the provider's token revocation endpoint. + + :rtype: str + """ + + return self._revocation_endpoint.value + + @property + def scopes(self): + """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). + + api example: 'openid email' + + :rtype: str + """ + + return self._scopes.value + + @property + def token_endpoint(self): + """URL of the OAuth 2.0 authorization endpoint. + + :rtype: str + """ + + return self._token_endpoint.value + + @property + def token_request_mode(self): + """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. + + :rtype: str + """ + + return self._token_request_mode.value + + @property + def token_response_path(self): + """Path to the standard data in the token response. Levels in the JSON structure + must be separated by '.' (dot) characters. + + api example: 'oidc.data' + + :rtype: str + """ + + return self._token_response_path.value + + @property + def userinfo_endpoint(self): + """URL of the OAuth 2.0 UserInfo endpoint. + + :rtype: str + """ + + return self._userinfo_endpoint.value diff --git a/src/mbed_cloud/foundation/entities/accounts/oidcrequestclaimmapping.py b/src/mbed_cloud/foundation/entities/accounts/oidcrequestclaimmapping.py new file mode 100644 index 00000000..ad9bc84f --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/oidcrequestclaimmapping.py @@ -0,0 +1,210 @@ +""" +.. warning:: + OIDCRequestClaimMapping should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: OIDCRequestClaimMapping +========================================== + +The OIDCRequestClaimMapping entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + oidcrequestclaimmappings = pelion_dm_sdk.foundation.oidcrequestclaimmapping() + +How to import OIDCRequestClaimMapping directly: + +.. code-block:: python + + from mbed_cloud.foundation import OIDCRequestClaimMapping + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class OIDCRequestClaimMapping(Entity): + """Represents the `OIDCRequestClaimMapping` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "email", + "email_verified", + "family_name", + "given_name", + "name", + "phone_number", + "sub", + "updated_at", + "updated_at_pattern", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + email=None, + email_verified=None, + family_name=None, + given_name=None, + name=None, + phone_number=None, + sub=None, + updated_at=None, + updated_at_pattern=None, + ): + """Creates a local `OIDCRequestClaimMapping` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param email: Custom claim name for 'email'. + :type email: str + :param email_verified: Custom claim name for 'email_verified'. + :type email_verified: str + :param family_name: Custom claim name for 'family_name'. + :type family_name: str + :param given_name: Custom claim name for 'given_name'. + :type given_name: str + :param name: Custom claim name for 'name'. + :type name: str + :param phone_number: Custom claim name for 'phone_number'. + :type phone_number: str + :param sub: Custom claim name for 'sub'. + :type sub: str + :param updated_at: Custom claim name for 'updated_at'. + :type updated_at: str + :param updated_at_pattern: Custom pattern for claim 'updated_at' as defined by the Java + SimpleDateFormat class. + :type updated_at_pattern: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._email = fields.StringField(value=email) + self._email_verified = fields.StringField(value=email_verified) + self._family_name = fields.StringField(value=family_name) + self._given_name = fields.StringField(value=given_name) + self._name = fields.StringField(value=name) + self._phone_number = fields.StringField(value=phone_number) + self._sub = fields.StringField(value=sub) + self._updated_at = fields.StringField(value=updated_at) + self._updated_at_pattern = fields.StringField(value=updated_at_pattern) + + @property + def email(self): + """Custom claim name for 'email'. + + api example: 'email_address' + + :rtype: str + """ + + return self._email.value + + @property + def email_verified(self): + """Custom claim name for 'email_verified'. + + :rtype: str + """ + + return self._email_verified.value + + @property + def family_name(self): + """Custom claim name for 'family_name'. + + :rtype: str + """ + + return self._family_name.value + + @property + def given_name(self): + """Custom claim name for 'given_name'. + + :rtype: str + """ + + return self._given_name.value + + @property + def name(self): + """Custom claim name for 'name'. + + :rtype: str + """ + + return self._name.value + + @property + def phone_number(self): + """Custom claim name for 'phone_number'. + + :rtype: str + """ + + return self._phone_number.value + + @property + def sub(self): + """Custom claim name for 'sub'. + + :rtype: str + """ + + return self._sub.value + + @property + def updated_at(self): + """Custom claim name for 'updated_at'. + + :rtype: str + """ + + return self._updated_at.value + + @property + def updated_at_pattern(self): + """Custom pattern for claim 'updated_at' as defined by the Java SimpleDateFormat + class. + + api example: "yyyy-MM-dd'T'HH:mm:ssXXX" + + :rtype: str + """ + + return self._updated_at_pattern.value diff --git a/src/mbed_cloud/foundation/entities/accounts/parent_account.py b/src/mbed_cloud/foundation/entities/accounts/parent_account.py index d093c81c..5a612d6b 100644 --- a/src/mbed_cloud/foundation/entities/accounts/parent_account.py +++ b/src/mbed_cloud/foundation/entities/accounts/parent_account.py @@ -55,7 +55,9 @@ class ParentAccount(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, admin_email=None, admin_name=None, id=None): + def __init__( + self, _client=None, admin_email=None, admin_name=None, id=None, + ): """Creates a local `ParentAccount` instance Parameters can be supplied on creation of the instance or given by diff --git a/src/mbed_cloud/foundation/entities/accounts/password_policy.py b/src/mbed_cloud/foundation/entities/accounts/password_policy.py index 5adc9ab4..bfc211be 100644 --- a/src/mbed_cloud/foundation/entities/accounts/password_policy.py +++ b/src/mbed_cloud/foundation/entities/accounts/password_policy.py @@ -55,7 +55,9 @@ class PasswordPolicy(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, minimum_length=None): + def __init__( + self, _client=None, minimum_length=None, + ): """Creates a local `PasswordPolicy` instance Parameters can be supplied on creation of the instance or given by diff --git a/src/mbed_cloud/foundation/entities/accounts/policy.py b/src/mbed_cloud/foundation/entities/accounts/policy.py index f50703db..5589895b 100644 --- a/src/mbed_cloud/foundation/entities/accounts/policy.py +++ b/src/mbed_cloud/foundation/entities/accounts/policy.py @@ -44,7 +44,7 @@ class Policy(Entity): """Represents the `Policy` entity in Pelion Device Management""" # List of fields that are serialised between the API and SDK - _api_fieldnames = ["action", "allow", "feature", "inherited", "resource"] + _api_fieldnames = ["action", "allow", "feature", "inherited", "inherited_from", "inherited_type", "resource"] # List of fields that are available for the user of the SDK _sdk_fieldnames = _api_fieldnames @@ -55,7 +55,17 @@ class Policy(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, action=None, allow=None, feature=None, inherited=None, resource=None): + def __init__( + self, + _client=None, + action=None, + allow=None, + feature=None, + inherited=None, + inherited_from=None, + inherited_type=None, + resource=None, + ): """Creates a local `Policy` instance Parameters can be supplied on creation of the instance or given by @@ -75,6 +85,10 @@ def __init__(self, _client=None, action=None, allow=None, feature=None, inherite :param inherited: Flag indicating whether this feature is inherited or overwritten specifically. :type inherited: bool + :param inherited_from: An ID indicating where this policy is inherited from. + :type inherited_from: str + :param inherited_type: Indicates the type of entity this policy is inherited from. + :type inherited_type: str :param resource: Resource that is protected by this policy. :type resource: str """ @@ -88,6 +102,8 @@ def __init__(self, _client=None, action=None, allow=None, feature=None, inherite self._allow = fields.BooleanField(value=allow) self._feature = fields.StringField(value=feature) self._inherited = fields.BooleanField(value=inherited) + self._inherited_from = fields.StringField(value=inherited_from) + self._inherited_type = fields.StringField(value=inherited_type, enum=enums.PolicyInheritedTypeEnum) self._resource = fields.StringField(value=resource) @property @@ -132,6 +148,28 @@ def inherited(self): return self._inherited.value + @property + def inherited_from(self): + """An ID indicating where this policy is inherited from. + + api example: '016ada3ec2d46665bf66e32e00000000' + + :rtype: str + """ + + return self._inherited_from.value + + @property + def inherited_type(self): + """Indicates the type of entity this policy is inherited from. + + api example: 'account' + + :rtype: str + """ + + return self._inherited_type.value + @property def resource(self): """Resource that is protected by this policy. diff --git a/src/mbed_cloud/foundation/entities/accounts/policy_group.py b/src/mbed_cloud/foundation/entities/accounts/policy_group.py new file mode 100644 index 00000000..dabcbdbc --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/policy_group.py @@ -0,0 +1,620 @@ +""" +.. warning:: + PolicyGroup should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: PolicyGroup +============================== + +Entities normally contain methods to create, read, update, delete and list resources. Other +actions may also be possible on the entity depending on the capabilities present in the API. +This entity has the following methods: + +- :meth:`PolicyGroup.api_keys` +- :meth:`PolicyGroup.create` +- :meth:`PolicyGroup.delete` +- :meth:`PolicyGroup.list` +- :meth:`PolicyGroup.read` +- :meth:`PolicyGroup.update` +- :meth:`PolicyGroup.users` + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + policy_groups = pelion_dm_sdk.foundation.policy_group() + +How to import PolicyGroup directly: + +.. code-block:: python + + from mbed_cloud.foundation import PolicyGroup + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class PolicyGroup(Entity): + """Represents the `PolicyGroup` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = ["account_id", "apikey_count", "created_at", "id", "name", "updated_at", "user_count"] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + account_id=None, + apikey_count=None, + created_at=None, + id=None, + name=None, + updated_at=None, + user_count=None, + ): + """Creates a local `PolicyGroup` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param account_id: The ID of the account this group belongs to. + :type account_id: str + :param apikey_count: The number of API keys in this group. + :type apikey_count: int + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param id: (Required) The ID of the group. + :type id: str + :param name: (Required) The name of the group. + :type name: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + :param user_count: The number of users in this group. + :type user_count: int + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._account_id = fields.StringField(value=account_id) + self._apikey_count = fields.IntegerField(value=apikey_count) + self._created_at = fields.DateTimeField(value=created_at) + self._id = fields.StringField(value=id) + self._name = fields.StringField(value=name) + self._updated_at = fields.DateTimeField(value=updated_at) + self._user_count = fields.IntegerField(value=user_count) + + @property + def account_id(self): + """The ID of the account this group belongs to. + + api example: '01619571e2e90242ac12000600000000' + + :rtype: str + """ + + return self._account_id.value + + @property + def apikey_count(self): + """The number of API keys in this group. + + :rtype: int + """ + + return self._apikey_count.value + + @property + def created_at(self): + """Creation UTC time RFC3339. + + api example: '2018-02-13T09:35:20Z' + + :rtype: datetime + """ + + return self._created_at.value + + @property + def id(self): + """The ID of the group. + + This field must be set when updating or deleting an existing PolicyGroup Entity. + + api example: '01619571dec00242ac12000600000000' + + :rtype: str + """ + + return self._id.value + + @id.setter + def id(self, value): + """Set value of `id` + + :param value: value to set + :type value: str + """ + + self._id.set(value) + + @property + def name(self): + """The name of the group. + + This field must be set when creating a new PolicyGroup Entity. + + api example: 'Administrators' + + :rtype: str + """ + + return self._name.value + + @name.setter + def name(self, value): + """Set value of `name` + + :param value: value to set + :type value: str + """ + + self._name.set(value) + + @property + def updated_at(self): + """Last update UTC time RFC3339. + + api example: '2018-02-14T15:24:14Z' + + :rtype: datetime + """ + + return self._updated_at.value + + @property + def user_count(self): + """The number of users in this group. + + api example: 1 + + :rtype: int + """ + + return self._user_count.value + + def api_keys(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get the API keys of a policy group. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(ApiKey) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import ApiKey + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=ApiKey._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = ApiKey._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=ApiKey, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_api_keys, + ) + + def create(self, members=None): + """Create a new group. + + `REST API Documentation `_. + + :param members: Represents arrays of user and API key IDs. + :type members: dict + + :rtype: PolicyGroup + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + # Method parameters are unconditionally sent even if set to None + body_params["members"] = fields.DictField(members).to_api() + if self._name.value_set: + body_params["name"] = self._name.to_api() + + return self._client.call_api( + method="post", + path="/v3/policy-groups", + content_type="application/json", + body_params=body_params, + unpack=self, + ) + + def delete(self): + """Delete a group. + + `REST API Documentation `_. + + :rtype: PolicyGroup + """ + + return self._client.call_api( + method="delete", + path="/v3/policy-groups/{group_id}", + content_type="application/json", + path_params={"group_id": self._id.to_api(),}, + unpack=self, + ) + + def list(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get policy groups. + + `REST API Documentation `_. + + **API Filters** + + The following filters are supported by the API when listing PolicyGroup entities: + + +-------+------+------+------+------+------+------+------+ + | Field | eq | neq | gte | lte | in | nin | like | + +=======+======+======+======+======+======+======+======+ + | name | Y | | | | | | | + +-------+------+------+------+------+------+------+------+ + + **Example Usage** + + .. code-block:: python + + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud import ApiFilter + + api_filter = ApiFilter() + api_filter.add_filter("name", "eq", ) + for policy_group in PolicyGroup().list(filter=api_filter): + print(policy_group.name) + + :param filter: An optional filter to apply when listing entities, please see the + above **API Filters** table for supported filters. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(PolicyGroup) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=PolicyGroup._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = PolicyGroup._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=PolicyGroup, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_list, + ) + + def _paginate_api_keys(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get the API keys of a policy group. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.PolicyGroupOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/policy-groups/{group_id}/api-keys", + content_type="application/json", + query_params=query_params, + path_params={"group_id": self._id.to_api(),}, + unpack=False, + ) + + def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get policy groups. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.PolicyGroupOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/policy-groups", + content_type="application/json", + query_params=query_params, + unpack=False, + ) + + def _paginate_users(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get users of a policy group. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.PolicyGroupOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/policy-groups/{group_id}/users", + content_type="application/json", + query_params=query_params, + path_params={"group_id": self._id.to_api(),}, + unpack=False, + ) + + def read(self): + """Get a policy group. + + `REST API Documentation `_. + + :rtype: PolicyGroup + """ + + return self._client.call_api( + method="get", + path="/v3/policy-groups/{group_id}", + content_type="application/json", + path_params={"group_id": self._id.to_api(),}, + unpack=self, + ) + + def update(self): + """Update the group name. + + `REST API Documentation `_. + + :rtype: PolicyGroup + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + if self._name.value_set: + body_params["name"] = self._name.to_api() + + return self._client.call_api( + method="put", + path="/v3/policy-groups/{group_id}", + content_type="application/json", + path_params={"group_id": self._id.to_api(),}, + body_params=body_params, + unpack=self, + ) + + def users(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get users of a policy group. + + `REST API Documentation `_. + + **API Filters** + + The following filters are supported by the API when listing PolicyGroup entities: + + +--------+------+------+------+------+------+------+------+ + | Field | eq | neq | gte | lte | in | nin | like | + +========+======+======+======+======+======+======+======+ + | status | Y | | | | Y | Y | | + +--------+------+------+------+------+------+------+------+ + + **Example Usage** + + .. code-block:: python + + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud import ApiFilter + + api_filter = ApiFilter() + api_filter.add_filter("status", "eq", ) + for user in PolicyGroup().users(filter=api_filter): + print(user.status) + + :param filter: An optional filter to apply when listing entities, please see the + above **API Filters** table for supported filters. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(User) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import User + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=User._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = User._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=User, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_users, + ) diff --git a/src/mbed_cloud/foundation/entities/accounts/saml2_request.py b/src/mbed_cloud/foundation/entities/accounts/saml2_request.py new file mode 100644 index 00000000..184f2be9 --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/saml2_request.py @@ -0,0 +1,169 @@ +""" +.. warning:: + Saml2Request should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: Saml2Request +=============================== + +The Saml2Request entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + saml2_requests = pelion_dm_sdk.foundation.saml2_request() + +How to import Saml2Request directly: + +.. code-block:: python + + from mbed_cloud.foundation import Saml2Request + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class Saml2Request(Entity): + """Represents the `Saml2Request` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "entity_descriptor", + "idp_entity_id", + "idp_x509_certs", + "slo_endpoint", + "sp_entity_id", + "sso_endpoint", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + entity_descriptor=None, + idp_entity_id=None, + idp_x509_certs=None, + slo_endpoint=None, + sp_entity_id=None, + sso_endpoint=None, + ): + """Creates a local `Saml2Request` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param entity_descriptor: Contains an entity descriptor document for the identity provider. + Can be used as an alternative method to provide the identity + provider's attributes. + :type entity_descriptor: bytes + :param idp_entity_id: Entity ID of the identity provider. + :type idp_entity_id: str + :param idp_x509_certs: List of public X509 certificates of the identity provider. + Certificates must be in PEM format. + :type idp_x509_certs: list + :param slo_endpoint: URL of the identity provider's SLO endpoint. + :type slo_endpoint: str + :param sp_entity_id: Entity ID of the service provider. We recommend that you leave it + empty and let the system generate it. + :type sp_entity_id: str + :param sso_endpoint: URL of the identity provider's SSO endpoint. + :type sso_endpoint: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._entity_descriptor = fields.BinaryField(value=entity_descriptor) + self._idp_entity_id = fields.StringField(value=idp_entity_id) + self._idp_x509_certs = fields.ListField(value=idp_x509_certs) + self._slo_endpoint = fields.StringField(value=slo_endpoint) + self._sp_entity_id = fields.StringField(value=sp_entity_id) + self._sso_endpoint = fields.StringField(value=sso_endpoint) + + @property + def entity_descriptor(self): + """Contains an entity descriptor document for the identity provider. Can be used + as an alternative method to provide the identity provider's attributes. + + :rtype: bytes + """ + + return self._entity_descriptor.value + + @property + def idp_entity_id(self): + """Entity ID of the identity provider. + + :rtype: str + """ + + return self._idp_entity_id.value + + @property + def idp_x509_certs(self): + """List of public X509 certificates of the identity provider. Certificates must + be in PEM format. + + :rtype: list + """ + + return self._idp_x509_certs.value + + @property + def slo_endpoint(self): + """URL of the identity provider's SLO endpoint. + + :rtype: str + """ + + return self._slo_endpoint.value + + @property + def sp_entity_id(self): + """Entity ID of the service provider. We recommend that you leave it empty and + let the system generate it. + + :rtype: str + """ + + return self._sp_entity_id.value + + @property + def sso_endpoint(self): + """URL of the identity provider's SSO endpoint. + + :rtype: str + """ + + return self._sso_endpoint.value diff --git a/src/mbed_cloud/foundation/entities/accounts/saml2request.py b/src/mbed_cloud/foundation/entities/accounts/saml2request.py new file mode 100644 index 00000000..cabc1ce7 --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/saml2request.py @@ -0,0 +1,169 @@ +""" +.. warning:: + SAML2Request should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: SAML2Request +=============================== + +The SAML2Request entity does not have any methods, all actions must be performed via +the encapsulating entity. + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + saml2requests = pelion_dm_sdk.foundation.saml2request() + +How to import SAML2Request directly: + +.. code-block:: python + + from mbed_cloud.foundation import SAML2Request + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class SAML2Request(Entity): + """Represents the `SAML2Request` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "entity_descriptor", + "idp_entity_id", + "idp_x509_certs", + "slo_endpoint", + "sp_entity_id", + "sso_endpoint", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + entity_descriptor=None, + idp_entity_id=None, + idp_x509_certs=None, + slo_endpoint=None, + sp_entity_id=None, + sso_endpoint=None, + ): + """Creates a local `SAML2Request` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param entity_descriptor: Contains an entity descriptor document for the identity provider. + Can be used as an alternative method to provide the identity + provider's attributes. + :type entity_descriptor: bytes + :param idp_entity_id: Entity ID of the identity provider. + :type idp_entity_id: str + :param idp_x509_certs: List of public X509 certificates of the identity provider. + Certificates must be in PEM format. + :type idp_x509_certs: list + :param slo_endpoint: URL of the identity provider's SLO endpoint. + :type slo_endpoint: str + :param sp_entity_id: Entity ID of the service provider. We recommend that you leave it + empty and let the system generate it. + :type sp_entity_id: str + :param sso_endpoint: URL of the identity provider's SSO endpoint. + :type sso_endpoint: str + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._entity_descriptor = fields.BinaryField(value=entity_descriptor) + self._idp_entity_id = fields.StringField(value=idp_entity_id) + self._idp_x509_certs = fields.ListField(value=idp_x509_certs) + self._slo_endpoint = fields.StringField(value=slo_endpoint) + self._sp_entity_id = fields.StringField(value=sp_entity_id) + self._sso_endpoint = fields.StringField(value=sso_endpoint) + + @property + def entity_descriptor(self): + """Contains an entity descriptor document for the identity provider. Can be used + as an alternative method to provide the identity provider's attributes. + + :rtype: bytes + """ + + return self._entity_descriptor.value + + @property + def idp_entity_id(self): + """Entity ID of the identity provider. + + :rtype: str + """ + + return self._idp_entity_id.value + + @property + def idp_x509_certs(self): + """List of public X509 certificates of the identity provider. Certificates must + be in PEM format. + + :rtype: list + """ + + return self._idp_x509_certs.value + + @property + def slo_endpoint(self): + """URL of the identity provider's SLO endpoint. + + :rtype: str + """ + + return self._slo_endpoint.value + + @property + def sp_entity_id(self): + """Entity ID of the service provider. We recommend that you leave it empty and + let the system generate it. + + :rtype: str + """ + + return self._sp_entity_id.value + + @property + def sso_endpoint(self): + """URL of the identity provider's SSO endpoint. + + :rtype: str + """ + + return self._sso_endpoint.value diff --git a/src/mbed_cloud/foundation/entities/accounts/subtenant_api_key.py b/src/mbed_cloud/foundation/entities/accounts/subtenant_api_key.py index d4309903..7a7a69a2 100644 --- a/src/mbed_cloud/foundation/entities/accounts/subtenant_api_key.py +++ b/src/mbed_cloud/foundation/entities/accounts/subtenant_api_key.py @@ -12,6 +12,7 @@ - :meth:`SubtenantApiKey.create` - :meth:`SubtenantApiKey.delete` +- :meth:`SubtenantApiKey.policy_groups` - :meth:`SubtenantApiKey.read` - :meth:`SubtenantApiKey.update` @@ -54,6 +55,7 @@ class SubtenantApiKey(Entity): "account_id", "created_at", "creation_time", + "groups", "id", "key", "last_login_time", @@ -78,6 +80,7 @@ def __init__( account_id=None, created_at=None, creation_time=None, + groups=None, id=None, key=None, last_login_time=None, @@ -102,6 +105,8 @@ def __init__( :param creation_time: The timestamp of the API key creation in the storage, in milliseconds. :type creation_time: int + :param groups: A list of group IDs this API key belongs to. + :type groups: list :param id: (Required) The ID of the API key. :type id: str :param key: The API key. @@ -126,6 +131,7 @@ def __init__( self._account_id = fields.StringField(value=account_id) self._created_at = fields.DateTimeField(value=created_at) self._creation_time = fields.IntegerField(value=creation_time) + self._groups = fields.ListField(value=groups) self._id = fields.StringField(value=id) self._key = fields.StringField(value=key) self._last_login_time = fields.IntegerField(value=last_login_time) @@ -179,6 +185,25 @@ def creation_time(self): return self._creation_time.value + @property + def groups(self): + """A list of group IDs this API key belongs to. + + :rtype: list + """ + + return self._groups.value + + @groups.setter + def groups(self, value): + """Set value of `groups` + + :param value: value to set + :type value: list + """ + + self._groups.set(value) + @property def id(self): """The ID of the API key. @@ -312,6 +337,8 @@ def create(self): # Conditionally setup the message body, fields which have not been set will not be sent to the API. # This avoids null fields being rejected and allows the default value to be used. body_params = {} + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._name.value_set: body_params["name"] = self._name.to_api() if self._owner.value_set: @@ -323,7 +350,7 @@ def create(self): method="post", path="/v3/accounts/{account_id}/api-keys", content_type="application/json", - path_params={"account_id": self._account_id.to_api()}, + path_params={"account_id": self._account_id.to_api(),}, body_params=body_params, unpack=self, ) @@ -340,10 +367,104 @@ def delete(self): method="delete", path="/v3/accounts/{account_id}/api-keys/{apikey_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api(),}, unpack=self, ) + def _paginate_policy_groups(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get policy groups of an API key. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.SubtenantApiKeyOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/api-keys/{apikey_id}/groups", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api(),}, + query_params=query_params, + unpack=False, + ) + + def policy_groups(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get policy groups of an API key. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(SubtenantPolicyGroup) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import SubtenantPolicyGroup + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=SubtenantPolicyGroup._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = SubtenantPolicyGroup._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=SubtenantPolicyGroup, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_policy_groups, + ) + def read(self): """Get API key details. @@ -356,7 +477,7 @@ def read(self): method="get", path="/v3/accounts/{account_id}/api-keys/{apikey_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api(),}, unpack=self, ) @@ -371,6 +492,8 @@ def update(self): # Conditionally setup the message body, fields which have not been set will not be sent to the API. # This avoids null fields being rejected and allows the default value to be used. body_params = {} + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._name.value_set: body_params["name"] = self._name.to_api() if self._owner.value_set: @@ -382,7 +505,7 @@ def update(self): method="put", path="/v3/accounts/{account_id}/api-keys/{apikey_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "apikey_id": self._id.to_api(),}, body_params=body_params, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/accounts/subtenant_identity_provider.py b/src/mbed_cloud/foundation/entities/accounts/subtenant_identity_provider.py new file mode 100644 index 00000000..1ea28fd1 --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/subtenant_identity_provider.py @@ -0,0 +1,563 @@ +""" +.. warning:: + SubtenantIdentityProvider should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: SubtenantIdentityProvider +============================================ + +Entities normally contain methods to create, read, update, delete and list resources. Other +actions may also be possible on the entity depending on the capabilities present in the API. +This entity has the following methods: + +- :meth:`SubtenantIdentityProvider.create` +- :meth:`SubtenantIdentityProvider.delete` +- :meth:`SubtenantIdentityProvider.delete_service_provider_certificate` +- :meth:`SubtenantIdentityProvider.generate_service_provider_certificate` +- :meth:`SubtenantIdentityProvider.list` +- :meth:`SubtenantIdentityProvider.read` +- :meth:`SubtenantIdentityProvider.refresh_tokens` +- :meth:`SubtenantIdentityProvider.update` + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + subtenant_identity_providers = pelion_dm_sdk.foundation.subtenant_identity_provider() + +How to import SubtenantIdentityProvider directly: + +.. code-block:: python + + from mbed_cloud.foundation import SubtenantIdentityProvider + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class SubtenantIdentityProvider(Entity): + """Represents the `SubtenantIdentityProvider` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = [ + "account_id", + "created_at", + "description", + "id", + "is_default", + "name", + "saml2_attributes", + "status", + "updated_at", + ] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + account_id=None, + created_at=None, + description=None, + id=None, + is_default=None, + name=None, + saml2_attributes=None, + status=None, + updated_at=None, + ): + """Creates a local `SubtenantIdentityProvider` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param account_id: (Required) The ID of the account the identity provider belongs to. + :type account_id: str + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param description: Description for the identity provider. + :type description: str + :param id: (Required) Entity ID. + :type id: str + :param is_default: Flag indicating whether this is the global default identity + provider. + :type is_default: bool + :param name: (Required) Name of the identity provider. + :type name: str + :param saml2_attributes: Represents SAML2 specific attributes in responses. + :type saml2_attributes: dict + :param status: Status of the identity provider. + :type status: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._account_id = fields.StringField(value=account_id) + self._created_at = fields.DateTimeField(value=created_at) + self._description = fields.StringField(value=description) + self._id = fields.StringField(value=id) + self._is_default = fields.BooleanField(value=is_default) + self._name = fields.StringField(value=name) + self._saml2_attributes = fields.DictField(value=saml2_attributes) + self._status = fields.StringField(value=status, enum=enums.SubtenantIdentityProviderStatusEnum) + self._updated_at = fields.DateTimeField(value=updated_at) + + @property + def account_id(self): + """The ID of the account the identity provider belongs to. + + This field must be set when creating a new SubtenantIdentityProvider Entity. + + api example: '01619571e2e90242ac12000600000000' + + :rtype: str + """ + + return self._account_id.value + + @account_id.setter + def account_id(self, value): + """Set value of `account_id` + + :param value: value to set + :type value: str + """ + + self._account_id.set(value) + + @property + def created_at(self): + """Creation UTC time RFC3339. + + api example: '2018-02-13T09:35:20Z' + + :rtype: datetime + """ + + return self._created_at.value + + @property + def description(self): + """Description for the identity provider. + + :rtype: str + """ + + return self._description.value + + @description.setter + def description(self, value): + """Set value of `description` + + :param value: value to set + :type value: str + """ + + self._description.set(value) + + @property + def id(self): + """Entity ID. + + This field must be set when updating or deleting an existing SubtenantIdentityProvider Entity. + + api example: '01619571d01d0242ac12000600000000' + + :rtype: str + """ + + return self._id.value + + @id.setter + def id(self, value): + """Set value of `id` + + :param value: value to set + :type value: str + """ + + self._id.set(value) + + @property + def is_default(self): + """Flag indicating whether this is the global default identity provider. + + :rtype: bool + """ + + return self._is_default.value + + @property + def name(self): + """Name of the identity provider. + + This field must be set when creating a new SubtenantIdentityProvider Entity. + + :rtype: str + """ + + return self._name.value + + @name.setter + def name(self, value): + """Set value of `name` + + :param value: value to set + :type value: str + """ + + self._name.set(value) + + @property + def saml2_attributes(self): + """Represents SAML2 specific attributes in responses. + + :rtype: dict + """ + + return self._saml2_attributes.value + + @saml2_attributes.setter + def saml2_attributes(self, value): + """Set value of `saml2_attributes` + + :param value: value to set + :type value: dict + """ + + self._saml2_attributes.set(value) + + @property + def status(self): + """Status of the identity provider. + + :rtype: str + """ + + return self._status.value + + @status.setter + def status(self, value): + """Set value of `status` + + :param value: value to set + :type value: str + """ + + self._status.set(value) + + @property + def updated_at(self): + """Last update UTC time RFC3339. + + api example: '2018-02-14T15:24:14Z' + + :rtype: datetime + """ + + return self._updated_at.value + + def create(self, discovery=None, oidc_attributes=None): + """Create a new identity provider. + + `REST API Documentation `_. + + :param discovery: 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 + :type discovery: bool + + :param oidc_attributes: Represents OIDC specific attributes. + :type oidc_attributes: mbed_cloud.foundation.entities.OidcRequest + + :rtype: SubtenantIdentityProvider + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + if self._description.value_set: + body_params["description"] = self._description.to_api() + if self._name.value_set: + body_params["name"] = self._name.to_api() + # Method parameters are unconditionally sent even if set to None + body_params["oidc_attributes"] = fields.DictField(oidc_attributes).to_api() + if self._saml2_attributes.value_set: + body_params["saml2_attributes"] = self._saml2_attributes.to_api() + if self._status.value_set: + body_params["status"] = self._status.to_api() + + return self._client.call_api( + method="post", + path="/v3/accounts/{account_id}/identity-providers", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(),}, + body_params=body_params, + query_params={"discovery": fields.BooleanField(discovery).to_api(),}, + unpack=self, + ) + + def delete(self): + """Delete an identity provider by ID. + + `REST API Documentation `_. + + :rtype: SubtenantIdentityProvider + """ + + return self._client.call_api( + method="delete", + path="/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def delete_service_provider_certificate(self): + """Delete the service provider certificate. + + `REST API Documentation `_. + + :rtype: SubtenantIdentityProvider + """ + + return self._client.call_api( + method="post", + path="/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/delete-sp-certificate", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def generate_service_provider_certificate(self, algorithm=None, validity=None): + """Generate a new service provider certificate. + + `REST API Documentation `_. + + :param algorithm: The algorithm and its key size used for generating the certificate. + Defaults to RSA2048. + :type algorithm: str + + :param validity: Validity for the certificate in days. + :type validity: int + + :rtype: SubtenantIdentityProvider + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + # Method parameters are unconditionally sent even if set to None + body_params["algorithm"] = fields.StringField( + algorithm, enum=enums.SubtenantIdentityProviderAlgorithmEnum + ).to_api() + # Method parameters are unconditionally sent even if set to None + body_params["validity"] = fields.IntegerField(validity).to_api() + + return self._client.call_api( + method="post", + path="/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/generate-sp-certificate", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "identity_provider_id": self._id.to_api(),}, + body_params=body_params, + unpack=self, + ) + + def list(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get all identity providers. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(SubtenantIdentityProvider) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import SubtenantIdentityProvider + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=SubtenantIdentityProvider._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = SubtenantIdentityProvider._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=SubtenantIdentityProvider, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_list, + ) + + def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get all identity providers. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.SubtenantIdentityProviderOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/identity-providers", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(),}, + query_params=query_params, + unpack=False, + ) + + def read(self): + """Get an identity provider. + + `REST API Documentation `_. + + :rtype: SubtenantIdentityProvider + """ + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def refresh_tokens(self): + """Refreshes the OIDC signing keys. + + `REST API Documentation `_. + + :rtype: SubtenantIdentityProvider + """ + + return self._client.call_api( + method="post", + path="/v3/accounts/{account_id}/identity-providers/{identity_provider_id}/refresh-jwks", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "identity_provider_id": self._id.to_api(),}, + unpack=self, + ) + + def update(self, discovery=None, oidc_attributes=None): + """Update an existing identity provider. + + `REST API Documentation `_. + + :param discovery: 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 + :type discovery: bool + + :param oidc_attributes: Represents OIDC specific attributes. + :type oidc_attributes: mbed_cloud.foundation.entities.OidcRequest + + :rtype: SubtenantIdentityProvider + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + if self._description.value_set: + body_params["description"] = self._description.to_api() + if self._name.value_set: + body_params["name"] = self._name.to_api() + # Method parameters are unconditionally sent even if set to None + body_params["oidc_attributes"] = fields.DictField(oidc_attributes).to_api() + if self._saml2_attributes.value_set: + body_params["saml2_attributes"] = self._saml2_attributes.to_api() + if self._status.value_set: + body_params["status"] = self._status.to_api() + + return self._client.call_api( + method="put", + path="/v3/accounts/{account_id}/identity-providers/{identity_provider_id}", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "identity_provider_id": self._id.to_api(),}, + body_params=body_params, + query_params={"discovery": fields.BooleanField(discovery).to_api(),}, + unpack=self, + ) diff --git a/src/mbed_cloud/foundation/entities/accounts/subtenant_policy_group.py b/src/mbed_cloud/foundation/entities/accounts/subtenant_policy_group.py new file mode 100644 index 00000000..9211c409 --- /dev/null +++ b/src/mbed_cloud/foundation/entities/accounts/subtenant_policy_group.py @@ -0,0 +1,634 @@ +""" +.. warning:: + SubtenantPolicyGroup should not be imported directly from this module as the + organisation may change in the future, please use the :mod:`mbed_cloud.foundation` module to import entities. + +Foundation Entity: SubtenantPolicyGroup +======================================= + +Entities normally contain methods to create, read, update, delete and list resources. Other +actions may also be possible on the entity depending on the capabilities present in the API. +This entity has the following methods: + +- :meth:`SubtenantPolicyGroup.api_keys` +- :meth:`SubtenantPolicyGroup.create` +- :meth:`SubtenantPolicyGroup.delete` +- :meth:`SubtenantPolicyGroup.list` +- :meth:`SubtenantPolicyGroup.read` +- :meth:`SubtenantPolicyGroup.update` +- :meth:`SubtenantPolicyGroup.users` + +Entity Usage and Importing +-------------------------- + +The recommended way of working with Entities is via the SDK Interface which will return an instance of an Entity which +will share the same context as other Entities. There is more information in the :mod:`mbed_cloud.sdk.sdk` module. + +.. code-block:: python + + from mbed_cloud import SDK + pelion_dm_sdk = SDK() + subtenant_policy_groups = pelion_dm_sdk.foundation.subtenant_policy_group() + +How to import SubtenantPolicyGroup directly: + +.. code-block:: python + + from mbed_cloud.foundation import SubtenantPolicyGroup + +------------ +""" + +# Python 2 compatibility +from __future__ import unicode_literals +from builtins import str # noqa +from builtins import super + +from mbed_cloud.foundation.common.entity_base import Entity +from mbed_cloud.foundation.common import fields +from mbed_cloud.foundation import enums + + +class SubtenantPolicyGroup(Entity): + """Represents the `SubtenantPolicyGroup` entity in Pelion Device Management""" + + # List of fields that are serialised between the API and SDK + _api_fieldnames = ["account_id", "apikey_count", "created_at", "id", "name", "updated_at", "user_count"] + + # List of fields that are available for the user of the SDK + _sdk_fieldnames = _api_fieldnames + + # Renames to be performed by the SDK when receiving data {: } + _renames = {} + + # Renames to be performed by the SDK when sending data {: } + _renames_to_api = {} + + def __init__( + self, + _client=None, + account_id=None, + apikey_count=None, + created_at=None, + id=None, + name=None, + updated_at=None, + user_count=None, + ): + """Creates a local `SubtenantPolicyGroup` instance + + Parameters can be supplied on creation of the instance or given by + setting the properties on the instance after creation. + + Parameters marked as `required` must be set for one or more operations + on the entity. For details on when they are required please see the + documentation for the setter method. + + :param account_id: (Required) The ID of the account this group belongs to. + :type account_id: str + :param apikey_count: The number of API keys in this group. + :type apikey_count: int + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param id: (Required) The ID of the group. + :type id: str + :param name: (Required) The name of the group. + :type name: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + :param user_count: The number of users in this group. + :type user_count: int + """ + + super().__init__(_client=_client) + + # inline imports for avoiding circular references and bulk imports + + # fields + self._account_id = fields.StringField(value=account_id) + self._apikey_count = fields.IntegerField(value=apikey_count) + self._created_at = fields.DateTimeField(value=created_at) + self._id = fields.StringField(value=id) + self._name = fields.StringField(value=name) + self._updated_at = fields.DateTimeField(value=updated_at) + self._user_count = fields.IntegerField(value=user_count) + + @property + def account_id(self): + """The ID of the account this group belongs to. + + This field must be set when creating a new SubtenantPolicyGroup Entity. + + api example: '01619571e2e90242ac12000600000000' + + :rtype: str + """ + + return self._account_id.value + + @account_id.setter + def account_id(self, value): + """Set value of `account_id` + + :param value: value to set + :type value: str + """ + + self._account_id.set(value) + + @property + def apikey_count(self): + """The number of API keys in this group. + + :rtype: int + """ + + return self._apikey_count.value + + @property + def created_at(self): + """Creation UTC time RFC3339. + + api example: '2018-02-13T09:35:20Z' + + :rtype: datetime + """ + + return self._created_at.value + + @property + def id(self): + """The ID of the group. + + This field must be set when updating or deleting an existing SubtenantPolicyGroup Entity. + + api example: '01619571dec00242ac12000600000000' + + :rtype: str + """ + + return self._id.value + + @id.setter + def id(self, value): + """Set value of `id` + + :param value: value to set + :type value: str + """ + + self._id.set(value) + + @property + def name(self): + """The name of the group. + + This field must be set when creating a new SubtenantPolicyGroup Entity. + + api example: 'Administrators' + + :rtype: str + """ + + return self._name.value + + @name.setter + def name(self, value): + """Set value of `name` + + :param value: value to set + :type value: str + """ + + self._name.set(value) + + @property + def updated_at(self): + """Last update UTC time RFC3339. + + api example: '2018-02-14T15:24:14Z' + + :rtype: datetime + """ + + return self._updated_at.value + + @property + def user_count(self): + """The number of users in this group. + + api example: 1 + + :rtype: int + """ + + return self._user_count.value + + def api_keys(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get API keys in a group. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(SubtenantApiKey) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import SubtenantApiKey + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=SubtenantApiKey._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = SubtenantApiKey._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=SubtenantApiKey, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_api_keys, + ) + + def create(self, members=None): + """Create a new group. + + `REST API Documentation `_. + + :param members: Represents arrays of user and API key IDs. + :type members: dict + + :rtype: SubtenantPolicyGroup + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + # Method parameters are unconditionally sent even if set to None + body_params["members"] = fields.DictField(members).to_api() + if self._name.value_set: + body_params["name"] = self._name.to_api() + + return self._client.call_api( + method="post", + path="/v3/accounts/{account_id}/policy-groups", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(),}, + body_params=body_params, + unpack=self, + ) + + def delete(self): + """Delete a group. + + `REST API Documentation `_. + + :rtype: SubtenantPolicyGroup + """ + + return self._client.call_api( + method="delete", + path="/v3/accounts/{account_id}/policy-groups/{group_id}", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "group_id": self._id.to_api(),}, + unpack=self, + ) + + def list(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get policy groups. + + `REST API Documentation `_. + + **API Filters** + + The following filters are supported by the API when listing SubtenantPolicyGroup entities: + + +-------+------+------+------+------+------+------+------+ + | Field | eq | neq | gte | lte | in | nin | like | + +=======+======+======+======+======+======+======+======+ + | name | Y | | | | | | | + +-------+------+------+------+------+------+------+------+ + + **Example Usage** + + .. code-block:: python + + from mbed_cloud.foundation import SubtenantPolicyGroup + from mbed_cloud import ApiFilter + + api_filter = ApiFilter() + api_filter.add_filter("name", "eq", ) + for subtenant_policy_group in SubtenantPolicyGroup().list(filter=api_filter): + print(subtenant_policy_group.name) + + :param filter: An optional filter to apply when listing entities, please see the + above **API Filters** table for supported filters. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(SubtenantPolicyGroup) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import SubtenantPolicyGroup + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=SubtenantPolicyGroup._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = SubtenantPolicyGroup._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=SubtenantPolicyGroup, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_list, + ) + + def _paginate_api_keys(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get API keys in a group. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.SubtenantPolicyGroupOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/policy-groups/{group_id}/api-keys", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "group_id": self._id.to_api(),}, + query_params=query_params, + unpack=False, + ) + + def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get policy groups. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.SubtenantPolicyGroupOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/policy-groups", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(),}, + query_params=query_params, + unpack=False, + ) + + def _paginate_users(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get users in a policy group. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.SubtenantPolicyGroupOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/policy-groups/{group_id}/users", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "group_id": self._id.to_api(),}, + query_params=query_params, + unpack=False, + ) + + def read(self): + """Get policy group. + + `REST API Documentation `_. + + :rtype: SubtenantPolicyGroup + """ + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/policy-groups/{group_id}", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "group_id": self._id.to_api(),}, + unpack=self, + ) + + def update(self): + """Update the group name. + + `REST API Documentation `_. + + :rtype: SubtenantPolicyGroup + """ + + # Conditionally setup the message body, fields which have not been set will not be sent to the API. + # This avoids null fields being rejected and allows the default value to be used. + body_params = {} + if self._name.value_set: + body_params["name"] = self._name.to_api() + + return self._client.call_api( + method="put", + path="/v3/accounts/{account_id}/policy-groups/{group_id}", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "group_id": self._id.to_api(),}, + body_params=body_params, + unpack=self, + ) + + def users(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get users in a policy group. + + `REST API Documentation `_. + + **API Filters** + + The following filters are supported by the API when listing SubtenantPolicyGroup entities: + + +--------+------+------+------+------+------+------+------+ + | Field | eq | neq | gte | lte | in | nin | like | + +========+======+======+======+======+======+======+======+ + | status | Y | | | | Y | Y | | + +--------+------+------+------+------+------+------+------+ + + **Example Usage** + + .. code-block:: python + + from mbed_cloud.foundation import SubtenantPolicyGroup + from mbed_cloud import ApiFilter + + api_filter = ApiFilter() + api_filter.add_filter("status", "eq", ) + for user in SubtenantPolicyGroup().users(filter=api_filter): + print(user.status) + + :param filter: An optional filter to apply when listing entities, please see the + above **API Filters** table for supported filters. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(SubtenantUser) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import SubtenantUser + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=SubtenantUser._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = SubtenantUser._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=SubtenantUser, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_users, + ) diff --git a/src/mbed_cloud/foundation/entities/accounts/subtenant_user.py b/src/mbed_cloud/foundation/entities/accounts/subtenant_user.py index 2aad2320..909069d2 100644 --- a/src/mbed_cloud/foundation/entities/accounts/subtenant_user.py +++ b/src/mbed_cloud/foundation/entities/accounts/subtenant_user.py @@ -12,6 +12,7 @@ - :meth:`SubtenantUser.create` - :meth:`SubtenantUser.delete` +- :meth:`SubtenantUser.policy_groups` - :meth:`SubtenantUser.read` - :meth:`SubtenantUser.update` - :meth:`SubtenantUser.validate_email` @@ -61,6 +62,7 @@ class SubtenantUser(Entity): "email", "email_verified", "full_name", + "groups", "id", "is_gtc_accepted", "is_marketing_accepted", @@ -98,6 +100,7 @@ def __init__( email=None, email_verified=None, full_name=None, + groups=None, id=None, is_gtc_accepted=None, is_marketing_accepted=None, @@ -141,6 +144,8 @@ def __init__( :type email_verified: bool :param full_name: The full name of the user. :type full_name: str + :param groups: A list of IDs of the groups this user belongs to. + :type groups: list :param id: (Required) The ID of the user. :type id: str :param is_gtc_accepted: A flag indicating that the user has accepted General Terms and @@ -202,6 +207,7 @@ def __init__( self._email = fields.StringField(value=email) self._email_verified = fields.BooleanField(value=email_verified) self._full_name = fields.StringField(value=full_name) + self._groups = fields.ListField(value=groups) self._id = fields.StringField(value=id) self._is_gtc_accepted = fields.BooleanField(value=is_gtc_accepted) self._is_marketing_accepted = fields.BooleanField(value=is_marketing_accepted) @@ -356,6 +362,25 @@ def full_name(self, value): self._full_name.set(value) + @property + def groups(self): + """A list of IDs of the groups this user belongs to. + + :rtype: list + """ + + return self._groups.value + + @groups.setter + def groups(self, value): + """Set value of `groups` + + :param value: value to set + :type value: list + """ + + self._groups.set(value) + @property def id(self): """The ID of the user. @@ -625,6 +650,8 @@ def create(self, action="create"): body_params["email"] = self._email.to_api() if self._full_name.value_set: body_params["full_name"] = self._full_name.to_api() + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._is_gtc_accepted.value_set: body_params["is_gtc_accepted"] = self._is_gtc_accepted.to_api() if self._is_marketing_accepted.value_set: @@ -642,8 +669,8 @@ def create(self, action="create"): method="post", path="/v3/accounts/{account_id}/users", content_type="application/json", - path_params={"account_id": self._account_id.to_api()}, - query_params={"action": fields.StringField(action).to_api()}, + path_params={"account_id": self._account_id.to_api(),}, + query_params={"action": fields.StringField(action).to_api(),}, body_params=body_params, unpack=self, ) @@ -660,10 +687,104 @@ def delete(self): method="delete", path="/v3/accounts/{account_id}/users/{user_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api(),}, unpack=self, ) + def _paginate_policy_groups(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get policy groups for a user. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.SubtenantUserOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", + path="/v3/accounts/{account_id}/users/{user_id}/groups", + content_type="application/json", + path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api(),}, + query_params=query_params, + unpack=False, + ) + + def policy_groups(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get policy groups for a user. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(SubtenantPolicyGroup) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import SubtenantPolicyGroup + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=SubtenantPolicyGroup._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = SubtenantPolicyGroup._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=SubtenantPolicyGroup, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_policy_groups, + ) + def read(self): """Details of the user. @@ -676,7 +797,7 @@ def read(self): method="get", path="/v3/accounts/{account_id}/users/{user_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api(),}, unpack=self, ) @@ -695,6 +816,8 @@ def update(self): body_params["address"] = self._address.to_api() if self._full_name.value_set: body_params["full_name"] = self._full_name.to_api() + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._is_gtc_accepted.value_set: body_params["is_gtc_accepted"] = self._is_gtc_accepted.to_api() if self._is_marketing_accepted.value_set: @@ -712,7 +835,7 @@ def update(self): method="put", path="/v3/accounts/{account_id}/users/{user_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api(),}, body_params=body_params, unpack=self, ) @@ -729,6 +852,6 @@ def validate_email(self): method="post", path="/v3/accounts/{account_id}/users/{user_id}/validate-email", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "user_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/accounts/subtenant_user_invitation.py b/src/mbed_cloud/foundation/entities/accounts/subtenant_user_invitation.py index e86d42f1..6d574cc0 100644 --- a/src/mbed_cloud/foundation/entities/accounts/subtenant_user_invitation.py +++ b/src/mbed_cloud/foundation/entities/accounts/subtenant_user_invitation.py @@ -54,6 +54,7 @@ class SubtenantUserInvitation(Entity): "created_at", "email", "expiration", + "groups", "id", "login_profiles", "updated_at", @@ -76,6 +77,7 @@ def __init__( created_at=None, email=None, expiration=None, + groups=None, id=None, login_profiles=None, updated_at=None, @@ -98,6 +100,8 @@ def __init__( :type email: str :param expiration: Invitation expiration as UTC time RFC3339. :type expiration: datetime + :param groups: A list of IDs of the groups the user is invited to. + :type groups: list :param id: (Required) The ID of the invitation. :type id: str :param login_profiles: A list of login profiles for the user. Specified as the identity @@ -120,6 +124,7 @@ def __init__( self._created_at = fields.DateTimeField(value=created_at) self._email = fields.StringField(value=email) self._expiration = fields.DateTimeField(value=expiration) + self._groups = fields.ListField(value=groups) self._id = fields.StringField(value=id) self._login_profiles = fields.ListField(value=login_profiles, entity=LoginProfile) self._updated_at = fields.DateTimeField(value=updated_at) @@ -193,6 +198,25 @@ def expiration(self): return self._expiration.value + @property + def groups(self): + """A list of IDs of the groups the user is invited to. + + :rtype: list + """ + + return self._groups.value + + @groups.setter + def groups(self, value): + """Set value of `groups` + + :param value: value to set + :type value: list + """ + + self._groups.set(value) + @property def id(self): """The ID of the invitation. @@ -274,6 +298,8 @@ def create(self, valid_for_days=30): body_params = {} if self._email.value_set: body_params["email"] = self._email.to_api() + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._login_profiles.value_set: body_params["login_profiles"] = self._login_profiles.to_api() # Method parameters are unconditionally sent even if set to None @@ -283,7 +309,7 @@ def create(self, valid_for_days=30): method="post", path="/v3/accounts/{account_id}/user-invitations", content_type="application/json", - path_params={"account_id": self._account_id.to_api()}, + path_params={"account_id": self._account_id.to_api(),}, body_params=body_params, unpack=self, ) @@ -300,7 +326,7 @@ def delete(self): method="delete", path="/v3/accounts/{account_id}/user-invitations/{invitation_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "invitation_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "invitation_id": self._id.to_api(),}, unpack=self, ) @@ -316,6 +342,6 @@ def read(self): method="get", path="/v3/accounts/{account_id}/user-invitations/{invitation_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "invitation_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "invitation_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/accounts/user.py b/src/mbed_cloud/foundation/entities/accounts/user.py index de4d615d..47995401 100644 --- a/src/mbed_cloud/foundation/entities/accounts/user.py +++ b/src/mbed_cloud/foundation/entities/accounts/user.py @@ -13,6 +13,7 @@ - :meth:`User.create` - :meth:`User.delete` - :meth:`User.list` +- :meth:`User.policy_groups` - :meth:`User.read` - :meth:`User.update` @@ -61,6 +62,7 @@ class User(Entity): "email", "email_verified", "full_name", + "groups", "id", "is_gtc_accepted", "is_marketing_accepted", @@ -98,6 +100,7 @@ def __init__( email=None, email_verified=None, full_name=None, + groups=None, id=None, is_gtc_accepted=None, is_marketing_accepted=None, @@ -141,6 +144,8 @@ def __init__( :type email_verified: bool :param full_name: The full name of the user. :type full_name: str + :param groups: A list of IDs of the groups this user belongs to. + :type groups: list :param id: (Required) The ID of the user. :type id: str :param is_gtc_accepted: A flag indicating that the user has accepted General Terms and @@ -202,6 +207,7 @@ def __init__( self._email = fields.StringField(value=email) self._email_verified = fields.BooleanField(value=email_verified) self._full_name = fields.StringField(value=full_name) + self._groups = fields.ListField(value=groups) self._id = fields.StringField(value=id) self._is_gtc_accepted = fields.BooleanField(value=is_gtc_accepted) self._is_marketing_accepted = fields.BooleanField(value=is_marketing_accepted) @@ -344,6 +350,25 @@ def full_name(self, value): self._full_name.set(value) + @property + def groups(self): + """A list of IDs of the groups this user belongs to. + + :rtype: list + """ + + return self._groups.value + + @groups.setter + def groups(self, value): + """Set value of `groups` + + :param value: value to set + :type value: list + """ + + self._groups.set(value) + @property def id(self): """The ID of the user. @@ -613,6 +638,8 @@ def create(self, action="create"): body_params["email"] = self._email.to_api() if self._full_name.value_set: body_params["full_name"] = self._full_name.to_api() + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._is_gtc_accepted.value_set: body_params["is_gtc_accepted"] = self._is_gtc_accepted.to_api() if self._is_marketing_accepted.value_set: @@ -630,7 +657,7 @@ def create(self, action="create"): method="post", path="/v3/users", content_type="application/json", - query_params={"action": fields.StringField(action).to_api()}, + query_params={"action": fields.StringField(action).to_api(),}, body_params=body_params, unpack=self, ) @@ -647,12 +674,12 @@ def delete(self): method="delete", path="/v3/users/{user_id}", content_type="application/json", - path_params={"user_id": self._id.to_api()}, + path_params={"user_id": self._id.to_api(),}, unpack=self, ) def list(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): - """Get the details of all users. + """Get users. `REST API Documentation `_. @@ -732,7 +759,42 @@ def list(self, filter=None, order="ASC", max_results=None, page_size=50, include ) def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): - """Get the details of all users. + """Get users. + + :param after: The entity ID to fetch after the given one. + :type after: str + + :param filter: Optional API filter for listing resources. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param limit: The number of results to return (2-1000). Default 50. + :type limit: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :rtype: mbed_cloud.pagination.PaginatedResponse + """ + + # Filter query parameters + query_params = filter.to_api() if filter else {} + # Add in other query parameters + query_params["after"] = fields.StringField(after).to_api() + query_params["order"] = fields.StringField(order, enum=enums.UserOrderEnum).to_api() + query_params["limit"] = fields.IntegerField(limit).to_api() + query_params["include"] = fields.StringField(include).to_api() + + return self._client.call_api( + method="get", path="/v3/users", content_type="application/json", query_params=query_params, unpack=False, + ) + + def _paginate_policy_groups(self, after=None, filter=None, order="ASC", limit=50, include=None): + """Get policy groups for a user. :param after: The entity ID to fetch after the given one. :type after: str @@ -763,7 +825,66 @@ def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include query_params["include"] = fields.StringField(include).to_api() return self._client.call_api( - method="get", path="/v3/users", content_type="application/json", query_params=query_params, unpack=False + method="get", + path="/v3/users/{user_id}/groups", + content_type="application/json", + query_params=query_params, + path_params={"user_id": self._id.to_api(),}, + unpack=False, + ) + + def policy_groups(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): + """Get policy groups for a user. + + `REST API Documentation `_. + + :param filter: Filtering when listing entities is not supported by the API for this + entity. + :type filter: mbed_cloud.client.api_filter.ApiFilter + + :param order: Record order based on creation time. Acceptable values: ASC, DESC. + Default: ASC. + :type order: str + + :param max_results: Total maximum number of results to retrieve + :type max_results: int + + :param page_size: The number of results to return (2-1000). Default 50. + :type page_size: int + + :param include: Comma-separated additional data to return. Currently supported: + total_count. + :type include: str + + :return: An iterator object which yields instances of an entity. + :rtype: mbed_cloud.pagination.PaginatedResponse(PolicyGroup) + """ + + from mbed_cloud.foundation._custom_methods import paginate + from mbed_cloud.foundation import PolicyGroup + from mbed_cloud import ApiFilter + + # Be permissive and accept an instance of a dictionary as this was how the Legacy interface worked. + if isinstance(filter, dict): + filter = ApiFilter(filter_definition=filter, field_renames=PolicyGroup._renames_to_api) + # The preferred method is an ApiFilter instance as this should be easier to use. + elif isinstance(filter, ApiFilter): + # If filter renames have not be defined then configure the ApiFilter so that any renames + # performed by the SDK are reversed when the query parameters are created. + if filter.field_renames is None: + filter.field_renames = PolicyGroup._renames_to_api + elif filter is not None: + raise TypeError("The 'filter' parameter may be either 'dict' or 'ApiFilter'.") + + return paginate( + self=self, + foreign_key=PolicyGroup, + filter=filter, + order=order, + max_results=max_results, + page_size=page_size, + include=include, + wraps=self._paginate_policy_groups, ) def read(self): @@ -778,7 +899,7 @@ def read(self): method="get", path="/v3/users/{user_id}", content_type="application/json", - path_params={"user_id": self._id.to_api()}, + path_params={"user_id": self._id.to_api(),}, unpack=self, ) @@ -797,6 +918,8 @@ def update(self): body_params["address"] = self._address.to_api() if self._full_name.value_set: body_params["full_name"] = self._full_name.to_api() + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._is_gtc_accepted.value_set: body_params["is_gtc_accepted"] = self._is_gtc_accepted.to_api() if self._is_marketing_accepted.value_set: @@ -815,6 +938,6 @@ def update(self): path="/v3/users/{user_id}", content_type="application/json", body_params=body_params, - path_params={"user_id": self._id.to_api()}, + path_params={"user_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/accounts/user_invitation.py b/src/mbed_cloud/foundation/entities/accounts/user_invitation.py index 9462a459..67b1ba2b 100644 --- a/src/mbed_cloud/foundation/entities/accounts/user_invitation.py +++ b/src/mbed_cloud/foundation/entities/accounts/user_invitation.py @@ -55,6 +55,7 @@ class UserInvitation(Entity): "created_at", "email", "expiration", + "groups", "id", "login_profiles", "updated_at", @@ -77,6 +78,7 @@ def __init__( created_at=None, email=None, expiration=None, + groups=None, id=None, login_profiles=None, updated_at=None, @@ -99,6 +101,8 @@ def __init__( :type email: str :param expiration: Invitation expiration as UTC time RFC3339. :type expiration: datetime + :param groups: A list of IDs of the groups the user is invited to. + :type groups: list :param id: (Required) The ID of the invitation. :type id: str :param login_profiles: A list of login profiles for the user. Specified as the identity @@ -121,6 +125,7 @@ def __init__( self._created_at = fields.DateTimeField(value=created_at) self._email = fields.StringField(value=email) self._expiration = fields.DateTimeField(value=expiration) + self._groups = fields.ListField(value=groups) self._id = fields.StringField(value=id) self._login_profiles = fields.ListField(value=login_profiles, entity=LoginProfile) self._updated_at = fields.DateTimeField(value=updated_at) @@ -182,6 +187,25 @@ def expiration(self): return self._expiration.value + @property + def groups(self): + """A list of IDs of the groups the user is invited to. + + :rtype: list + """ + + return self._groups.value + + @groups.setter + def groups(self, value): + """Set value of `groups` + + :param value: value to set + :type value: list + """ + + self._groups.set(value) + @property def id(self): """The ID of the invitation. @@ -263,6 +287,8 @@ def create(self, valid_for_days=30): body_params = {} if self._email.value_set: body_params["email"] = self._email.to_api() + if self._groups.value_set: + body_params["groups"] = self._groups.to_api() if self._login_profiles.value_set: body_params["login_profiles"] = self._login_profiles.to_api() # Method parameters are unconditionally sent even if set to None @@ -288,12 +314,12 @@ def delete(self): method="delete", path="/v3/user-invitations/{invitation_id}", content_type="application/json", - path_params={"invitation_id": self._id.to_api()}, + path_params={"invitation_id": self._id.to_api(),}, unpack=self, ) def list(self, filter=None, order="ASC", max_results=None, page_size=50, include=None): - """Get the details of all user invitations. + """Get user invitations. `REST API Documentation `_. @@ -368,7 +394,7 @@ def list(self, filter=None, order="ASC", max_results=None, page_size=50, include ) def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include=None): - """Get the details of all user invitations. + """Get user invitations. :param after: The entity ID to fetch after the given one. :type after: str @@ -417,6 +443,6 @@ def read(self): method="get", path="/v3/user-invitations/{invitation_id}", content_type="application/json", - path_params={"invitation_id": self._id.to_api()}, + path_params={"invitation_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/branding/dark_theme_color.py b/src/mbed_cloud/foundation/entities/branding/dark_theme_color.py index d42aaba9..0b2f095f 100644 --- a/src/mbed_cloud/foundation/entities/branding/dark_theme_color.py +++ b/src/mbed_cloud/foundation/entities/branding/dark_theme_color.py @@ -61,7 +61,9 @@ class DarkThemeColor(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, color=None, reference=None, updated_at=None): + def __init__( + self, _client=None, color=None, reference=None, updated_at=None, + ): """Creates a local `DarkThemeColor` instance Parameters can be supplied on creation of the instance or given by @@ -151,7 +153,7 @@ def delete(self): method="delete", path="/v3/branding-colors/dark/{reference}", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -234,7 +236,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ # Add in other query parameters return self._client.call_api( - method="get", path="/v3/branding-colors/dark", content_type="application/json", unpack=False + method="get", path="/v3/branding-colors/dark", content_type="application/json", unpack=False, ) def read(self): @@ -249,7 +251,7 @@ def read(self): method="get", path="/v3/branding-colors/dark/{reference}", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -274,6 +276,6 @@ def update(self): path="/v3/branding-colors/dark/{reference}", content_type="application/json", body_params=body_params, - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/branding/dark_theme_image.py b/src/mbed_cloud/foundation/entities/branding/dark_theme_image.py index 70b8d6b6..4e587816 100644 --- a/src/mbed_cloud/foundation/entities/branding/dark_theme_image.py +++ b/src/mbed_cloud/foundation/entities/branding/dark_theme_image.py @@ -62,7 +62,9 @@ class DarkThemeImage(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, reference=None, static_uri=None, updated_at=None): + def __init__( + self, _client=None, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `DarkThemeImage` instance Parameters can be supplied on creation of the instance or given by @@ -142,7 +144,7 @@ def delete(self): method="post", path="/v3/branding-images/dark/{reference}/clear", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -225,7 +227,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ # Add in other query parameters return self._client.call_api( - method="get", path="/v3/branding-images/dark", content_type="application/json", unpack=False + method="get", path="/v3/branding-images/dark", content_type="application/json", unpack=False, ) def read(self): @@ -240,7 +242,7 @@ def read(self): method="get", path="/v3/branding-images/dark/{reference}", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -268,8 +270,8 @@ def update(self, image): return self._client.call_api( method="post", path="/v3/branding-images/dark/{reference}/upload-multipart", - stream_params={"image": ("image.png", image, "image/png")}, - path_params={"reference": self._reference.to_api()}, + stream_params={"image": ("image.png", image, "image/png"),}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) finally: diff --git a/src/mbed_cloud/foundation/entities/branding/light_theme_color.py b/src/mbed_cloud/foundation/entities/branding/light_theme_color.py index 102bf451..0d3c6e92 100644 --- a/src/mbed_cloud/foundation/entities/branding/light_theme_color.py +++ b/src/mbed_cloud/foundation/entities/branding/light_theme_color.py @@ -61,7 +61,9 @@ class LightThemeColor(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, color=None, reference=None, updated_at=None): + def __init__( + self, _client=None, color=None, reference=None, updated_at=None, + ): """Creates a local `LightThemeColor` instance Parameters can be supplied on creation of the instance or given by @@ -151,7 +153,7 @@ def delete(self): method="delete", path="/v3/branding-colors/light/{reference}", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -234,7 +236,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ # Add in other query parameters return self._client.call_api( - method="get", path="/v3/branding-colors/light", content_type="application/json", unpack=False + method="get", path="/v3/branding-colors/light", content_type="application/json", unpack=False, ) def read(self): @@ -249,7 +251,7 @@ def read(self): method="get", path="/v3/branding-colors/light/{reference}", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -274,6 +276,6 @@ def update(self): path="/v3/branding-colors/light/{reference}", content_type="application/json", body_params=body_params, - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/branding/light_theme_image.py b/src/mbed_cloud/foundation/entities/branding/light_theme_image.py index c6ca5259..92c66ce0 100644 --- a/src/mbed_cloud/foundation/entities/branding/light_theme_image.py +++ b/src/mbed_cloud/foundation/entities/branding/light_theme_image.py @@ -62,7 +62,9 @@ class LightThemeImage(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, reference=None, static_uri=None, updated_at=None): + def __init__( + self, _client=None, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `LightThemeImage` instance Parameters can be supplied on creation of the instance or given by @@ -142,7 +144,7 @@ def delete(self): method="post", path="/v3/branding-images/light/{reference}/clear", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -225,7 +227,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ # Add in other query parameters return self._client.call_api( - method="get", path="/v3/branding-images/light", content_type="application/json", unpack=False + method="get", path="/v3/branding-images/light", content_type="application/json", unpack=False, ) def read(self): @@ -240,7 +242,7 @@ def read(self): method="get", path="/v3/branding-images/light/{reference}", content_type="application/json", - path_params={"reference": self._reference.to_api()}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) @@ -268,8 +270,8 @@ def update(self, image): return self._client.call_api( method="post", path="/v3/branding-images/light/{reference}/upload-multipart", - stream_params={"image": ("image.png", image, "image/png")}, - path_params={"reference": self._reference.to_api()}, + stream_params={"image": ("image.png", image, "image/png"),}, + path_params={"reference": self._reference.to_api(),}, unpack=self, ) finally: diff --git a/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_color.py b/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_color.py index cd173b9d..997942c7 100644 --- a/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_color.py +++ b/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_color.py @@ -60,7 +60,9 @@ class SubtenantDarkThemeColor(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, color=None, reference=None, updated_at=None): + def __init__( + self, _client=None, color=None, reference=None, updated_at=None, + ): """Creates a local `SubtenantDarkThemeColor` instance Parameters can be supplied on creation of the instance or given by @@ -143,7 +145,7 @@ def delete(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: @@ -153,7 +155,7 @@ def delete(self, account_id): method="delete", path="/v3/accounts/{account_id}/branding-colors/dark/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -162,7 +164,7 @@ def read(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantDarkThemeColor @@ -172,7 +174,7 @@ def read(self, account_id): method="get", path="/v3/accounts/{account_id}/branding-colors/dark/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -181,7 +183,7 @@ def update(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantDarkThemeColor @@ -199,7 +201,7 @@ def update(self, account_id): method="put", path="/v3/accounts/{account_id}/branding-colors/dark/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, body_params=body_params, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_image.py b/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_image.py index 52c94b8f..b1bb99e2 100644 --- a/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_image.py +++ b/src/mbed_cloud/foundation/entities/branding/subtenant_dark_theme_image.py @@ -61,7 +61,9 @@ class SubtenantDarkThemeImage(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, reference=None, static_uri=None, updated_at=None): + def __init__( + self, _client=None, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `SubtenantDarkThemeImage` instance Parameters can be supplied on creation of the instance or given by @@ -134,7 +136,7 @@ def delete(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantDarkThemeImage @@ -144,7 +146,7 @@ def delete(self, account_id): method="post", path="/v3/accounts/{account_id}/branding-images/dark/{reference}/clear", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -153,7 +155,7 @@ def read(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantDarkThemeImage @@ -163,7 +165,7 @@ def read(self, account_id): method="get", path="/v3/accounts/{account_id}/branding-images/dark/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -172,7 +174,7 @@ def update(self, account_id, image): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :param image: The image in PNG or JPEG format as multipart form data. Files can be @@ -198,7 +200,7 @@ def update(self, account_id, image): "account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(), }, - stream_params={"image": ("image.png", image, "image/png")}, + stream_params={"image": ("image.png", image, "image/png"),}, unpack=self, ) finally: diff --git a/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_color.py b/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_color.py index bc2e9489..90f540aa 100644 --- a/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_color.py +++ b/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_color.py @@ -60,7 +60,9 @@ class SubtenantLightThemeColor(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, color=None, reference=None, updated_at=None): + def __init__( + self, _client=None, color=None, reference=None, updated_at=None, + ): """Creates a local `SubtenantLightThemeColor` instance Parameters can be supplied on creation of the instance or given by @@ -143,7 +145,7 @@ def delete(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: @@ -153,7 +155,7 @@ def delete(self, account_id): method="delete", path="/v3/accounts/{account_id}/branding-colors/light/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -162,7 +164,7 @@ def read(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantLightThemeColor @@ -172,7 +174,7 @@ def read(self, account_id): method="get", path="/v3/accounts/{account_id}/branding-colors/light/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -181,7 +183,7 @@ def update(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantLightThemeColor @@ -199,7 +201,7 @@ def update(self, account_id): method="put", path="/v3/accounts/{account_id}/branding-colors/light/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, body_params=body_params, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_image.py b/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_image.py index 153f70ca..56fea83e 100644 --- a/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_image.py +++ b/src/mbed_cloud/foundation/entities/branding/subtenant_light_theme_image.py @@ -61,7 +61,9 @@ class SubtenantLightThemeImage(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, reference=None, static_uri=None, updated_at=None): + def __init__( + self, _client=None, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `SubtenantLightThemeImage` instance Parameters can be supplied on creation of the instance or given by @@ -134,7 +136,7 @@ def delete(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantLightThemeImage @@ -144,7 +146,7 @@ def delete(self, account_id): method="post", path="/v3/accounts/{account_id}/branding-images/light/{reference}/clear", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -153,7 +155,7 @@ def read(self, account_id): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :rtype: SubtenantLightThemeImage @@ -163,7 +165,7 @@ def read(self, account_id): method="get", path="/v3/accounts/{account_id}/branding-images/light/{reference}", content_type="application/json", - path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api()}, + path_params={"account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(),}, unpack=self, ) @@ -172,7 +174,7 @@ def update(self, account_id, image): `REST API Documentation `_. - :param account_id: Account ID. + :param account_id: The ID of the account. :type account_id: str :param image: The image in PNG or JPEG format as multipart form data. Files can be @@ -198,7 +200,7 @@ def update(self, account_id, image): "account_id": fields.StringField(account_id).to_api(), "reference": self._reference.to_api(), }, - stream_params={"image": ("image.png", image, "image/png")}, + stream_params={"image": ("image.png", image, "image/png"),}, unpack=self, ) finally: diff --git a/src/mbed_cloud/foundation/entities/device_update/campaign_device_metadata.py b/src/mbed_cloud/foundation/entities/device_update/campaign_device_metadata.py index dd2b637e..c1b89ae4 100644 --- a/src/mbed_cloud/foundation/entities/device_update/campaign_device_metadata.py +++ b/src/mbed_cloud/foundation/entities/device_update/campaign_device_metadata.py @@ -64,10 +64,14 @@ class CampaignDeviceMetadata(Entity): _sdk_fieldnames = _api_fieldnames # Renames to be performed by the SDK when receiving data {: } - _renames = {"campaign": "campaign_id"} + _renames = { + "campaign": "campaign_id", + } # Renames to be performed by the SDK when sending data {: } - _renames_to_api = {"campaign_id": "campaign"} + _renames_to_api = { + "campaign_id": "campaign", + } def __init__( self, @@ -92,25 +96,25 @@ def __init__( on the entity. For details on when they are required please see the documentation for the setter method. - :param campaign_id: (Required) The device's campaign ID + :param campaign_id: (Required) The device's campaign ID. :type campaign_id: str - :param created_at: The time the campaign was created + :param created_at: The time the entity was created. :type created_at: datetime - :param deployment_state: The state of the update campaign on the device + :param deployment_state: The state of the update campaign on the device. :type deployment_state: str - :param description: Description + :param description: Description. :type description: str - :param device_id: The device ID + :param device_id: The device ID. :type device_id: str - :param id: (Required) The metadata record ID + :param id: (Required) The metadata record ID. :type id: str - :param mechanism: How the firmware is delivered (connector or direct) + :param mechanism: How the firmware is delivered (connector or direct). :type mechanism: str - :param mechanism_url: The Device Management Connect URL + :param mechanism_url: The Device Management Connect URL. :type mechanism_url: str - :param name: The record name + :param name: The record name. :type name: str - :param updated_at: The record was modified in the database format: date-time + :param updated_at: The time the entity was updated. :type updated_at: datetime """ @@ -134,7 +138,7 @@ def __init__( @property def campaign_id(self): - """The device's campaign ID + """The device's campaign ID. This field must be set when creating a new CampaignDeviceMetadata Entity. @@ -157,7 +161,7 @@ def campaign_id(self, value): @property def created_at(self): - """The time the campaign was created + """The time the entity was created. api example: '2017-05-22T12:37:55.576563Z' @@ -168,7 +172,7 @@ def created_at(self): @property def deployment_state(self): - """The state of the update campaign on the device + """The state of the update campaign on the device. :rtype: str """ @@ -177,7 +181,9 @@ def deployment_state(self): @property def description(self): - """Description + """Description. + + api example: 'a description' :rtype: str """ @@ -186,7 +192,7 @@ def description(self): @property def device_id(self): - """The device ID + """The device ID. api example: '015c2fec9bba0000000000010010036f' @@ -197,7 +203,7 @@ def device_id(self): @property def id(self): - """The metadata record ID + """The metadata record ID. This field must be set when updating or deleting an existing CampaignDeviceMetadata Entity. @@ -220,7 +226,7 @@ def id(self, value): @property def mechanism(self): - """How the firmware is delivered (connector or direct) + """How the firmware is delivered (connector or direct). api example: 'connector' @@ -231,7 +237,7 @@ def mechanism(self): @property def mechanism_url(self): - """The Device Management Connect URL + """The Device Management Connect URL. :rtype: str """ @@ -240,9 +246,7 @@ def mechanism_url(self): @property def name(self): - """The record name - - api example: 'default_object_name' + """The record name. :rtype: str """ @@ -251,9 +255,9 @@ def name(self): @property def updated_at(self): - """The record was modified in the database format: date-time + """The time the entity was updated. - api example: '2017-05-22T12:37:58.776736Z' + api example: '2017-05-22T12:37:55.576563Z' :rtype: datetime """ @@ -263,15 +267,15 @@ def updated_at(self): def read(self): """Get a campaign device metadata - `REST API Documentation `_. + `REST API Documentation `_. :rtype: CampaignDeviceMetadata """ return self._client.call_api( method="get", - path="/v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}/", + path="/v3/update-campaigns/{campaign_id}/campaign-device-metadata/{campaign_device_metadata_id}", content_type="application/json", - path_params={"campaign_id": self._campaign_id.to_api(), "campaign_device_metadata_id": self._id.to_api()}, + path_params={"campaign_id": self._campaign_id.to_api(), "campaign_device_metadata_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/device_update/campaign_statistics.py b/src/mbed_cloud/foundation/entities/device_update/campaign_statistics.py index 9f840494..9f32ebfd 100644 --- a/src/mbed_cloud/foundation/entities/device_update/campaign_statistics.py +++ b/src/mbed_cloud/foundation/entities/device_update/campaign_statistics.py @@ -60,7 +60,9 @@ class CampaignStatistics(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, campaign_id=None, count=None, created_at=None, id=None, summary_status=None): + def __init__( + self, _client=None, campaign_id=None, count=None, created_at=None, id=None, summary_status=None, + ): """Creates a local `CampaignStatistics` instance Parameters can be supplied on creation of the instance or given by @@ -76,7 +78,7 @@ def __init__(self, _client=None, campaign_id=None, count=None, created_at=None, :type count: int :param created_at: :type created_at: datetime - :param id: (Required) ID of the event type description + :param id: (Required) ID of the event type description. :type id: str :param summary_status: The event type description. :type summary_status: str @@ -99,7 +101,7 @@ def campaign_id(self): This field must be set when creating a new CampaignStatistics Entity. - api example: '00000000000000000000000000000000' + api example: '016e652be6710000000000010010013d' :rtype: str """ @@ -140,7 +142,7 @@ def created_at(self): @property def id(self): - """ID of the event type description + """ID of the event type description. This field must be set when updating or deleting an existing CampaignStatistics Entity. @@ -175,7 +177,7 @@ def summary_status(self): def events(self, filter=None, order=None, max_results=None, page_size=None, include=None): """Get a list of events grouped by summary - `REST API Documentation `_. + `REST API Documentation `_. :param filter: Filtering when listing entities is not supported by the API for this entity. @@ -226,9 +228,9 @@ def events(self, filter=None, order=None, max_results=None, page_size=None, incl ) def list(self, filter=None, order=None, max_results=None, page_size=None, include=None): - """Get a list of statistics for a campaign + """Get statistics for a campaign - `REST API Documentation `_. + `REST API Documentation `_. :param filter: Filtering when listing entities is not supported by the API for this entity. @@ -305,14 +307,14 @@ def _paginate_events(self, after=None, filter=None, order=None, limit=None, incl return self._client.call_api( method="get", - path="/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types/", + path="/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}/event_types", content_type="application/json", - path_params={"campaign_id": self._campaign_id.to_api(), "summary_status_id": self._id.to_api()}, + path_params={"campaign_id": self._campaign_id.to_api(), "summary_status_id": self._id.to_api(),}, unpack=False, ) def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): - """Get a list of statistics for a campaign + """Get statistics for a campaign :param after: Not supported by the API. :type after: str @@ -338,14 +340,14 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ return self._client.call_api( method="get", - path="/v3/update-campaigns/{campaign_id}/statistics/", + path="/v3/update-campaigns/{campaign_id}/statistics", content_type="application/json", - path_params={"campaign_id": self._campaign_id.to_api()}, + path_params={"campaign_id": self._campaign_id.to_api(),}, unpack=False, ) def read(self): - """Get a summary status + """Get a status summary `REST API Documentation `_. @@ -356,6 +358,6 @@ def read(self): method="get", path="/v3/update-campaigns/{campaign_id}/statistics/{summary_status_id}", content_type="application/json", - path_params={"campaign_id": self._campaign_id.to_api(), "summary_status_id": self._id.to_api()}, + path_params={"campaign_id": self._campaign_id.to_api(), "summary_status_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/device_update/campaign_statistics_events.py b/src/mbed_cloud/foundation/entities/device_update/campaign_statistics_events.py index eae8be3f..43f1246f 100644 --- a/src/mbed_cloud/foundation/entities/device_update/campaign_statistics_events.py +++ b/src/mbed_cloud/foundation/entities/device_update/campaign_statistics_events.py @@ -126,7 +126,7 @@ def campaign_id(self): This field must be set when creating a new CampaignStatisticsEvents Entity. - api example: '00000000000000000000000000000000' + api example: '016e652be671000000000001001001e5' :rtype: str """ diff --git a/src/mbed_cloud/foundation/entities/device_update/enums.py b/src/mbed_cloud/foundation/entities/device_update/enums.py index 5ed9fb1c..0e7fa7b0 100644 --- a/src/mbed_cloud/foundation/entities/device_update/enums.py +++ b/src/mbed_cloud/foundation/entities/device_update/enums.py @@ -12,8 +12,12 @@ - :class:`CampaignStatisticsIdEnum` - :class:`CampaignStatisticsSummaryStatusEnum` - :class:`FirmwareImageOrderEnum` +- :class:`FirmwareManifestDeliveredPayloadTypeEnum` - :class:`FirmwareManifestOrderEnum` +- :class:`FirmwareManifestSchemaVersionEnum` - :class:`UpdateCampaignOrderEnum` +- :class:`UpdateCampaignPhaseEnum` +- :class:`UpdateCampaignStrategyEnum` ------------ @@ -25,8 +29,12 @@ from mbed_cloud.foundation.enums import CampaignStatisticsIdEnum from mbed_cloud.foundation.enums import CampaignStatisticsSummaryStatusEnum from mbed_cloud.foundation.enums import FirmwareImageOrderEnum + from mbed_cloud.foundation.enums import FirmwareManifestDeliveredPayloadTypeEnum from mbed_cloud.foundation.enums import FirmwareManifestOrderEnum + from mbed_cloud.foundation.enums import FirmwareManifestSchemaVersionEnum from mbed_cloud.foundation.enums import UpdateCampaignOrderEnum + from mbed_cloud.foundation.enums import UpdateCampaignPhaseEnum + from mbed_cloud.foundation.enums import UpdateCampaignStrategyEnum ------------ """ @@ -83,7 +91,7 @@ class CampaignStatisticsIdEnum(BaseEnum): SKIPPED = "skipped" SUCCESS = "success" - values = frozenset(("fail", "info", "skipped", "success")) + values = frozenset(("fail", "info", "skipped", "success",)) class CampaignStatisticsSummaryStatusEnum(BaseEnum): @@ -101,7 +109,7 @@ class CampaignStatisticsSummaryStatusEnum(BaseEnum): SKIPPED = "SKIPPED" SUCCESS = "SUCCESS" - values = frozenset(("FAIL", "INFO", "SKIPPED", "SUCCESS")) + values = frozenset(("FAIL", "INFO", "SKIPPED", "SUCCESS",)) class FirmwareImageOrderEnum(BaseEnum): @@ -117,7 +125,23 @@ class FirmwareImageOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) + + +class FirmwareManifestDeliveredPayloadTypeEnum(BaseEnum): + """Represents expected values of `FirmwareManifestDeliveredPayloadTypeEnum` + + This is used by Entities in the "device_update" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + DELTA = "delta" + FULL = "full" + + values = frozenset(("delta", "full",)) class FirmwareManifestOrderEnum(BaseEnum): @@ -133,7 +157,23 @@ class FirmwareManifestOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) + + +class FirmwareManifestSchemaVersionEnum(BaseEnum): + """Represents expected values of `FirmwareManifestSchemaVersionEnum` + + This is used by Entities in the "device_update" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + 1 = "1" + 3 = "3" + + values = frozenset(("1", "3",)) class UpdateCampaignOrderEnum(BaseEnum): @@ -149,4 +189,45 @@ class UpdateCampaignOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) + + +class UpdateCampaignPhaseEnum(BaseEnum): + """Represents expected values of `UpdateCampaignPhaseEnum` + + This is used by Entities in the "device_update" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + ACTIVE = "active" + ARCHIVED = "archived" + AWAITING_APPROVAL = "awaiting_approval" + DELETED = "deleted" + DRAFT = "draft" + STARTING = "starting" + STOPPED = "stopped" + STOPPING = "stopping" + TIMED = "timed" + + values = frozenset( + ("active", "archived", "awaiting_approval", "deleted", "draft", "starting", "stopped", "stopping", "timed",) + ) + + +class UpdateCampaignStrategyEnum(BaseEnum): + """Represents expected values of `UpdateCampaignStrategyEnum` + + This is used by Entities in the "device_update" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + CONTINUOUS = "continuous" + ONE - SHOT = "one-shot" + + values = frozenset(("continuous", "one-shot",)) diff --git a/src/mbed_cloud/foundation/entities/device_update/firmware_image.py b/src/mbed_cloud/foundation/entities/device_update/firmware_image.py index ca159070..21249984 100644 --- a/src/mbed_cloud/foundation/entities/device_update/firmware_image.py +++ b/src/mbed_cloud/foundation/entities/device_update/firmware_image.py @@ -66,10 +66,14 @@ class FirmwareImage(Entity): _sdk_fieldnames = _api_fieldnames # Renames to be performed by the SDK when receiving data {: } - _renames = {"datafile": "datafile_url"} + _renames = { + "datafile": "datafile_url", + } # Renames to be performed by the SDK when sending data {: } - _renames_to_api = {"datafile_url": "datafile"} + _renames_to_api = { + "datafile_url": "datafile", + } def __init__( self, @@ -92,21 +96,21 @@ def __init__( on the entity. For details on when they are required please see the documentation for the setter method. - :param created_at: The time the object was created + :param created_at: The time the entity was created. :type created_at: datetime - :param datafile_checksum: The checksum (sha256) generated for the datafile + :param datafile_checksum: The checksum (sha256) generated for the datafile. :type datafile_checksum: str - :param datafile_size: The size of the datafile in bytes + :param datafile_size: The size of the datafile in bytes. :type datafile_size: int - :param datafile_url: The firmware image file URL + :param datafile_url: The firmware image file URL. :type datafile_url: str - :param description: The description of the object + :param description: The description of the object. :type description: str - :param id: (Required) The firmware image ID + :param id: (Required) The firmware image ID. :type id: str - :param name: The firmware image name + :param name: The firmware image name. :type name: str - :param updated_at: The time the object was updated + :param updated_at: The time the entity was updated. :type updated_at: datetime """ @@ -126,7 +130,7 @@ def __init__( @property def created_at(self): - """The time the object was created + """The time the entity was created. api example: '2017-05-22T12:37:55.576563Z' @@ -137,9 +141,9 @@ def created_at(self): @property def datafile_checksum(self): - """The checksum (sha256) generated for the datafile + """The checksum (sha256) generated for the datafile. - api example: '0000000000000000000000000000000000000000000000000000000000000000' + api example: 'e979fe432d6a19b0e70a93b33ac29094cd5fe35a8fd5fbedfd383d8d107d6a7e' :rtype: str """ @@ -148,7 +152,7 @@ def datafile_checksum(self): @property def datafile_size(self): - """The size of the datafile in bytes + """The size of the datafile in bytes. :rtype: int """ @@ -157,9 +161,9 @@ def datafile_size(self): @property def datafile_url(self): - """The firmware image file URL + """The firmware image file URL. - api example: 'http://example.com/00000000000000000000000000000000' + api example: 'http://bucket.com/myimage.elf' :rtype: str """ @@ -168,7 +172,9 @@ def datafile_url(self): @property def description(self): - """The description of the object + """The description of the object. + + api example: 'a description' :rtype: str """ @@ -187,11 +193,11 @@ def description(self, value): @property def id(self): - """The firmware image ID + """The firmware image ID. This field must be set when updating or deleting an existing FirmwareImage Entity. - api example: '00000000000000000000000000000000' + api example: '016e652be671000000000001001001e5' :rtype: str """ @@ -210,7 +216,7 @@ def id(self, value): @property def name(self): - """The firmware image name + """The firmware image name. :rtype: str """ @@ -229,7 +235,7 @@ def name(self, value): @property def updated_at(self): - """The time the object was updated + """The time the entity was updated. api example: '2017-05-22T12:37:55.576563Z' @@ -241,10 +247,11 @@ def updated_at(self): def create(self, firmware_image_file): """Create an image - `REST API Documentation `_. + `REST API Documentation `_. - :param firmware_image_file: The firmware image file to upload Files can be provided as a file - object or a path to an existing file on disk. + :param firmware_image_file: The firmware image file to upload. File name must not exceed 100 + characters. Files can be provided as a file object or a path to an + existing file on disk. :type firmware_image_file: file :rtype: FirmwareImage @@ -261,7 +268,7 @@ def create(self, firmware_image_file): return self._client.call_api( method="post", - path="/v3/firmware-images/", + path="/v3/firmware-images", stream_params={ "description": (None, self._description.to_api(), "text/plain"), "datafile": ("firmware_image_file.bin", firmware_image_file, "application/octet-stream"), @@ -278,23 +285,23 @@ def create(self, firmware_image_file): def delete(self): """Delete an image - `REST API Documentation `_. + `REST API Documentation `_. :rtype: FirmwareImage """ return self._client.call_api( method="delete", - path="/v3/firmware-images/{image_id}/", + path="/v3/firmware-images/{image_id}", content_type="application/json", - path_params={"image_id": self._id.to_api()}, + path_params={"image_id": self._id.to_api(),}, unpack=self, ) def list(self, filter=None, order=None, max_results=None, page_size=None, include=None): """List all images - `REST API Documentation `_. + `REST API Documentation `_. **API Filters** @@ -336,7 +343,7 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: ASC or DESC + :param order: ASC or DESC. :type order: str :param max_results: Total maximum number of results to retrieve @@ -348,7 +355,7 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ :type page_size: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :return: An iterator object which yields instances of an entity. @@ -385,13 +392,13 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): """List all images - :param after: The ID of the the item after which to retrieve the next page + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: ASC or DESC + :param order: ASC or DESC. :type order: str :param limit: How many objects to retrieve in the page. The minimum limit is 2 and @@ -400,7 +407,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ :type limit: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :rtype: mbed_cloud.pagination.PaginatedResponse @@ -416,24 +423,24 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ return self._client.call_api( method="get", - path="/v3/firmware-images/", + path="/v3/firmware-images", content_type="application/json", query_params=query_params, unpack=False, ) def read(self): - """Get an image + """Get an image. - `REST API Documentation `_. + `REST API Documentation `_. :rtype: FirmwareImage """ return self._client.call_api( method="get", - path="/v3/firmware-images/{image_id}/", + path="/v3/firmware-images/{image_id}", content_type="application/json", - path_params={"image_id": self._id.to_api()}, + path_params={"image_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/device_update/firmware_manifest.py b/src/mbed_cloud/foundation/entities/device_update/firmware_manifest.py index 29d56f2f..5997e179 100644 --- a/src/mbed_cloud/foundation/entities/device_update/firmware_manifest.py +++ b/src/mbed_cloud/foundation/entities/device_update/firmware_manifest.py @@ -55,12 +55,21 @@ class FirmwareManifest(Entity): "created_at", "datafile_size", "datafile_url", + "delivered_payload_digest", + "delivered_payload_size", + "delivered_payload_type", + "delivered_payload_url", "description", "device_class", + "device_vendor", "id", "key_table_url", + "manifest_schema_version", "name", + "parsed_raw_manifest", + "precursor_payload_digest", "timestamp", + "update_priority", "updated_at", ] @@ -68,10 +77,16 @@ class FirmwareManifest(Entity): _sdk_fieldnames = _api_fieldnames # Renames to be performed by the SDK when receiving data {: } - _renames = {"datafile": "datafile_url", "key_table": "key_table_url"} + _renames = { + "datafile": "datafile_url", + "key_table": "key_table_url", + } # Renames to be performed by the SDK when sending data {: } - _renames_to_api = {"datafile_url": "datafile", "key_table_url": "key_table"} + _renames_to_api = { + "datafile_url": "datafile", + "key_table_url": "key_table", + } def __init__( self, @@ -79,12 +94,21 @@ def __init__( created_at=None, datafile_size=None, datafile_url=None, + delivered_payload_digest=None, + delivered_payload_size=None, + delivered_payload_type=None, + delivered_payload_url=None, description=None, device_class=None, + device_vendor=None, id=None, key_table_url=None, + manifest_schema_version=None, name=None, + parsed_raw_manifest=None, + precursor_payload_digest=None, timestamp=None, + update_priority=None, updated_at=None, ): """Creates a local `FirmwareManifest` instance @@ -96,25 +120,49 @@ def __init__( on the entity. For details on when they are required please see the documentation for the setter method. - :param created_at: The time the object was created + :param created_at: The time the entity was created. :type created_at: datetime - :param datafile_size: The size of the datafile in bytes + :param datafile_size: The size of the firmware manifest in bytes. :type datafile_size: int - :param datafile_url: The URL of the firmware manifest binary + :param datafile_url: The URL of the ASN.1 DER-encoded firmware manifest binary. :type datafile_url: str - :param description: The description of the firmware manifest + :param delivered_payload_digest: Digest (SHA256, hex-encoded) of the payload to deliver to the + device. + :type delivered_payload_digest: str + :param delivered_payload_size: The size in bytes of the payload to deliver to the device. + :type delivered_payload_size: int + :param delivered_payload_type: Type of the payload to deliver to the device (full or delta + image). + :type delivered_payload_type: str + :param delivered_payload_url: The URL of the payload to deliver to the device. + :type delivered_payload_url: str + :param description: The description of the firmware manifest. :type description: str - :param device_class: The class of the device + :param device_class: The device class ID. :type device_class: str - :param id: (Required) The firmware manifest ID + :param device_vendor: The device vendor ID. + :type device_vendor: str + :param id: (Required) The firmware manifest ID. :type id: str - :param key_table_url: The key table of pre-shared keys for devices + :param key_table_url: The key table of pre-shared keys for devices. :type key_table_url: str - :param name: The name of the object + :param manifest_schema_version: Version of the manifest schema (1 or 3). + :type manifest_schema_version: str + :param name: The name of the manifest. :type name: str - :param timestamp: The firmware manifest version as a timestamp + :param parsed_raw_manifest: Raw manifest in JSON format, parsed from ASN.1 DER encoding. + Fields may change. Backwards compatibility is not guaranteed. + Recommended for debugging only. + :type parsed_raw_manifest: dict + :param precursor_payload_digest: Digest (SHA256, hex-encoded) of the currently installed payload. + :type precursor_payload_digest: str + :param timestamp: The firmware manifest version as a timestamp. :type timestamp: datetime - :param updated_at: The time the object was updated + :param update_priority: Update priority, passed to the application callback when an update + is performed. Allows the application to make application-specific + decisions. + :type update_priority: int + :param updated_at: The time the entity was updated. :type updated_at: datetime """ @@ -126,17 +174,30 @@ def __init__( self._created_at = fields.DateTimeField(value=created_at) self._datafile_size = fields.IntegerField(value=datafile_size) self._datafile_url = fields.StringField(value=datafile_url) + self._delivered_payload_digest = fields.StringField(value=delivered_payload_digest) + self._delivered_payload_size = fields.IntegerField(value=delivered_payload_size) + self._delivered_payload_type = fields.StringField( + value=delivered_payload_type, enum=enums.FirmwareManifestDeliveredPayloadTypeEnum + ) + self._delivered_payload_url = fields.StringField(value=delivered_payload_url) self._description = fields.StringField(value=description) self._device_class = fields.StringField(value=device_class) + self._device_vendor = fields.StringField(value=device_vendor) self._id = fields.StringField(value=id) self._key_table_url = fields.StringField(value=key_table_url) + self._manifest_schema_version = fields.StringField( + value=manifest_schema_version, enum=enums.FirmwareManifestSchemaVersionEnum + ) self._name = fields.StringField(value=name) + self._parsed_raw_manifest = fields.DictField(value=parsed_raw_manifest) + self._precursor_payload_digest = fields.StringField(value=precursor_payload_digest) self._timestamp = fields.DateTimeField(value=timestamp) + self._update_priority = fields.IntegerField(value=update_priority) self._updated_at = fields.DateTimeField(value=updated_at) @property def created_at(self): - """The time the object was created + """The time the entity was created. api example: '2017-05-22T12:37:55.576563Z' @@ -147,7 +208,7 @@ def created_at(self): @property def datafile_size(self): - """The size of the datafile in bytes + """The size of the firmware manifest in bytes. :rtype: int """ @@ -156,18 +217,58 @@ def datafile_size(self): @property def datafile_url(self): - """The URL of the firmware manifest binary + """The URL of the ASN.1 DER-encoded firmware manifest binary. - api example: 'http://example.com/00000000000000000000000000000000' + api example: 'http://bucket.com/mymanifest.manifest' :rtype: str """ return self._datafile_url.value + @property + def delivered_payload_digest(self): + """Digest (SHA256, hex-encoded) of the payload to deliver to the device. + + api example: 'c520fc771c0482ad39e983d27cf725a7c724fe58c616129a34a420d1941068bc' + + :rtype: str + """ + + return self._delivered_payload_digest.value + + @property + def delivered_payload_size(self): + """The size in bytes of the payload to deliver to the device. + + :rtype: int + """ + + return self._delivered_payload_size.value + + @property + def delivered_payload_type(self): + """Type of the payload to deliver to the device (full or delta image). + + :rtype: str + """ + + return self._delivered_payload_type.value + + @property + def delivered_payload_url(self): + """The URL of the payload to deliver to the device. + + api example: 'http://bucket.com/myimage.elf' + + :rtype: str + """ + + return self._delivered_payload_url.value + @property def description(self): - """The description of the firmware manifest + """The description of the firmware manifest. :rtype: str """ @@ -186,22 +287,33 @@ def description(self, value): @property def device_class(self): - """The class of the device + """The device class ID. - api example: '00000000-0000-0000-0000-000000000000' + api example: '42c4d8de-704d-546e-b9d3-1ce1eb316167' :rtype: str """ return self._device_class.value + @property + def device_vendor(self): + """The device vendor ID. + + api example: '5d645eae-c231-5a89-9764-2e655cd94fa8' + + :rtype: str + """ + + return self._device_vendor.value + @property def id(self): - """The firmware manifest ID + """The firmware manifest ID. This field must be set when updating or deleting an existing FirmwareManifest Entity. - api example: '00000000000000000000000000000000' + api example: '12345678901234567890123456789012' :rtype: str """ @@ -220,18 +332,29 @@ def id(self, value): @property def key_table_url(self): - """The key table of pre-shared keys for devices + """The key table of pre-shared keys for devices. - api example: 'http://example.com' + api example: 'http://example.com/key-table' :rtype: str """ return self._key_table_url.value + @property + def manifest_schema_version(self): + """Version of the manifest schema (1 or 3). + + :rtype: str + """ + + return self._manifest_schema_version.value + @property def name(self): - """The name of the object + """The name of the manifest. + + api example: 'manifest_name' :rtype: str """ @@ -248,9 +371,31 @@ def name(self, value): self._name.set(value) + @property + def parsed_raw_manifest(self): + """Raw manifest in JSON format, parsed from ASN.1 DER encoding. + Fields may change. Backwards compatibility is not guaranteed. + Recommended for debugging only. + + :rtype: dict + """ + + return self._parsed_raw_manifest.value + + @property + def precursor_payload_digest(self): + """Digest (SHA256, hex-encoded) of the currently installed payload. + + api example: '54d640fcd687c9b13420b9be66a265494899002aad1b7370cfb3dbfd7fbec42f' + + :rtype: str + """ + + return self._precursor_payload_digest.value + @property def timestamp(self): - """The firmware manifest version as a timestamp + """The firmware manifest version as a timestamp. api example: '2017-05-22T12:37:55.576563Z' @@ -259,9 +404,19 @@ def timestamp(self): return self._timestamp.value + @property + def update_priority(self): + """Update priority, passed to the application callback when an update is + performed. Allows the application to make application-specific decisions. + + :rtype: int + """ + + return self._update_priority.value + @property def updated_at(self): - """The time the object was updated + """The time the entity was updated. api example: '2017-05-22T12:37:55.576563Z' @@ -276,12 +431,15 @@ def create(self, firmware_manifest_file, key_table_file=None): `REST API Documentation `_. :param firmware_manifest_file: The manifest file to create. The API gateway enforces the account- - specific file size. Files can be provided as a file object or a path - to an existing file on disk. + specific file size. File name must not exceed 100 characters. Files + can be provided as a file object or a path to an existing file on + disk. :type firmware_manifest_file: file - :param key_table_file: The key table of pre-shared keys for devices Files can be provided as - a file object or a path to an existing file on disk. + :param key_table_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. Files + can be provided as a file object or a path to an existing file on + disk. :type key_table_file: file :rtype: FirmwareManifest @@ -325,21 +483,21 @@ def create(self, firmware_manifest_file, key_table_file=None): def delete(self): """Delete a manifest - `REST API Documentation `_. + `REST API Documentation `_. :rtype: FirmwareManifest """ return self._client.call_api( method="delete", - path="/v3/firmware-manifests/{manifest_id}/", + path="/v3/firmware-manifests/{manifest_id}", content_type="application/json", - path_params={"manifest_id": self._id.to_api()}, + path_params={"manifest_id": self._id.to_api(),}, unpack=self, ) def list(self, filter=None, order=None, max_results=None, page_size=None, include=None): - """List manifests + """List all firmware manifests. `REST API Documentation `_. @@ -385,7 +543,7 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: ASC or DESC + :param order: ASC or DESC. :type order: str :param max_results: Total maximum number of results to retrieve @@ -397,7 +555,7 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ :type page_size: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :return: An iterator object which yields instances of an entity. @@ -432,15 +590,15 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ ) def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): - """List manifests + """List all firmware manifests. - :param after: The ID of the the item after which to retrieve the next page + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: ASC or DESC + :param order: ASC or DESC. :type order: str :param limit: How many objects to retrieve in the page. The minimum limit is 2 and @@ -449,7 +607,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ :type limit: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :rtype: mbed_cloud.pagination.PaginatedResponse @@ -474,15 +632,15 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ def read(self): """Get a manifest - `REST API Documentation `_. + `REST API Documentation `_. :rtype: FirmwareManifest """ return self._client.call_api( method="get", - path="/v3/firmware-manifests/{manifest_id}/", + path="/v3/firmware-manifests/{manifest_id}", content_type="application/json", - path_params={"manifest_id": self._id.to_api()}, + path_params={"manifest_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/device_update/update_campaign.py b/src/mbed_cloud/foundation/entities/device_update/update_campaign.py index 120ba03e..a1757505 100644 --- a/src/mbed_cloud/foundation/entities/device_update/update_campaign.py +++ b/src/mbed_cloud/foundation/entities/device_update/update_campaign.py @@ -56,7 +56,13 @@ class UpdateCampaign(Entity): # List of fields that are serialised between the API and SDK _api_fieldnames = [ + "active_at", + "approval_required", + "archived_at", + "autostop", "autostop_reason", + "autostop_success_percent", + "campaign_strategy", "created_at", "description", "device_filter", @@ -68,6 +74,9 @@ class UpdateCampaign(Entity): "root_manifest_id", "root_manifest_url", "started_at", + "starting_at", + "stopped_at", + "stopping_at", "updated_at", "when", ] @@ -84,7 +93,13 @@ class UpdateCampaign(Entity): def __init__( self, _client=None, + active_at=None, + approval_required=None, + archived_at=None, + autostop=None, autostop_reason=None, + autostop_success_percent=None, + campaign_strategy=None, created_at=None, description=None, device_filter=None, @@ -96,6 +111,9 @@ def __init__( root_manifest_id=None, root_manifest_url=None, started_at=None, + starting_at=None, + stopped_at=None, + stopping_at=None, updated_at=None, when=None, ): @@ -108,32 +126,57 @@ def __init__( on the entity. For details on when they are required please see the documentation for the setter method. + :param active_at: The time the campaign entered the active state. + :type active_at: datetime + :param approval_required: Flag indicating whether approval is needed to start the campaign. + :type approval_required: bool + :param archived_at: The time the campaign was archived. + :type archived_at: datetime + :param autostop: Flag indicating whether the campaign should be auto-stopped on + reaching a threshold. + :type autostop: bool :param autostop_reason: Text description of why a campaign failed to start or why a campaign stopped. :type autostop_reason: str - :param created_at: The time the update campaign was created + :param autostop_success_percent: Percent of successful device updates to auto stop the campaign. + :type autostop_success_percent: float + :param campaign_strategy: 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`. + :type campaign_strategy: str + :param created_at: The time the entity was created. :type created_at: datetime - :param description: An optional description of the campaign + :param description: An optional description of the campaign. :type description: str - :param device_filter: (Required) The filter for the devices the campaign is targeting at + :param device_filter: (Required) The filter for the devices the campaign targets. Refer to this + using the filter ID. :type device_filter: str :param device_filter_helper: Helper for creating the device filter string. :type device_filter_helper: mbed_cloud.client.api_filter.ApiFilter - :param finished: The campaign finish timestamp + :param finished: The time the campaign finished. :type finished: datetime - :param id: (Required) The campaign ID + :param id: (Required) The campaign ID. :type id: str - :param name: The campaign name + :param name: The campaign name. :type name: str - :param phase: The current phase of the campaign. + :param phase: The phase of the campaign. :type phase: str - :param root_manifest_id: + :param root_manifest_id: The ID of the manifest that will be sent to the device as part of + the campaign. :type root_manifest_id: str - :param root_manifest_url: + :param root_manifest_url: The URL for the manifest that will be sent to the device as part + of the campaign. :type root_manifest_url: str - :param started_at: + :param started_at: The time the campaign was started. :type started_at: datetime - :param updated_at: The time the object was updated + :param starting_at: The time the campaign will be started. + :type starting_at: datetime + :param stopped_at: The time the campaign was stopped. + :type stopped_at: datetime + :param stopping_at: The time the campaign will be stopped. + :type stopping_at: datetime + :param updated_at: The time the entity was updated. :type updated_at: datetime :param when: The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has elapsed. @@ -145,7 +188,13 @@ def __init__( # inline imports for avoiding circular references and bulk imports # fields + self._active_at = fields.DateTimeField(value=active_at) + self._approval_required = fields.BooleanField(value=approval_required) + self._archived_at = fields.DateTimeField(value=archived_at) + self._autostop = fields.BooleanField(value=autostop) self._autostop_reason = fields.StringField(value=autostop_reason) + self._autostop_success_percent = fields.FloatField(value=autostop_success_percent) + self._campaign_strategy = fields.StringField(value=campaign_strategy, enum=enums.UpdateCampaignStrategyEnum) self._created_at = fields.DateTimeField(value=created_at) self._description = fields.StringField(value=description) self._device_filter = fields.StringField(value=device_filter) @@ -153,13 +202,81 @@ def __init__( self._finished = fields.DateTimeField(value=finished) self._id = fields.StringField(value=id) self._name = fields.StringField(value=name) - self._phase = fields.StringField(value=phase) + self._phase = fields.StringField(value=phase, enum=enums.UpdateCampaignPhaseEnum) self._root_manifest_id = fields.StringField(value=root_manifest_id) self._root_manifest_url = fields.StringField(value=root_manifest_url) self._started_at = fields.DateTimeField(value=started_at) + self._starting_at = fields.DateTimeField(value=starting_at) + self._stopped_at = fields.DateTimeField(value=stopped_at) + self._stopping_at = fields.DateTimeField(value=stopping_at) self._updated_at = fields.DateTimeField(value=updated_at) self._when = fields.DateTimeField(value=when) + @property + def active_at(self): + """The time the campaign entered the active state. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._active_at.value + + @property + def approval_required(self): + """Flag indicating whether approval is needed to start the campaign. + + api example: 'false' + + :rtype: bool + """ + + return self._approval_required.value + + @approval_required.setter + def approval_required(self, value): + """Set value of `approval_required` + + :param value: value to set + :type value: bool + """ + + self._approval_required.set(value) + + @property + def archived_at(self): + """The time the campaign was archived. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._archived_at.value + + @property + def autostop(self): + """Flag indicating whether the campaign should be auto-stopped on reaching a + threshold. + + api example: 'false' + + :rtype: bool + """ + + return self._autostop.value + + @autostop.setter + def autostop(self, value): + """Set value of `autostop` + + :param value: value to set + :type value: bool + """ + + self._autostop.set(value) + @property def autostop_reason(self): """Text description of why a campaign failed to start or why a campaign stopped. @@ -171,9 +288,51 @@ def autostop_reason(self): return self._autostop_reason.value + @property + def autostop_success_percent(self): + """Percent of successful device updates to auto stop the campaign. + + api example: '85.00' + + :rtype: float + """ + + return self._autostop_success_percent.value + + @autostop_success_percent.setter + def autostop_success_percent(self, value): + """Set value of `autostop_success_percent` + + :param value: value to set + :type value: float + """ + + self._autostop_success_percent.set(value) + + @property + def campaign_strategy(self): + """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`. + + :rtype: str + """ + + return self._campaign_strategy.value + + @campaign_strategy.setter + def campaign_strategy(self, value): + """Set value of `campaign_strategy` + + :param value: value to set + :type value: str + """ + + self._campaign_strategy.set(value) + @property def created_at(self): - """The time the update campaign was created + """The time the entity was created. api example: '2017-05-22T12:37:55.576563Z' @@ -184,7 +343,9 @@ def created_at(self): @property def description(self): - """An optional description of the campaign + """An optional description of the campaign. + + api example: 'This campaign updates Class XX devices to version 1.34' :rtype: str """ @@ -203,11 +364,12 @@ def description(self, value): @property def device_filter(self): - """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. This field must be set when creating a new UpdateCampaign Entity. - api example: 'id__eq=00000000000000000000000000000000' + api example: 'state__eq=registered' :rtype: str """ @@ -255,7 +417,7 @@ def device_filter_helper(self, value): @property def finished(self): - """The campaign finish timestamp + """The time the campaign finished. api example: '2017-05-22T12:37:55.576563Z' @@ -266,11 +428,11 @@ def finished(self): @property def id(self): - """The campaign ID + """The campaign ID. This field must be set when updating or deleting an existing UpdateCampaign Entity. - api example: '00000000000000000000000000000000' + api example: '016e83ddc648000000000001001000f5' :rtype: str """ @@ -289,7 +451,7 @@ def id(self, value): @property def name(self): - """The campaign name + """The campaign name. api example: 'campaign' @@ -310,7 +472,7 @@ def name(self, value): @property def phase(self): - """The current phase of the campaign. + """The phase of the campaign. :rtype: str """ @@ -319,9 +481,10 @@ def phase(self): @property def root_manifest_id(self): - """ + """The ID of the manifest that will be sent to the device as part of the + campaign. - api example: '00000000000000000000000000000000' + api example: '016e83dce36a00000000000100100102' :rtype: str """ @@ -340,9 +503,11 @@ def root_manifest_id(self, value): @property def root_manifest_url(self): - """ + """The URL for the manifest that will be sent to the device as part of the + campaign. - api example: 'http://example.com/00000000000000000000000000000000' + api example: 'https://api.us-east-1.mbedcloud.com/v3/firmware- + manifests/016e83dce36a00000000000100100102' :rtype: str """ @@ -351,7 +516,7 @@ def root_manifest_url(self): @property def started_at(self): - """ + """The time the campaign was started. api example: '2017-05-22T12:37:55.576563Z' @@ -360,9 +525,42 @@ def started_at(self): return self._started_at.value + @property + def starting_at(self): + """The time the campaign will be started. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._starting_at.value + + @property + def stopped_at(self): + """The time the campaign was stopped. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._stopped_at.value + + @property + def stopping_at(self): + """The time the campaign will be stopped. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._stopping_at.value + @property def updated_at(self): - """The time the object was updated + """The time the entity was updated. api example: '2017-05-22T12:37:55.576563Z' @@ -383,16 +581,6 @@ def when(self): return self._when.value - @when.setter - def when(self, value): - """Set value of `when` - - :param value: value to set - :type value: datetime - """ - - self._when.set(value) - def archive(self): """Archive a campaign. @@ -405,14 +593,14 @@ def archive(self): method="post", path="/v3/update-campaigns/{campaign_id}/archive", content_type="application/json", - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=self, ) def create(self): """Create a campaign - `REST API Documentation `_. + `REST API Documentation `_. :rtype: UpdateCampaign """ @@ -420,6 +608,14 @@ def create(self): # Conditionally setup the message body, fields which have not been set will not be sent to the API. # This avoids null fields being rejected and allows the default value to be used. body_params = {} + if self._approval_required.value_set: + body_params["approval_required"] = self._approval_required.to_api() + if self._autostop.value_set: + body_params["autostop"] = self._autostop.to_api() + if self._autostop_success_percent.value_set: + body_params["autostop_success_percent"] = self._autostop_success_percent.to_api() + if self._campaign_strategy.value_set: + body_params["campaign_strategy"] = self._campaign_strategy.to_api() if self._description.value_set: body_params["description"] = self._description.to_api() if self._device_filter.value_set: @@ -428,12 +624,10 @@ def create(self): body_params["name"] = self._name.to_api() if self._root_manifest_id.value_set: body_params["root_manifest_id"] = self._root_manifest_id.to_api() - if self._when.value_set: - body_params["when"] = self._when.to_api() return self._client.call_api( method="post", - path="/v3/update-campaigns/", + path="/v3/update-campaigns", content_type="application/json", body_params=body_params, unpack=self, @@ -442,29 +636,29 @@ def create(self): def delete(self): """Delete a campaign - `REST API Documentation `_. + `REST API Documentation `_. :rtype: UpdateCampaign """ return self._client.call_api( method="delete", - path="/v3/update-campaigns/{campaign_id}/", + path="/v3/update-campaigns/{campaign_id}", content_type="application/json", - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=self, ) def device_metadata(self, filter=None, order=None, max_results=None, page_size=None, include=None): """List all campaign device metadata - `REST API Documentation `_. + `REST API Documentation `_. :param filter: Filtering when listing entities is not supported by the API for this entity. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: ASC or DESC + :param order: ASC or DESC. :type order: str :param max_results: Total maximum number of results to retrieve @@ -476,7 +670,7 @@ def device_metadata(self, filter=None, order=None, max_results=None, page_size=N :type page_size: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :return: An iterator object which yields instances of an entity. @@ -513,7 +707,7 @@ def device_metadata(self, filter=None, order=None, max_results=None, page_size=N def list(self, filter=None, order=None, max_results=None, page_size=None, include=None): """List all campaigns - `REST API Documentation `_. + `REST API Documentation `_. **API Filters** @@ -561,7 +755,7 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records. Acceptable values: ASC, DESC. Default: ASC + :param order: The order of the records. Acceptable values: ASC, DESC. Default: ASC. :type order: str :param max_results: Total maximum number of results to retrieve @@ -573,7 +767,7 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ :type page_size: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :return: An iterator object which yields instances of an entity. @@ -610,13 +804,13 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ def _paginate_device_metadata(self, after=None, filter=None, order=None, limit=None, include=None): """List all campaign device metadata - :param after: The ID of the the item after which to retrieve the next page + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: ASC or DESC + :param order: ASC or DESC. :type order: str :param limit: How many objects to retrieve in the page. The minimum limit is 2 and @@ -625,7 +819,7 @@ def _paginate_device_metadata(self, after=None, filter=None, order=None, limit=N :type limit: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :rtype: mbed_cloud.pagination.PaginatedResponse @@ -641,23 +835,23 @@ def _paginate_device_metadata(self, after=None, filter=None, order=None, limit=N return self._client.call_api( method="get", - path="/v3/update-campaigns/{campaign_id}/campaign-device-metadata/", + path="/v3/update-campaigns/{campaign_id}/campaign-device-metadata", content_type="application/json", query_params=query_params, - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=False, ) def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): """List all campaigns - :param after: The ID of the the item after which to retrieve the next page + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records. Acceptable values: ASC, DESC. Default: ASC + :param order: The order of the records. Acceptable values: ASC, DESC. Default: ASC. :type order: str :param limit: How many objects to retrieve in the page. The minimum limit is 2 and @@ -666,7 +860,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ :type limit: int :param include: A comma-separated list of data fields to return. Currently supported: - total_count + total_count. :type include: str :rtype: mbed_cloud.pagination.PaginatedResponse @@ -682,7 +876,7 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ return self._client.call_api( method="get", - path="/v3/update-campaigns/", + path="/v3/update-campaigns", content_type="application/json", query_params=query_params, unpack=False, @@ -691,16 +885,16 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ def read(self): """Get a campaign. - `REST API Documentation `_. + `REST API Documentation `_. :rtype: UpdateCampaign """ return self._client.call_api( method="get", - path="/v3/update-campaigns/{campaign_id}/", + path="/v3/update-campaigns/{campaign_id}", content_type="application/json", - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=self, ) @@ -716,7 +910,7 @@ def start(self): method="post", path="/v3/update-campaigns/{campaign_id}/start", content_type="application/json", - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=self, ) @@ -732,14 +926,14 @@ def stop(self): method="post", path="/v3/update-campaigns/{campaign_id}/stop", content_type="application/json", - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=self, ) def update(self): """Modify a campaign - `REST API Documentation `_. + `REST API Documentation `_. :rtype: UpdateCampaign """ @@ -747,6 +941,12 @@ def update(self): # Conditionally setup the message body, fields which have not been set will not be sent to the API. # This avoids null fields being rejected and allows the default value to be used. body_params = {} + if self._approval_required.value_set: + body_params["approval_required"] = self._approval_required.to_api() + if self._autostop.value_set: + body_params["autostop"] = self._autostop.to_api() + if self._autostop_success_percent.value_set: + body_params["autostop_success_percent"] = self._autostop_success_percent.to_api() if self._description.value_set: body_params["description"] = self._description.to_api() if self._device_filter.value_set: @@ -755,14 +955,12 @@ def update(self): body_params["name"] = self._name.to_api() if self._root_manifest_id.value_set: body_params["root_manifest_id"] = self._root_manifest_id.to_api() - if self._when.value_set: - body_params["when"] = self._when.to_api() return self._client.call_api( method="put", - path="/v3/update-campaigns/{campaign_id}/", + path="/v3/update-campaigns/{campaign_id}", content_type="application/json", body_params=body_params, - path_params={"campaign_id": self._id.to_api()}, + path_params={"campaign_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device.py b/src/mbed_cloud/foundation/entities/devices/device.py index c33a0f78..d37d3882 100644 --- a/src/mbed_cloud/foundation/entities/devices/device.py +++ b/src/mbed_cloud/foundation/entities/devices/device.py @@ -73,16 +73,26 @@ class Device(Entity): "endpoint_type", "enrolment_list_timestamp", "firmware_checksum", + "groups", "host_gateway", "id", "issuer_fingerprint", + "last_operator_suspended_category", + "last_operator_suspended_description", + "last_operator_suspended_updated_at", + "last_system_suspended_category", + "last_system_suspended_description", + "last_system_suspended_updated_at", + "lifecycle_status", "manifest", "manifest_timestamp", "mechanism", "mechanism_url", "name", + "operator_suspended", "serial_number", "state", + "system_suspended", "updated_at", "vendor_id", ] @@ -117,16 +127,26 @@ def __init__( endpoint_type=None, enrolment_list_timestamp=None, firmware_checksum=None, + groups=None, host_gateway=None, id=None, issuer_fingerprint=None, + last_operator_suspended_category=None, + last_operator_suspended_description=None, + last_operator_suspended_updated_at=None, + last_system_suspended_category=None, + last_system_suspended_description=None, + last_system_suspended_updated_at=None, + lifecycle_status=None, manifest=None, manifest_timestamp=None, mechanism=None, mechanism_url=None, name=None, + operator_suspended=None, serial_number=None, state=None, + system_suspended=None, updated_at=None, vendor_id=None, ): @@ -171,15 +191,18 @@ def __init__( :param device_execution_mode: 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) - - 1 - development devices - - 5 - production devices + - 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. :type device_execution_mode: int :param device_key: The fingerprint of the device certificate. :type device_key: str - :param endpoint_name: The endpoint name given to the device. + :param endpoint_name: The endpoint name given to the device. The endpoint_name is from + the device certificate and is set by factory tool. :type endpoint_name: str :param endpoint_type: The endpoint type of the device. For example, the device is a gateway. @@ -188,7 +211,10 @@ def __init__( :type enrolment_list_timestamp: datetime :param firmware_checksum: The SHA256 checksum of the current firmware image. :type firmware_checksum: str - :param host_gateway: The ID of the host gateway, if appropriate. + :param groups: An array containing an ID of each group this device belongs to. + :type groups: list + :param host_gateway: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. :type host_gateway: str :param id: (Required) The ID of the device. The device ID is used across all Device Management APIs. @@ -196,21 +222,64 @@ def __init__( :param issuer_fingerprint: SHA256 fingerprint of the certificate used to validate the signature of the device certificate. :type issuer_fingerprint: str + :param last_operator_suspended_category: The reference of the block category. + :type last_operator_suspended_category: str + :param last_operator_suspended_description: The most recent description why the device was suspended or + returned to service. + :type last_operator_suspended_description: str + :param last_operator_suspended_updated_at: The timestamp of the most recent suspension activity. + :type last_operator_suspended_updated_at: datetime + :param last_system_suspended_category: The reference of the block category. + :type last_system_suspended_category: str + :param last_system_suspended_description: The most recent description of why the device was blocked or + unblocked by the system. + :type last_system_suspended_description: str + :param last_system_suspended_updated_at: The timestamp of the most recent system block activity. + :type last_system_suspended_updated_at: datetime + :param lifecycle_status: 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'. + :type lifecycle_status: str :param manifest: DEPRECATED: The URL for the current device manifest. :type manifest: str :param manifest_timestamp: The timestamp of the current manifest version. :type manifest_timestamp: datetime - :param mechanism: The ID of the channel used to communicate with the device. + :param mechanism: NOT USED: The ID of the channel used to communicate with the + device. :type mechanism: str - :param mechanism_url: The address of the connector to use. + :param mechanism_url: NOT USED: The address of the connector to use. :type mechanism_url: str - :param name: The name of the device. + :param name: The name given by the web application for the device. Device + itself provides only the endpoint_name. :type name: str - :param serial_number: The serial number of the device. + :param operator_suspended: Device has been suspended by operator. + :type operator_suspended: bool + :param serial_number: The [serial number](../provisioning-process/provisioning- + information.html#serial-number) of the device. The serial number + is injected by the factory tool during manufacturing. :type serial_number: str :param state: 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](../service-api-references/device- + management-connect.html#createAsyncRequest) can be queued. The + device sends events for [subscribed](../connecting/resource- + change-webapp.html) resources. + * Deregistered: The device has requested deregistration, or its + registration has expired. :type state: str - :param updated_at: The time the object was updated. + :param system_suspended: Is the device suspended by the system? + :type system_suspended: bool + :param updated_at: The time this data object was updated. :type updated_at: datetime :param vendor_id: The device vendor ID. :type vendor_id: str @@ -239,16 +308,26 @@ def __init__( self._endpoint_type = fields.StringField(value=endpoint_type) self._enrolment_list_timestamp = fields.DateTimeField(value=enrolment_list_timestamp) self._firmware_checksum = fields.StringField(value=firmware_checksum) + self._groups = fields.ListField(value=groups) self._host_gateway = fields.StringField(value=host_gateway) self._id = fields.StringField(value=id) self._issuer_fingerprint = fields.StringField(value=issuer_fingerprint) + self._last_operator_suspended_category = fields.StringField(value=last_operator_suspended_category) + self._last_operator_suspended_description = fields.StringField(value=last_operator_suspended_description) + self._last_operator_suspended_updated_at = fields.DateTimeField(value=last_operator_suspended_updated_at) + self._last_system_suspended_category = fields.StringField(value=last_system_suspended_category) + self._last_system_suspended_description = fields.StringField(value=last_system_suspended_description) + self._last_system_suspended_updated_at = fields.DateTimeField(value=last_system_suspended_updated_at) + self._lifecycle_status = fields.StringField(value=lifecycle_status, enum=enums.DeviceLifecycleStatusEnum) self._manifest = fields.StringField(value=manifest) self._manifest_timestamp = fields.DateTimeField(value=manifest_timestamp) self._mechanism = fields.StringField(value=mechanism, enum=enums.DeviceMechanismEnum) self._mechanism_url = fields.StringField(value=mechanism_url) self._name = fields.StringField(value=name) + self._operator_suspended = fields.BooleanField(value=operator_suspended) self._serial_number = fields.StringField(value=serial_number) self._state = fields.StringField(value=state, enum=enums.DeviceStateEnum) + self._system_suspended = fields.BooleanField(value=system_suspended) self._updated_at = fields.DateTimeField(value=updated_at) self._vendor_id = fields.StringField(value=vendor_id) @@ -418,7 +497,7 @@ def deployment(self, value): def description(self): """The description of the device. - api example: 'description' + api example: 'Temperature measuring device' :rtype: str """ @@ -459,11 +538,13 @@ def device_execution_mode(self): """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) - - 1 - development devices - - 5 - - production devices + - 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. :rtype: int """ @@ -504,7 +585,8 @@ def device_key(self, value): @property def endpoint_name(self): - """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. api example: '00000000-0000-0000-0000-000000000000' @@ -554,9 +636,19 @@ def firmware_checksum(self): return self._firmware_checksum.value + @property + def groups(self): + """An array containing an ID of each group this device belongs to. + + :rtype: list + """ + + return self._groups.value + @property def host_gateway(self): - """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. :rtype: str """ @@ -618,6 +710,89 @@ def issuer_fingerprint(self, value): self._issuer_fingerprint.set(value) + @property + def last_operator_suspended_category(self): + """The reference of the block category. + + api example: 'maintenance' + + :rtype: str + """ + + return self._last_operator_suspended_category.value + + @property + def last_operator_suspended_description(self): + """The most recent description why the device was suspended or returned to + service. + + api example: 'Suspended for maintenance.' + + :rtype: str + """ + + return self._last_operator_suspended_description.value + + @property + def last_operator_suspended_updated_at(self): + """The timestamp of the most recent suspension activity. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._last_operator_suspended_updated_at.value + + @property + def last_system_suspended_category(self): + """The reference of the block category. + + api example: 'maintenance' + + :rtype: str + """ + + return self._last_system_suspended_category.value + + @property + def last_system_suspended_description(self): + """The most recent description of why the device was blocked or unblocked by the + system. + + api example: "A certificate in the device's certificate chain was blacklisted by the + system." + + :rtype: str + """ + + return self._last_system_suspended_description.value + + @property + def last_system_suspended_updated_at(self): + """The timestamp of the most recent system block activity. + + api example: '2017-05-22T12:37:55.576563Z' + + :rtype: datetime + """ + + return self._last_system_suspended_updated_at.value + + @property + def lifecycle_status(self): + """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'. + + api example: 'enabled' + + :rtype: str + """ + + return self._lifecycle_status.value + @property def manifest(self): """DEPRECATED: The URL for the current device manifest. @@ -650,7 +825,7 @@ def manifest_timestamp(self): @property def mechanism(self): - """The ID of the channel used to communicate with the device. + """NOT USED: The ID of the channel used to communicate with the device. :rtype: str """ @@ -669,7 +844,7 @@ def mechanism(self, value): @property def mechanism_url(self): - """The address of the connector to use. + """NOT USED: The address of the connector to use. :rtype: str """ @@ -688,7 +863,8 @@ def mechanism_url(self, value): @property def name(self): - """The name of the device. + """The name given by the web application for the device. Device itself provides + only the endpoint_name. api example: '00000000-0000-0000-0000-000000000000' @@ -707,9 +883,20 @@ def name(self, value): self._name.set(value) + @property + def operator_suspended(self): + """Device has been suspended by operator. + + :rtype: bool + """ + + return self._operator_suspended.value + @property def serial_number(self): - """The serial number of the device. + """The [serial number](../provisioning-process/provisioning- + information.html#serial-number) of the device. The serial number is injected + by the factory tool during manufacturing. api example: '00000000-0000-0000-0000-000000000000' @@ -731,6 +918,19 @@ def serial_number(self, value): @property def state(self): """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](../service-api-references/device-management- + connect.html#createAsyncRequest) can be queued. The device sends events for + [subscribed](../connecting/resource-change-webapp.html) resources. + * Deregistered: The device has requested deregistration, or its registration + has expired. :rtype: str """ @@ -747,9 +947,18 @@ def state(self, value): self._state.set(value) + @property + def system_suspended(self): + """Is the device suspended by the system? + + :rtype: bool + """ + + return self._system_suspended.value + @property def updated_at(self): - """The time the object was updated. + """The time this data object was updated. api example: '2017-05-22T12:37:55.576563Z' @@ -780,7 +989,7 @@ def vendor_id(self, value): self._vendor_id.set(value) def add_to_group(self, device_group_id): - """Add a device to a group + """Add a device to a group. `REST API Documentation `_. @@ -800,13 +1009,13 @@ def add_to_group(self, device_group_id): method="post", path="/v3/device-groups/{device-group-id}/devices/add/", content_type="application/json", - path_params={"device-group-id": fields.StringField(device_group_id).to_api()}, + path_params={"device-group-id": fields.StringField(device_group_id).to_api(),}, body_params=body_params, unpack=self, ) def create(self): - """Create a device + """Create a device. `REST API Documentation `_. @@ -860,7 +1069,7 @@ def create(self): body_params["vendor_id"] = self._vendor_id.to_api() return self._client.call_api( - method="post", path="/v3/devices/", content_type="application/json", body_params=body_params, unpack=self + method="post", path="/v3/devices/", content_type="application/json", body_params=body_params, unpack=self, ) def delete(self): @@ -875,7 +1084,7 @@ def delete(self): method="delete", path="/v3/devices/{id}/", content_type="application/json", - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) @@ -888,65 +1097,79 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ The following filters are supported by the API when listing Device entities: - +---------------------------+------+------+------+------+------+------+------+ - | Field | eq | neq | gte | lte | in | nin | like | - +===========================+======+======+======+======+======+======+======+ - | account_id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | auto_update | Y | Y | | | | | | - +---------------------------+------+------+------+------+------+------+------+ - | bootstrap_expiration_date | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | bootstrapped_timestamp | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | ca_id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | connector_expiration_date | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | created_at | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | deployed_state | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | deployment | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | description | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | device_class | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | device_execution_mode | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | device_key | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | endpoint_name | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | endpoint_type | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | enrolment_list_timestamp | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | firmware_checksum | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | host_gateway | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | manifest | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | manifest_timestamp | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | mechanism | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | mechanism_url | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | name | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | serial_number | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | state | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | updated_at | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | vendor_id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ + +------------------------------------+------+------+------+------+------+------+------+ + | Field | eq | neq | gte | lte | in | nin | like | + +====================================+======+======+======+======+======+======+======+ + | account_id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | auto_update | Y | Y | | | | | | + +------------------------------------+------+------+------+------+------+------+------+ + | bootstrap_expiration_date | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | bootstrapped_timestamp | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | ca_id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | connector_expiration_date | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | created_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | deployed_state | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | deployment | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | description | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | device_class | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | device_execution_mode | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | device_key | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | endpoint_name | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | endpoint_type | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | enrolment_list_timestamp | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | firmware_checksum | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | host_gateway | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_operator_suspended_category | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_operator_suspended_updated_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_system_suspended_category | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_system_suspended_updated_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | lifecycle_status | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | manifest | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | manifest_timestamp | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | mechanism | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | mechanism_url | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | name | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | operator_suspended | Y | Y | | | | | | + +------------------------------------+------+------+------+------+------+------+------+ + | serial_number | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | state | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | system_suspended | Y | Y | | | | | | + +------------------------------------+------+------+------+------+------+------+------+ + | updated_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | vendor_id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ **Example Usage** @@ -964,16 +1187,14 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str :param max_results: Total maximum number of results to retrieve :type max_results: int - :param page_size: 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. + :param page_size: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type page_size: int :param include: Comma-separated list of data fields to return. Currently supported: @@ -1014,19 +1235,17 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): """List all devices. - :param after: The ID of The item after which to retrieve the next page. + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str - :param 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. + :param limit: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type limit: int :param include: Comma-separated list of data fields to return. Currently supported: @@ -1045,11 +1264,11 @@ def _paginate_list(self, after=None, filter=None, order=None, limit=None, includ query_params["include"] = fields.StringField(include).to_api() return self._client.call_api( - method="get", path="/v3/devices/", content_type="application/json", query_params=query_params, unpack=False + method="get", path="/v3/devices/", content_type="application/json", query_params=query_params, unpack=False, ) def read(self): - """Get a device + """Get a device. `REST API Documentation `_. @@ -1060,12 +1279,12 @@ def read(self): method="get", path="/v3/devices/{id}/", content_type="application/json", - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) def remove_from_group(self, device_group_id): - """Remove a device from a group + """Remove a device from a group. `REST API Documentation `_. @@ -1085,7 +1304,7 @@ def remove_from_group(self, device_group_id): method="post", path="/v3/device-groups/{device-group-id}/devices/remove/", content_type="application/json", - path_params={"device-group-id": fields.StringField(device_group_id).to_api()}, + path_params={"device-group-id": fields.StringField(device_group_id).to_api(),}, body_params=body_params, unpack=self, ) @@ -1115,7 +1334,7 @@ def renew_certificate(self, certificate_name): ) def update(self): - """Update a device + """Update a device. `REST API Documentation `_. @@ -1149,6 +1368,6 @@ def update(self): path="/v3/devices/{id}/", content_type="application/json", body_params=body_params, - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device_enrollment.py b/src/mbed_cloud/foundation/entities/devices/device_enrollment.py index b7ee2a38..d2881f3d 100644 --- a/src/mbed_cloud/foundation/entities/devices/device_enrollment.py +++ b/src/mbed_cloud/foundation/entities/devices/device_enrollment.py @@ -252,7 +252,7 @@ def delete(self): method="delete", path="/v3/device-enrollments/{id}", content_type="application/json", - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) @@ -359,6 +359,6 @@ def read(self): method="get", path="/v3/device-enrollments/{id}", content_type="application/json", - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_create.py b/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_create.py index 3a7b87ac..39bb6800 100644 --- a/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_create.py +++ b/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_create.py @@ -99,20 +99,17 @@ def __init__( :param account_id: ID :type account_id: str :param completed_at: The time the bulk creation task was completed. - Null when creating - bulk upload or delete. + Null when creating bulk upload or delete. :type completed_at: datetime :param created_at: The time of receiving the bulk creation task. :type created_at: datetime :param errors_count: The number of enrollment identities with failed processing. :type errors_count: int :param errors_report_file: Link to error report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type errors_report_file: str :param full_report_file: Link to full report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type full_report_file: str :param id: (Required) Bulk ID :type id: str @@ -157,8 +154,7 @@ def account_id(self): @property def completed_at(self): """The time the bulk creation task was completed. - Null when creating bulk upload - or delete. + Null when creating bulk upload or delete. :rtype: datetime """ @@ -289,7 +285,7 @@ def create(self, enrollment_identities): method="post", path="/v3/device-enrollments-bulk-uploads", stream_params={ - "enrollment_identities": ("enrollment_identities.csv", enrollment_identities, "text/csv") + "enrollment_identities": ("enrollment_identities.csv", enrollment_identities, "text/csv"), }, unpack=self, ) @@ -331,6 +327,6 @@ def read(self): method="get", path="/v3/device-enrollments-bulk-uploads/{id}", content_type="application/json", - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_delete.py b/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_delete.py index 1078bdb1..a804a21a 100644 --- a/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_delete.py +++ b/src/mbed_cloud/foundation/entities/devices/device_enrollment_bulk_delete.py @@ -99,20 +99,17 @@ def __init__( :param account_id: ID :type account_id: str :param completed_at: The time the bulk creation task was completed. - Null when creating - bulk upload or delete. + Null when creating bulk upload or delete. :type completed_at: datetime :param created_at: The time of receiving the bulk creation task. :type created_at: datetime :param errors_count: The number of enrollment identities with failed processing. :type errors_count: int :param errors_report_file: Link to error report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type errors_report_file: str :param full_report_file: Link to full report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type full_report_file: str :param id: (Required) Bulk ID :type id: str @@ -157,8 +154,7 @@ def account_id(self): @property def completed_at(self): """The time the bulk creation task was completed. - Null when creating bulk upload - or delete. + Null when creating bulk upload or delete. :rtype: datetime """ @@ -289,7 +285,7 @@ def delete(self, enrollment_identities): method="post", path="/v3/device-enrollments-bulk-deletes", stream_params={ - "enrollment_identities": ("enrollment_identities.csv", enrollment_identities, "text/csv") + "enrollment_identities": ("enrollment_identities.csv", enrollment_identities, "text/csv"), }, unpack=self, ) @@ -331,6 +327,6 @@ def read(self): method="get", path="/v3/device-enrollments-bulk-deletes/{id}", content_type="application/json", - path_params={"id": self._id.to_api()}, + path_params={"id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device_enrollment_denial.py b/src/mbed_cloud/foundation/entities/devices/device_enrollment_denial.py index 2707c1af..8a845934 100644 --- a/src/mbed_cloud/foundation/entities/devices/device_enrollment_denial.py +++ b/src/mbed_cloud/foundation/entities/devices/device_enrollment_denial.py @@ -60,7 +60,7 @@ class DeviceEnrollmentDenial(Entity): _renames_to_api = {} def __init__( - self, _client=None, account_id=None, created_at=None, endpoint_name=None, id=None, trusted_certificate_id=None + self, _client=None, account_id=None, created_at=None, endpoint_name=None, id=None, trusted_certificate_id=None, ): """Creates a local `DeviceEnrollmentDenial` instance @@ -277,6 +277,6 @@ def read(self, device_enrollment_denial_id): method="get", path="/v3/device-enrollment-denials/{device_enrollment_denial_id}", content_type="application/json", - path_params={"device_enrollment_denial_id": fields.StringField(device_enrollment_denial_id).to_api()}, + path_params={"device_enrollment_denial_id": fields.StringField(device_enrollment_denial_id).to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device_events.py b/src/mbed_cloud/foundation/entities/devices/device_events.py index 09c4b3c2..99fd681d 100644 --- a/src/mbed_cloud/foundation/entities/devices/device_events.py +++ b/src/mbed_cloud/foundation/entities/devices/device_events.py @@ -109,9 +109,9 @@ def __init__( :type device_id: str :param event_type: Event code :type event_type: str - :param event_type_category: Category code which groups the event type by a summary category. + :param event_type_category: Category code that groups the event type by a summary category. :type event_type_category: str - :param event_type_description: Generic description of the event + :param event_type_description: Generic description of the event. :type event_type_description: str :param id: (Required) :type id: str @@ -213,7 +213,7 @@ def event_type(self): @property def event_type_category(self): - """Category code which groups the event type by a summary category. + """Category code that groups the event type by a summary category. api example: 'FAIL_MANIFEST_REJECTED' @@ -224,7 +224,7 @@ def event_type_category(self): @property def event_type_description(self): - """Generic description of the event + """Generic description of the event. api example: 'FAIL' @@ -306,20 +306,18 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str :param max_results: Total maximum number of results to retrieve :type max_results: int - :param page_size: 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. + :param page_size: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type page_size: int :param include: Comma-separated list of data fields to return. Currently supported: - `total_count` + `total_count`. :type include: str :return: An iterator object which yields instances of an entity. @@ -356,23 +354,21 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): """List all device events. - :param after: The ID of The item after which to retrieve the next page. + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str - :param 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. + :param limit: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type limit: int :param include: Comma-separated list of data fields to return. Currently supported: - `total_count` + `total_count`. :type include: str :rtype: mbed_cloud.pagination.PaginatedResponse @@ -406,6 +402,6 @@ def read(self): method="get", path="/v3/device-events/{device_event_id}/", content_type="application/json", - path_params={"device_event_id": self._id.to_api()}, + path_params={"device_event_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/device_group.py b/src/mbed_cloud/foundation/entities/devices/device_group.py index 9a001ff3..c2b8ed68 100644 --- a/src/mbed_cloud/foundation/entities/devices/device_group.py +++ b/src/mbed_cloud/foundation/entities/devices/device_group.py @@ -85,11 +85,11 @@ def __init__( on the entity. For details on when they are required please see the documentation for the setter method. - :param created_at: The time the campaign was created. + :param created_at: The time the group was created. :type created_at: datetime - :param custom_attributes: 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 custom_attributes: 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. :type custom_attributes: dict :param description: The description of the group. :type description: str @@ -99,7 +99,7 @@ def __init__( :type id: str :param name: Name of the group. :type name: str - :param updated_at: The time the object was updated. + :param updated_at: The time this object was updated. :type updated_at: datetime """ @@ -118,7 +118,7 @@ def __init__( @property def created_at(self): - """The time the campaign was created. + """The time the group was created. api example: '2017-05-22T12:37:55.576563Z' @@ -129,9 +129,9 @@ def created_at(self): @property def custom_attributes(self): - """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. + """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. api example: {'key': 'value'} @@ -228,7 +228,7 @@ def name(self, value): @property def updated_at(self): - """The time the object was updated. + """The time this object was updated. api example: '2017-05-22T12:37:55.576563Z' @@ -238,7 +238,7 @@ def updated_at(self): return self._updated_at.value def add_device(self, device_id=None): - """Add a device to a group + """Add a device to a group. `REST API Documentation `_. @@ -259,12 +259,12 @@ def add_device(self, device_id=None): path="/v3/device-groups/{device-group-id}/devices/add/", content_type="application/json", body_params=body_params, - path_params={"device-group-id": self._id.to_api()}, + path_params={"device-group-id": self._id.to_api(),}, unpack=self, ) def create(self): - """Create a group + """Create a group. `REST API Documentation `_. @@ -290,7 +290,7 @@ def create(self): ) def delete(self): - """Delete a group + """Delete a group. `REST API Documentation `_. @@ -301,12 +301,12 @@ def delete(self): method="delete", path="/v3/device-groups/{device-group-id}/", content_type="application/json", - path_params={"device-group-id": self._id.to_api()}, + path_params={"device-group-id": self._id.to_api(),}, unpack=self, ) def devices(self, filter=None, order=None, max_results=None, page_size=None, include=None): - """Get a page of devices + """Get a page of devices. `REST API Documentation `_. @@ -314,65 +314,79 @@ def devices(self, filter=None, order=None, max_results=None, page_size=None, inc The following filters are supported by the API when listing DeviceGroup entities: - +---------------------------+------+------+------+------+------+------+------+ - | Field | eq | neq | gte | lte | in | nin | like | - +===========================+======+======+======+======+======+======+======+ - | account_id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | auto_update | Y | Y | | | | | | - +---------------------------+------+------+------+------+------+------+------+ - | bootstrap_expiration_date | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | bootstrapped_timestamp | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | ca_id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | connector_expiration_date | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | created_at | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | deployed_state | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | deployment | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | description | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | device_class | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | device_execution_mode | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | device_key | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | endpoint_name | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | endpoint_type | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | enrolment_list_timestamp | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | firmware_checksum | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | host_gateway | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | manifest | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | manifest_timestamp | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | mechanism | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | mechanism_url | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | name | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | serial_number | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | state | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | updated_at | | | Y | Y | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ - | vendor_id | Y | Y | | | Y | Y | | - +---------------------------+------+------+------+------+------+------+------+ + +------------------------------------+------+------+------+------+------+------+------+ + | Field | eq | neq | gte | lte | in | nin | like | + +====================================+======+======+======+======+======+======+======+ + | account_id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | auto_update | Y | Y | | | | | | + +------------------------------------+------+------+------+------+------+------+------+ + | bootstrap_expiration_date | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | bootstrapped_timestamp | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | ca_id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | connector_expiration_date | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | created_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | deployed_state | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | deployment | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | description | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | device_class | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | device_execution_mode | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | device_key | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | endpoint_name | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | endpoint_type | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | enrolment_list_timestamp | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | firmware_checksum | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | host_gateway | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_operator_suspended_category | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_operator_suspended_updated_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_system_suspended_category | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | last_system_suspended_updated_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | lifecycle_status | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | manifest | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | manifest_timestamp | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | mechanism | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | mechanism_url | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | name | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | operator_suspended | Y | Y | | | | | | + +------------------------------------+------+------+------+------+------+------+------+ + | serial_number | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | state | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | system_suspended | Y | Y | | | | | | + +------------------------------------+------+------+------+------+------+------+------+ + | updated_at | | | Y | Y | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ + | vendor_id | Y | Y | | | Y | Y | | + +------------------------------------+------+------+------+------+------+------+------+ **Example Usage** @@ -390,16 +404,14 @@ def devices(self, filter=None, order=None, max_results=None, page_size=None, inc above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str :param max_results: Total maximum number of results to retrieve :type max_results: int - :param page_size: 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. + :param page_size: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type page_size: int :param include: Comma-separated list of data fields to return. Currently supported: @@ -476,16 +488,14 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ above **API Filters** table for supported filters. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str :param max_results: Total maximum number of results to retrieve :type max_results: int - :param page_size: 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. + :param page_size: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type page_size: int :param include: Comma-separated list of data fields to return. Currently supported: @@ -524,21 +534,19 @@ def list(self, filter=None, order=None, max_results=None, page_size=None, includ ) def _paginate_devices(self, after=None, filter=None, order=None, limit=None, include=None): - """Get a page of devices + """Get a page of devices. - :param after: The ID of The item after which to retrieve the next page. + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str - :param 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. + :param limit: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type limit: int :param include: Comma-separated list of data fields to return. Currently supported: @@ -561,26 +569,24 @@ def _paginate_devices(self, after=None, filter=None, order=None, limit=None, inc path="/v3/device-groups/{device-group-id}/devices/", content_type="application/json", query_params=query_params, - path_params={"device-group-id": self._id.to_api()}, + path_params={"device-group-id": self._id.to_api(),}, unpack=False, ) def _paginate_list(self, after=None, filter=None, order=None, limit=None, include=None): """List all groups. - :param after: The ID of The item after which to retrieve the next page. + :param after: The ID of the item after which to retrieve the next page. :type after: str :param filter: Optional API filter for listing resources. :type filter: mbed_cloud.client.api_filter.ApiFilter - :param order: The order of the records based on creation time, `ASC` or `DESC`; by - default `ASC`. + :param order: Record order. Acceptable values: ASC, DESC. Default: ASC. :type order: str - :param 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. + :param limit: How many objects to retrieve in the page (2-1000). Limit values + outside of this range are set to the closest limit. :type limit: int :param include: Comma-separated list of data fields to return. Currently supported: @@ -618,12 +624,12 @@ def read(self): method="get", path="/v3/device-groups/{device-group-id}/", content_type="application/json", - path_params={"device-group-id": self._id.to_api()}, + path_params={"device-group-id": self._id.to_api(),}, unpack=self, ) def remove_device(self, device_id=None): - """Remove a device from a group + """Remove a device from a group. `REST API Documentation `_. @@ -644,7 +650,7 @@ def remove_device(self, device_id=None): path="/v3/device-groups/{device-group-id}/devices/remove/", content_type="application/json", body_params=body_params, - path_params={"device-group-id": self._id.to_api()}, + path_params={"device-group-id": self._id.to_api(),}, unpack=self, ) @@ -671,6 +677,6 @@ def update(self): path="/v3/device-groups/{device-group-id}/", content_type="application/json", body_params=body_params, - path_params={"device-group-id": self._id.to_api()}, + path_params={"device-group-id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/devices/enums.py b/src/mbed_cloud/foundation/entities/devices/enums.py index 554e2dae..7f135311 100644 --- a/src/mbed_cloud/foundation/entities/devices/enums.py +++ b/src/mbed_cloud/foundation/entities/devices/enums.py @@ -13,6 +13,7 @@ - :class:`DeviceEnrollmentBulkDeleteStatusEnum` - :class:`DeviceEnrollmentDenialOrderEnum` - :class:`DeviceEnrollmentOrderEnum` +- :class:`DeviceLifecycleStatusEnum` - :class:`DeviceMechanismEnum` - :class:`DeviceStateEnum` @@ -27,6 +28,7 @@ from mbed_cloud.foundation.enums import DeviceEnrollmentBulkDeleteStatusEnum from mbed_cloud.foundation.enums import DeviceEnrollmentDenialOrderEnum from mbed_cloud.foundation.enums import DeviceEnrollmentOrderEnum + from mbed_cloud.foundation.enums import DeviceLifecycleStatusEnum from mbed_cloud.foundation.enums import DeviceMechanismEnum from mbed_cloud.foundation.enums import DeviceStateEnum @@ -54,7 +56,7 @@ class DeviceDeployedStateEnum(BaseEnum): DEVELOPMENT = "development" PRODUCTION = "production" - values = frozenset(("development", "production")) + values = frozenset(("development", "production",)) class DeviceEnrollmentBulkCreateStatusEnum(BaseEnum): @@ -71,7 +73,7 @@ class DeviceEnrollmentBulkCreateStatusEnum(BaseEnum): NEW = "new" PROCESSING = "processing" - values = frozenset(("completed", "new", "processing")) + values = frozenset(("completed", "new", "processing",)) class DeviceEnrollmentBulkDeleteStatusEnum(BaseEnum): @@ -88,7 +90,7 @@ class DeviceEnrollmentBulkDeleteStatusEnum(BaseEnum): NEW = "new" PROCESSING = "processing" - values = frozenset(("completed", "new", "processing")) + values = frozenset(("completed", "new", "processing",)) class DeviceEnrollmentDenialOrderEnum(BaseEnum): @@ -104,7 +106,7 @@ class DeviceEnrollmentDenialOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class DeviceEnrollmentOrderEnum(BaseEnum): @@ -120,7 +122,23 @@ class DeviceEnrollmentOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) + + +class DeviceLifecycleStatusEnum(BaseEnum): + """Represents expected values of `DeviceLifecycleStatusEnum` + + This is used by Entities in the "devices" category. + + .. note:: + If new values are added to the enum in the API they will be passed through unchanged by the SDK, + but will not be on this list. If this occurs please update the SDK to the most recent version. + """ + + BLOCKED = "blocked" + ENABLED = "enabled" + + values = frozenset(("blocked", "enabled",)) class DeviceMechanismEnum(BaseEnum): @@ -136,7 +154,7 @@ class DeviceMechanismEnum(BaseEnum): CONNECTOR = "connector" DIRECT = "direct" - values = frozenset(("connector", "direct")) + values = frozenset(("connector", "direct",)) class DeviceStateEnum(BaseEnum): @@ -155,4 +173,4 @@ class DeviceStateEnum(BaseEnum): REGISTERED = "registered" UNENROLLED = "unenrolled" - values = frozenset(("bootstrapped", "cloud_enrolling", "deregistered", "registered", "unenrolled")) + values = frozenset(("bootstrapped", "cloud_enrolling", "deregistered", "registered", "unenrolled",)) diff --git a/src/mbed_cloud/foundation/entities/entity_factory.py b/src/mbed_cloud/foundation/entities/entity_factory.py index 5e9bcb32..97d65ff3 100644 --- a/src/mbed_cloud/foundation/entities/entity_factory.py +++ b/src/mbed_cloud/foundation/entities/entity_factory.py @@ -26,20 +26,28 @@ - :meth:`EntityFactory.device_group` - :meth:`EntityFactory.firmware_image` - :meth:`EntityFactory.firmware_manifest` +- :meth:`EntityFactory.identity_provider` +- :meth:`EntityFactory.identity_provider_public_key` - :meth:`EntityFactory.light_theme_color` - :meth:`EntityFactory.light_theme_image` - :meth:`EntityFactory.login_history` - :meth:`EntityFactory.login_profile` +- :meth:`EntityFactory.oidc_request` +- :meth:`EntityFactory.oidc_request_claim_mapping` - :meth:`EntityFactory.parent_account` - :meth:`EntityFactory.password_policy` - :meth:`EntityFactory.policy` +- :meth:`EntityFactory.policy_group` - :meth:`EntityFactory.pre_shared_key` +- :meth:`EntityFactory.saml2_request` - :meth:`EntityFactory.server_credentials` - :meth:`EntityFactory.subtenant_api_key` - :meth:`EntityFactory.subtenant_dark_theme_color` - :meth:`EntityFactory.subtenant_dark_theme_image` +- :meth:`EntityFactory.subtenant_identity_provider` - :meth:`EntityFactory.subtenant_light_theme_color` - :meth:`EntityFactory.subtenant_light_theme_image` +- :meth:`EntityFactory.subtenant_policy_group` - :meth:`EntityFactory.subtenant_trusted_certificate` - :meth:`EntityFactory.subtenant_user` - :meth:`EntityFactory.subtenant_user_invitation` @@ -75,6 +83,8 @@ def account( admin_name=None, admin_password=None, aliases=None, + business_model=None, + business_model_history=None, city=None, company=None, contact=None, @@ -90,6 +100,7 @@ def account( expiration_warning_threshold=None, id=None, idle_timeout=None, + limitations=None, limits=None, mfa_status=None, notification_emails=None, @@ -107,6 +118,7 @@ def account( status=None, template_id=None, tier=None, + tier_history=None, updated_at=None, upgraded_at=None, ): @@ -122,7 +134,8 @@ def account( :param admin_full_name: The full name of the admin user created for this account. Present only in the response for account creation. :type admin_full_name: str - :param admin_id: The ID of the admin user created for this account. + :param admin_id: The ID of the admin user created for this account. Present only in + the response for the account creation. :type admin_id: str :param admin_key: The admin API key created for this account. Present only in the response for account creation. @@ -135,6 +148,11 @@ def account( :type admin_password: str :param aliases: An array of aliases. :type aliases: list + :param business_model: Business model for this account. Manageable by the root admin + only. + :type business_model: str + :param business_model_history: Business model history for this account. + :type business_model_history: list :param city: The city part of the postal address. :type city: str :param company: The name of the company. @@ -166,6 +184,8 @@ def account( :type id: str :param idle_timeout: The reference token expiration time, in minutes, for this account. :type idle_timeout: int + :param limitations: List of account limitation objects. + :type limitations: list :param limits: List of limits as key-value pairs if requested. :type limits: dict :param mfa_status: The enforcement status of multi-factor authentication, either @@ -203,6 +223,8 @@ def account( account, `2`: partner tier. Other values are reserved for the future. :type tier: str + :param tier_history: Tier history for this account. + :type tier_history: list :param updated_at: Last update UTC time RFC3339. :type updated_at: datetime :param upgraded_at: Time when upgraded to commercial account in UTC format RFC3339. @@ -224,6 +246,8 @@ def account( admin_name=admin_name, admin_password=admin_password, aliases=aliases, + business_model=business_model, + business_model_history=business_model_history, city=city, company=company, contact=contact, @@ -239,6 +263,7 @@ def account( expiration_warning_threshold=expiration_warning_threshold, id=id, idle_timeout=idle_timeout, + limitations=limitations, limits=limits, mfa_status=mfa_status, notification_emails=notification_emails, @@ -256,15 +281,20 @@ def account( status=status, template_id=template_id, tier=tier, + tier_history=tier_history, updated_at=updated_at, upgraded_at=upgraded_at, ) - def active_session(self, account_id=None, ip_address=None, login_time=None, reference_token=None, user_agent=None): + def active_session( + self, account_id=None, created_at=None, ip_address=None, login_time=None, reference_token=None, user_agent=None, + ): """Creates a local `ActiveSession` instance, using the shared SDK context. :param account_id: The UUID of the account. :type account_id: str + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime :param ip_address: IP address of the client. :type ip_address: str :param login_time: The login time of the user. @@ -282,6 +312,7 @@ def active_session(self, account_id=None, ip_address=None, login_time=None, refe return ActiveSession( _client=self._client, account_id=account_id, + created_at=created_at, ip_address=ip_address, login_time=login_time, reference_token=reference_token, @@ -293,6 +324,7 @@ def api_key( account_id=None, created_at=None, creation_time=None, + groups=None, id=None, key=None, last_login_time=None, @@ -310,6 +342,8 @@ def api_key( :param creation_time: The timestamp of the API key creation in the storage, in milliseconds. :type creation_time: int + :param groups: A list of group IDs this API key belongs to. + :type groups: list :param id: The ID of the API key. :type id: str :param key: The API key. @@ -335,6 +369,7 @@ def api_key( account_id=account_id, created_at=created_at, creation_time=creation_time, + groups=groups, id=id, key=key, last_login_time=last_login_time, @@ -359,25 +394,25 @@ def campaign_device_metadata( ): """Creates a local `CampaignDeviceMetadata` instance, using the shared SDK context. - :param campaign_id: The device's campaign ID + :param campaign_id: The device's campaign ID. :type campaign_id: str - :param created_at: The time the campaign was created + :param created_at: The time the entity was created. :type created_at: datetime - :param deployment_state: The state of the update campaign on the device + :param deployment_state: The state of the update campaign on the device. :type deployment_state: str - :param description: Description + :param description: Description. :type description: str - :param device_id: The device ID + :param device_id: The device ID. :type device_id: str - :param id: The metadata record ID + :param id: The metadata record ID. :type id: str - :param mechanism: How the firmware is delivered (connector or direct) + :param mechanism: How the firmware is delivered (connector or direct). :type mechanism: str - :param mechanism_url: The Device Management Connect URL + :param mechanism_url: The Device Management Connect URL. :type mechanism_url: str - :param name: The record name + :param name: The record name. :type name: str - :param updated_at: The record was modified in the database format: date-time + :param updated_at: The time the entity was updated. :type updated_at: datetime :return: A new instance of a CampaignDeviceMetadata Foundation Entity. @@ -399,7 +434,9 @@ def campaign_device_metadata( updated_at=updated_at, ) - def campaign_statistics(self, campaign_id=None, count=None, created_at=None, id=None, summary_status=None): + def campaign_statistics( + self, campaign_id=None, count=None, created_at=None, id=None, summary_status=None, + ): """Creates a local `CampaignStatistics` instance, using the shared SDK context. :param campaign_id: ID of the associated campaign. @@ -408,7 +445,7 @@ def campaign_statistics(self, campaign_id=None, count=None, created_at=None, id= :type count: int :param created_at: :type created_at: datetime - :param id: ID of the event type description + :param id: ID of the event type description. :type id: str :param summary_status: The event type description. :type summary_status: str @@ -522,7 +559,7 @@ def certificate_enrollment( ) def certificate_issuer( - self, created_at=None, description=None, id=None, issuer_attributes=None, issuer_type=None, name=None + self, created_at=None, description=None, id=None, issuer_attributes=None, issuer_type=None, name=None, ): """Creates a local `CertificateIssuer` instance, using the shared SDK context. @@ -533,21 +570,17 @@ def certificate_issuer( :param id: The ID of the certificate issuer. :type id: str :param issuer_attributes: 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 shall be empty. + When the issuer_type is CFSSL_AUTH, see definition of + CfsslAttributes. :type issuer_attributes: dict :param issuer_type: The type of the certificate issuer. - GLOBAL_SIGN: - Certificates - are issued by GlobalSign service. The users must provide their own - GlobalSign account credentials. + 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. + Certificates are issued by CFSSL authenticated signing service. + The users must provide their own CFSSL host_url and credentials. :type issuer_type: str :param name: Certificate issuer name, unique per account. :type name: str @@ -568,13 +601,12 @@ def certificate_issuer( ) def certificate_issuer_config( - self, certificate_issuer_id=None, created_at=None, id=None, reference=None, updated_at=None + self, certificate_issuer_id=None, created_at=None, id=None, reference=None, updated_at=None, ): """Creates a local `CertificateIssuerConfig` instance, using the shared SDK context. :param certificate_issuer_id: The ID of the certificate issuer. - Null if Device Management - internal HSM is used. + Null if Device Management internal HSM is used. :type certificate_issuer_id: str :param created_at: Created UTC time RFC3339. :type created_at: datetime @@ -600,7 +632,9 @@ def certificate_issuer_config( updated_at=updated_at, ) - def dark_theme_color(self, color=None, reference=None, updated_at=None): + def dark_theme_color( + self, color=None, reference=None, updated_at=None, + ): """Creates a local `DarkThemeColor` instance, using the shared SDK context. :param color: The color given as name (purple) or as a hex code. @@ -615,9 +649,11 @@ def dark_theme_color(self, color=None, reference=None, updated_at=None): """ from mbed_cloud.foundation import DarkThemeColor - return DarkThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at) + return DarkThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at,) - def dark_theme_image(self, reference=None, static_uri=None, updated_at=None): + def dark_theme_image( + self, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `DarkThemeImage` instance, using the shared SDK context. :param reference: Name of the image. @@ -632,7 +668,7 @@ def dark_theme_image(self, reference=None, static_uri=None, updated_at=None): """ from mbed_cloud.foundation import DarkThemeImage - return DarkThemeImage(_client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at) + return DarkThemeImage(_client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at,) def developer_certificate( self, @@ -702,16 +738,26 @@ def device( endpoint_type=None, enrolment_list_timestamp=None, firmware_checksum=None, + groups=None, host_gateway=None, id=None, issuer_fingerprint=None, + last_operator_suspended_category=None, + last_operator_suspended_description=None, + last_operator_suspended_updated_at=None, + last_system_suspended_category=None, + last_system_suspended_description=None, + last_system_suspended_updated_at=None, + lifecycle_status=None, manifest=None, manifest_timestamp=None, mechanism=None, mechanism_url=None, name=None, + operator_suspended=None, serial_number=None, state=None, + system_suspended=None, updated_at=None, vendor_id=None, ): @@ -749,15 +795,18 @@ def device( :param device_execution_mode: 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) - - 1 - development devices - - 5 - production devices + - 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. :type device_execution_mode: int :param device_key: The fingerprint of the device certificate. :type device_key: str - :param endpoint_name: The endpoint name given to the device. + :param endpoint_name: The endpoint name given to the device. The endpoint_name is from + the device certificate and is set by factory tool. :type endpoint_name: str :param endpoint_type: The endpoint type of the device. For example, the device is a gateway. @@ -766,7 +815,10 @@ def device( :type enrolment_list_timestamp: datetime :param firmware_checksum: The SHA256 checksum of the current firmware image. :type firmware_checksum: str - :param host_gateway: The ID of the host gateway, if appropriate. + :param groups: An array containing an ID of each group this device belongs to. + :type groups: list + :param host_gateway: The ID of the host gateway, if appropriate. A device behind Edge + has this host_gateway set. :type host_gateway: str :param id: The ID of the device. The device ID is used across all Device Management APIs. @@ -774,21 +826,64 @@ def device( :param issuer_fingerprint: SHA256 fingerprint of the certificate used to validate the signature of the device certificate. :type issuer_fingerprint: str + :param last_operator_suspended_category: The reference of the block category. + :type last_operator_suspended_category: str + :param last_operator_suspended_description: The most recent description why the device was suspended or + returned to service. + :type last_operator_suspended_description: str + :param last_operator_suspended_updated_at: The timestamp of the most recent suspension activity. + :type last_operator_suspended_updated_at: datetime + :param last_system_suspended_category: The reference of the block category. + :type last_system_suspended_category: str + :param last_system_suspended_description: The most recent description of why the device was blocked or + unblocked by the system. + :type last_system_suspended_description: str + :param last_system_suspended_updated_at: The timestamp of the most recent system block activity. + :type last_system_suspended_updated_at: datetime + :param lifecycle_status: 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'. + :type lifecycle_status: str :param manifest: DEPRECATED: The URL for the current device manifest. :type manifest: str :param manifest_timestamp: The timestamp of the current manifest version. :type manifest_timestamp: datetime - :param mechanism: The ID of the channel used to communicate with the device. + :param mechanism: NOT USED: The ID of the channel used to communicate with the + device. :type mechanism: str - :param mechanism_url: The address of the connector to use. + :param mechanism_url: NOT USED: The address of the connector to use. :type mechanism_url: str - :param name: The name of the device. + :param name: The name given by the web application for the device. Device + itself provides only the endpoint_name. :type name: str - :param serial_number: The serial number of the device. + :param operator_suspended: Device has been suspended by operator. + :type operator_suspended: bool + :param serial_number: The [serial number](../provisioning-process/provisioning- + information.html#serial-number) of the device. The serial number + is injected by the factory tool during manufacturing. :type serial_number: str :param state: 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](../service-api-references/device- + management-connect.html#createAsyncRequest) can be queued. The + device sends events for [subscribed](../connecting/resource- + change-webapp.html) resources. + * Deregistered: The device has requested deregistration, or its + registration has expired. :type state: str - :param updated_at: The time the object was updated. + :param system_suspended: Is the device suspended by the system? + :type system_suspended: bool + :param updated_at: The time this data object was updated. :type updated_at: datetime :param vendor_id: The device vendor ID. :type vendor_id: str @@ -818,16 +913,26 @@ def device( endpoint_type=endpoint_type, enrolment_list_timestamp=enrolment_list_timestamp, firmware_checksum=firmware_checksum, + groups=groups, host_gateway=host_gateway, id=id, issuer_fingerprint=issuer_fingerprint, + last_operator_suspended_category=last_operator_suspended_category, + last_operator_suspended_description=last_operator_suspended_description, + last_operator_suspended_updated_at=last_operator_suspended_updated_at, + last_system_suspended_category=last_system_suspended_category, + last_system_suspended_description=last_system_suspended_description, + last_system_suspended_updated_at=last_system_suspended_updated_at, + lifecycle_status=lifecycle_status, manifest=manifest, manifest_timestamp=manifest_timestamp, mechanism=mechanism, mechanism_url=mechanism_url, name=name, + operator_suspended=operator_suspended, serial_number=serial_number, state=state, + system_suspended=system_suspended, updated_at=updated_at, vendor_id=vendor_id, ) @@ -896,20 +1001,17 @@ def device_enrollment_bulk_create( :param account_id: ID :type account_id: str :param completed_at: The time the bulk creation task was completed. - Null when creating - bulk upload or delete. + Null when creating bulk upload or delete. :type completed_at: datetime :param created_at: The time of receiving the bulk creation task. :type created_at: datetime :param errors_count: The number of enrollment identities with failed processing. :type errors_count: int :param errors_report_file: Link to error report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type errors_report_file: str :param full_report_file: Link to full report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type full_report_file: str :param id: Bulk ID :type id: str @@ -960,20 +1062,17 @@ def device_enrollment_bulk_delete( :param account_id: ID :type account_id: str :param completed_at: The time the bulk creation task was completed. - Null when creating - bulk upload or delete. + Null when creating bulk upload or delete. :type completed_at: datetime :param created_at: The time of receiving the bulk creation task. :type created_at: datetime :param errors_count: The number of enrollment identities with failed processing. :type errors_count: int :param errors_report_file: Link to error report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type errors_report_file: str :param full_report_file: Link to full report file. - Null when creating bulk upload or - delete. + Null when creating bulk upload or delete. :type full_report_file: str :param id: Bulk ID :type id: str @@ -1007,7 +1106,7 @@ def device_enrollment_bulk_delete( ) def device_enrollment_denial( - self, account_id=None, created_at=None, endpoint_name=None, id=None, trusted_certificate_id=None + self, account_id=None, created_at=None, endpoint_name=None, id=None, trusted_certificate_id=None, ): """Creates a local `DeviceEnrollmentDenial` instance, using the shared SDK context. @@ -1066,9 +1165,9 @@ def device_events( :type device_id: str :param event_type: Event code :type event_type: str - :param event_type_category: Category code which groups the event type by a summary category. + :param event_type_category: Category code that groups the event type by a summary category. :type event_type_category: str - :param event_type_description: Generic description of the event + :param event_type_description: Generic description of the event. :type event_type_description: str :param id: :type id: str @@ -1107,11 +1206,11 @@ def device_group( ): """Creates a local `DeviceGroup` instance, using the shared SDK context. - :param created_at: The time the campaign was created. + :param created_at: The time the group was created. :type created_at: datetime - :param custom_attributes: 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 custom_attributes: 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. :type custom_attributes: dict :param description: The description of the group. :type description: str @@ -1121,7 +1220,7 @@ def device_group( :type id: str :param name: Name of the group. :type name: str - :param updated_at: The time the object was updated. + :param updated_at: The time this object was updated. :type updated_at: datetime :return: A new instance of a DeviceGroup Foundation Entity. @@ -1153,21 +1252,21 @@ def firmware_image( ): """Creates a local `FirmwareImage` instance, using the shared SDK context. - :param created_at: The time the object was created + :param created_at: The time the entity was created. :type created_at: datetime - :param datafile_checksum: The checksum (sha256) generated for the datafile + :param datafile_checksum: The checksum (sha256) generated for the datafile. :type datafile_checksum: str - :param datafile_size: The size of the datafile in bytes + :param datafile_size: The size of the datafile in bytes. :type datafile_size: int - :param datafile_url: The firmware image file URL + :param datafile_url: The firmware image file URL. :type datafile_url: str - :param description: The description of the object + :param description: The description of the object. :type description: str - :param id: The firmware image ID + :param id: The firmware image ID. :type id: str - :param name: The firmware image name + :param name: The firmware image name. :type name: str - :param updated_at: The time the object was updated + :param updated_at: The time the entity was updated. :type updated_at: datetime :return: A new instance of a FirmwareImage Foundation Entity. @@ -1192,35 +1291,68 @@ def firmware_manifest( created_at=None, datafile_size=None, datafile_url=None, + delivered_payload_digest=None, + delivered_payload_size=None, + delivered_payload_type=None, + delivered_payload_url=None, description=None, device_class=None, + device_vendor=None, id=None, key_table_url=None, + manifest_schema_version=None, name=None, + parsed_raw_manifest=None, + precursor_payload_digest=None, timestamp=None, + update_priority=None, updated_at=None, ): """Creates a local `FirmwareManifest` instance, using the shared SDK context. - :param created_at: The time the object was created + :param created_at: The time the entity was created. :type created_at: datetime - :param datafile_size: The size of the datafile in bytes + :param datafile_size: The size of the firmware manifest in bytes. :type datafile_size: int - :param datafile_url: The URL of the firmware manifest binary + :param datafile_url: The URL of the ASN.1 DER-encoded firmware manifest binary. :type datafile_url: str - :param description: The description of the firmware manifest + :param delivered_payload_digest: Digest (SHA256, hex-encoded) of the payload to deliver to the + device. + :type delivered_payload_digest: str + :param delivered_payload_size: The size in bytes of the payload to deliver to the device. + :type delivered_payload_size: int + :param delivered_payload_type: Type of the payload to deliver to the device (full or delta + image). + :type delivered_payload_type: str + :param delivered_payload_url: The URL of the payload to deliver to the device. + :type delivered_payload_url: str + :param description: The description of the firmware manifest. :type description: str - :param device_class: The class of the device + :param device_class: The device class ID. :type device_class: str - :param id: The firmware manifest ID + :param device_vendor: The device vendor ID. + :type device_vendor: str + :param id: The firmware manifest ID. :type id: str - :param key_table_url: The key table of pre-shared keys for devices + :param key_table_url: The key table of pre-shared keys for devices. :type key_table_url: str - :param name: The name of the object + :param manifest_schema_version: Version of the manifest schema (1 or 3). + :type manifest_schema_version: str + :param name: The name of the manifest. :type name: str - :param timestamp: The firmware manifest version as a timestamp + :param parsed_raw_manifest: Raw manifest in JSON format, parsed from ASN.1 DER encoding. + Fields may change. Backwards compatibility is not guaranteed. + Recommended for debugging only. + :type parsed_raw_manifest: dict + :param precursor_payload_digest: Digest (SHA256, hex-encoded) of the currently installed payload. + :type precursor_payload_digest: str + :param timestamp: The firmware manifest version as a timestamp. :type timestamp: datetime - :param updated_at: The time the object was updated + :param update_priority: Update priority, passed to the application callback when an update + is performed. Allows the application to make application-specific + decisions. + :type update_priority: int + :param updated_at: The time the entity was updated. :type updated_at: datetime :return: A new instance of a FirmwareManifest Foundation Entity. @@ -1233,16 +1365,100 @@ def firmware_manifest( created_at=created_at, datafile_size=datafile_size, datafile_url=datafile_url, + delivered_payload_digest=delivered_payload_digest, + delivered_payload_size=delivered_payload_size, + delivered_payload_type=delivered_payload_type, + delivered_payload_url=delivered_payload_url, description=description, device_class=device_class, + device_vendor=device_vendor, id=id, key_table_url=key_table_url, + manifest_schema_version=manifest_schema_version, name=name, + parsed_raw_manifest=parsed_raw_manifest, + precursor_payload_digest=precursor_payload_digest, timestamp=timestamp, + update_priority=update_priority, + updated_at=updated_at, + ) + + def identity_provider( + self, + account_id=None, + created_at=None, + description=None, + id=None, + identity_provider_type=None, + is_default=None, + name=None, + saml2_attributes=None, + status=None, + updated_at=None, + ): + """Creates a local `IdentityProvider` instance, using the shared SDK context. + + :param account_id: The ID of the account the identity provider belongs to. + :type account_id: str + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param description: Description for the identity provider. + :type description: str + :param id: Entity ID. + :type id: str + :param identity_provider_type: Identity provider type. + :type identity_provider_type: str + :param is_default: Flag indicating whether this is the global default identity + provider. + :type is_default: bool + :param name: Name of the identity provider. + :type name: str + :param saml2_attributes: Represents SAML2 specific attributes in responses. + :type saml2_attributes: dict + :param status: Status of the identity provider. + :type status: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + + :return: A new instance of a IdentityProvider Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.identity_provider.IdentityProvider + """ + from mbed_cloud.foundation import IdentityProvider + + return IdentityProvider( + _client=self._client, + account_id=account_id, + created_at=created_at, + description=description, + id=id, + identity_provider_type=identity_provider_type, + is_default=is_default, + name=name, + saml2_attributes=saml2_attributes, + status=status, updated_at=updated_at, ) - def light_theme_color(self, color=None, reference=None, updated_at=None): + def identity_provider_public_key( + self, key=None, kid=None, + ): + """Creates a local `IdentityProviderPublicKey` instance, using the shared SDK context. + + :param key: The public key. + :type key: str + :param kid: The public key ID. + :type kid: str + + :return: A new instance of a IdentityProviderPublicKey Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.identity_provider_public_key.IdentityProviderPublicKey + """ + from mbed_cloud.foundation import IdentityProviderPublicKey + + return IdentityProviderPublicKey(_client=self._client, key=key, kid=kid,) + + def light_theme_color( + self, color=None, reference=None, updated_at=None, + ): """Creates a local `LightThemeColor` instance, using the shared SDK context. :param color: The color given as name (purple) or as a hex code. @@ -1257,9 +1473,11 @@ def light_theme_color(self, color=None, reference=None, updated_at=None): """ from mbed_cloud.foundation import LightThemeColor - return LightThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at) + return LightThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at,) - def light_theme_image(self, reference=None, static_uri=None, updated_at=None): + def light_theme_image( + self, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `LightThemeImage` instance, using the shared SDK context. :param reference: Name of the image. @@ -1274,9 +1492,11 @@ def light_theme_image(self, reference=None, static_uri=None, updated_at=None): """ from mbed_cloud.foundation import LightThemeImage - return LightThemeImage(_client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at) + return LightThemeImage(_client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at,) - def login_history(self, date=None, ip_address=None, success=None, user_agent=None): + def login_history( + self, date=None, ip_address=None, success=None, user_agent=None, + ): """Creates a local `LoginHistory` instance, using the shared SDK context. :param date: UTC time RFC3339 for this login attempt. @@ -1294,14 +1514,20 @@ def login_history(self, date=None, ip_address=None, success=None, user_agent=Non from mbed_cloud.foundation import LoginHistory return LoginHistory( - _client=self._client, date=date, ip_address=ip_address, success=success, user_agent=user_agent + _client=self._client, date=date, ip_address=ip_address, success=success, user_agent=user_agent, ) - def login_profile(self, id=None, name=None): + def login_profile( + self, foreign_id=None, id=None, login_profile_type=None, name=None, + ): """Creates a local `LoginProfile` instance, using the shared SDK context. + :param foreign_id: The ID of the user in the identity provider's service. + :type foreign_id: str :param id: ID of the identity provider. :type id: str + :param login_profile_type: Identity provider type. + :type login_profile_type: str :param name: Name of the identity provider. :type name: str @@ -1310,9 +1536,154 @@ def login_profile(self, id=None, name=None): """ from mbed_cloud.foundation import LoginProfile - return LoginProfile(_client=self._client, id=id, name=name) + return LoginProfile( + _client=self._client, foreign_id=foreign_id, id=id, login_profile_type=login_profile_type, name=name, + ) - def parent_account(self, admin_email=None, admin_name=None, id=None): + def oidc_request( + self, + authorization_endpoint=None, + auto_enrollment=None, + claim_mapping=None, + client_id=None, + client_secret=None, + end_session_endpoint=None, + issuer=None, + jwks_uri=None, + keys=None, + redirect_uri=None, + revocation_endpoint=None, + scopes=None, + token_endpoint=None, + token_request_mode=None, + token_response_path=None, + userinfo_endpoint=None, + ): + """Creates a local `OidcRequest` instance, using the shared SDK context. + + :param authorization_endpoint: URL of the OAuth 2.0 authorization endpoint. + :type authorization_endpoint: str + :param auto_enrollment: For future use. + :type auto_enrollment: bool + :param claim_mapping: Mapping for non-standard OIDC claim names. + :type claim_mapping: dict + :param client_id: Client ID needed to authenticate and gain access to identity + provider's API. + :type client_id: str + :param client_secret: Client secret needed to authenticate and gain access to identity + provider's API. + :type client_secret: str + :param end_session_endpoint: URL of the provider's end session endpoint. + :type end_session_endpoint: str + :param issuer: Issuer of the identity provider. + :type issuer: str + :param jwks_uri: URL of the provider's JSON web key set document. + :type jwks_uri: str + :param keys: Provider's public keys and key IDs used to sign ID tokens. PEM- + encoded. + :type keys: list + :param redirect_uri: The URI needed to authenticate and gain access to identity + provider's API. Leave this empty to use the default redirect URI. + :type redirect_uri: str + :param revocation_endpoint: URL of the provider's token revocation endpoint. + :type revocation_endpoint: str + :param scopes: 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). + :type scopes: str + :param token_endpoint: URL of the OAuth 2.0 authorization endpoint. + :type token_endpoint: str + :param token_request_mode: 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. + :type token_request_mode: str + :param token_response_path: Path to the standard data in the token response. Levels in the + JSON structure must be separated by '.' (dot) characters. + :type token_response_path: str + :param userinfo_endpoint: URL of the OAuth 2.0 UserInfo endpoint. + :type userinfo_endpoint: str + + :return: A new instance of a OidcRequest Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.oidc_request.OidcRequest + """ + from mbed_cloud.foundation import OidcRequest + + return OidcRequest( + _client=self._client, + authorization_endpoint=authorization_endpoint, + auto_enrollment=auto_enrollment, + claim_mapping=claim_mapping, + client_id=client_id, + client_secret=client_secret, + end_session_endpoint=end_session_endpoint, + issuer=issuer, + jwks_uri=jwks_uri, + keys=keys, + redirect_uri=redirect_uri, + revocation_endpoint=revocation_endpoint, + scopes=scopes, + token_endpoint=token_endpoint, + token_request_mode=token_request_mode, + token_response_path=token_response_path, + userinfo_endpoint=userinfo_endpoint, + ) + + def oidc_request_claim_mapping( + self, + email=None, + email_verified=None, + family_name=None, + given_name=None, + name=None, + phone_number=None, + sub=None, + updated_at=None, + updated_at_pattern=None, + ): + """Creates a local `OidcRequestClaimMapping` instance, using the shared SDK context. + + :param email: Custom claim name for 'email'. + :type email: str + :param email_verified: Custom claim name for 'email_verified'. + :type email_verified: str + :param family_name: Custom claim name for 'family_name'. + :type family_name: str + :param given_name: Custom claim name for 'given_name'. + :type given_name: str + :param name: Custom claim name for 'name'. + :type name: str + :param phone_number: Custom claim name for 'phone_number'. + :type phone_number: str + :param sub: Custom claim name for 'sub'. + :type sub: str + :param updated_at: Custom claim name for 'updated_at'. + :type updated_at: str + :param updated_at_pattern: Custom pattern for claim 'updated_at' as defined by the Java + SimpleDateFormat class. + :type updated_at_pattern: str + + :return: A new instance of a OidcRequestClaimMapping Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.oidc_request_claim_mapping.OidcRequestClaimMapping + """ + from mbed_cloud.foundation import OidcRequestClaimMapping + + return OidcRequestClaimMapping( + _client=self._client, + email=email, + email_verified=email_verified, + family_name=family_name, + given_name=given_name, + name=name, + phone_number=phone_number, + sub=sub, + updated_at=updated_at, + updated_at_pattern=updated_at_pattern, + ) + + def parent_account( + self, admin_email=None, admin_name=None, id=None, + ): """Creates a local `ParentAccount` instance, using the shared SDK context. :param admin_email: The email address of the admin user who is the contact person of @@ -1329,9 +1700,11 @@ def parent_account(self, admin_email=None, admin_name=None, id=None): """ from mbed_cloud.foundation import ParentAccount - return ParentAccount(_client=self._client, admin_email=admin_email, admin_name=admin_name, id=id) + return ParentAccount(_client=self._client, admin_email=admin_email, admin_name=admin_name, id=id,) - def password_policy(self, minimum_length=None): + def password_policy( + self, minimum_length=None, + ): """Creates a local `PasswordPolicy` instance, using the shared SDK context. :param minimum_length: Minimum length for the password. @@ -1342,9 +1715,18 @@ def password_policy(self, minimum_length=None): """ from mbed_cloud.foundation import PasswordPolicy - return PasswordPolicy(_client=self._client, minimum_length=minimum_length) + return PasswordPolicy(_client=self._client, minimum_length=minimum_length,) - def policy(self, action=None, allow=None, feature=None, inherited=None, resource=None): + def policy( + self, + action=None, + allow=None, + feature=None, + inherited=None, + inherited_from=None, + inherited_type=None, + resource=None, + ): """Creates a local `Policy` instance, using the shared SDK context. :param action: Comma-separated list of actions, empty string represents all @@ -1357,6 +1739,10 @@ def policy(self, action=None, allow=None, feature=None, inherited=None, resource :param inherited: Flag indicating whether this feature is inherited or overwritten specifically. :type inherited: bool + :param inherited_from: An ID indicating where this policy is inherited from. + :type inherited_from: str + :param inherited_type: Indicates the type of entity this policy is inherited from. + :type inherited_type: str :param resource: Resource that is protected by this policy. :type resource: str @@ -1366,10 +1752,55 @@ def policy(self, action=None, allow=None, feature=None, inherited=None, resource from mbed_cloud.foundation import Policy return Policy( - _client=self._client, action=action, allow=allow, feature=feature, inherited=inherited, resource=resource + _client=self._client, + action=action, + allow=allow, + feature=feature, + inherited=inherited, + inherited_from=inherited_from, + inherited_type=inherited_type, + resource=resource, ) - def pre_shared_key(self, created_at=None, endpoint_name=None, id=None): + def policy_group( + self, account_id=None, apikey_count=None, created_at=None, id=None, name=None, updated_at=None, user_count=None, + ): + """Creates a local `PolicyGroup` instance, using the shared SDK context. + + :param account_id: The ID of the account this group belongs to. + :type account_id: str + :param apikey_count: The number of API keys in this group. + :type apikey_count: int + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param id: The ID of the group. + :type id: str + :param name: The name of the group. + :type name: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + :param user_count: The number of users in this group. + :type user_count: int + + :return: A new instance of a PolicyGroup Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.policy_group.PolicyGroup + """ + from mbed_cloud.foundation import PolicyGroup + + return PolicyGroup( + _client=self._client, + account_id=account_id, + apikey_count=apikey_count, + created_at=created_at, + id=id, + name=name, + updated_at=updated_at, + user_count=user_count, + ) + + def pre_shared_key( + self, created_at=None, endpoint_name=None, id=None, + ): """Creates a local `PreSharedKey` instance, using the shared SDK context. :param created_at: The date-time (RFC3339) when this PSK was uploaded to Device @@ -1387,9 +1818,54 @@ def pre_shared_key(self, created_at=None, endpoint_name=None, id=None): """ from mbed_cloud.foundation import PreSharedKey - return PreSharedKey(_client=self._client, created_at=created_at, endpoint_name=endpoint_name, id=id) + return PreSharedKey(_client=self._client, created_at=created_at, endpoint_name=endpoint_name, id=id,) - def server_credentials(self, created_at=None, id=None, server_certificate=None, server_uri=None): + def saml2_request( + self, + entity_descriptor=None, + idp_entity_id=None, + idp_x509_certs=None, + slo_endpoint=None, + sp_entity_id=None, + sso_endpoint=None, + ): + """Creates a local `Saml2Request` instance, using the shared SDK context. + + :param entity_descriptor: Contains an entity descriptor document for the identity provider. + Can be used as an alternative method to provide the identity + provider's attributes. + :type entity_descriptor: bytes + :param idp_entity_id: Entity ID of the identity provider. + :type idp_entity_id: str + :param idp_x509_certs: List of public X509 certificates of the identity provider. + Certificates must be in PEM format. + :type idp_x509_certs: list + :param slo_endpoint: URL of the identity provider's SLO endpoint. + :type slo_endpoint: str + :param sp_entity_id: Entity ID of the service provider. We recommend that you leave it + empty and let the system generate it. + :type sp_entity_id: str + :param sso_endpoint: URL of the identity provider's SSO endpoint. + :type sso_endpoint: str + + :return: A new instance of a Saml2Request Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.saml2_request.Saml2Request + """ + from mbed_cloud.foundation import Saml2Request + + return Saml2Request( + _client=self._client, + entity_descriptor=entity_descriptor, + idp_entity_id=idp_entity_id, + idp_x509_certs=idp_x509_certs, + slo_endpoint=slo_endpoint, + sp_entity_id=sp_entity_id, + sso_endpoint=sso_endpoint, + ) + + def server_credentials( + self, created_at=None, id=None, server_certificate=None, server_uri=None, + ): """Creates a local `ServerCredentials` instance, using the shared SDK context. :param created_at: Creation UTC time RFC3339. @@ -1420,6 +1896,7 @@ def subtenant_api_key( account_id=None, created_at=None, creation_time=None, + groups=None, id=None, key=None, last_login_time=None, @@ -1437,6 +1914,8 @@ def subtenant_api_key( :param creation_time: The timestamp of the API key creation in the storage, in milliseconds. :type creation_time: int + :param groups: A list of group IDs this API key belongs to. + :type groups: list :param id: The ID of the API key. :type id: str :param key: The API key. @@ -1462,6 +1941,7 @@ def subtenant_api_key( account_id=account_id, created_at=created_at, creation_time=creation_time, + groups=groups, id=id, key=key, last_login_time=last_login_time, @@ -1471,7 +1951,9 @@ def subtenant_api_key( updated_at=updated_at, ) - def subtenant_dark_theme_color(self, color=None, reference=None, updated_at=None): + def subtenant_dark_theme_color( + self, color=None, reference=None, updated_at=None, + ): """Creates a local `SubtenantDarkThemeColor` instance, using the shared SDK context. :param color: The color given as name (purple) or as a hex code. @@ -1486,9 +1968,11 @@ def subtenant_dark_theme_color(self, color=None, reference=None, updated_at=None """ from mbed_cloud.foundation import SubtenantDarkThemeColor - return SubtenantDarkThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at) + return SubtenantDarkThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at,) - def subtenant_dark_theme_image(self, reference=None, static_uri=None, updated_at=None): + def subtenant_dark_theme_image( + self, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `SubtenantDarkThemeImage` instance, using the shared SDK context. :param reference: Name of the image. @@ -1504,10 +1988,64 @@ def subtenant_dark_theme_image(self, reference=None, static_uri=None, updated_at from mbed_cloud.foundation import SubtenantDarkThemeImage return SubtenantDarkThemeImage( - _client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at + _client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at, ) - def subtenant_light_theme_color(self, color=None, reference=None, updated_at=None): + def subtenant_identity_provider( + self, + account_id=None, + created_at=None, + description=None, + id=None, + is_default=None, + name=None, + saml2_attributes=None, + status=None, + updated_at=None, + ): + """Creates a local `SubtenantIdentityProvider` instance, using the shared SDK context. + + :param account_id: The ID of the account the identity provider belongs to. + :type account_id: str + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param description: Description for the identity provider. + :type description: str + :param id: Entity ID. + :type id: str + :param is_default: Flag indicating whether this is the global default identity + provider. + :type is_default: bool + :param name: Name of the identity provider. + :type name: str + :param saml2_attributes: Represents SAML2 specific attributes in responses. + :type saml2_attributes: dict + :param status: Status of the identity provider. + :type status: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + + :return: A new instance of a SubtenantIdentityProvider Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.subtenant_identity_provider.SubtenantIdentityProvider + """ + from mbed_cloud.foundation import SubtenantIdentityProvider + + return SubtenantIdentityProvider( + _client=self._client, + account_id=account_id, + created_at=created_at, + description=description, + id=id, + is_default=is_default, + name=name, + saml2_attributes=saml2_attributes, + status=status, + updated_at=updated_at, + ) + + def subtenant_light_theme_color( + self, color=None, reference=None, updated_at=None, + ): """Creates a local `SubtenantLightThemeColor` instance, using the shared SDK context. :param color: The color given as name (purple) or as a hex code. @@ -1522,9 +2060,11 @@ def subtenant_light_theme_color(self, color=None, reference=None, updated_at=Non """ from mbed_cloud.foundation import SubtenantLightThemeColor - return SubtenantLightThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at) + return SubtenantLightThemeColor(_client=self._client, color=color, reference=reference, updated_at=updated_at,) - def subtenant_light_theme_image(self, reference=None, static_uri=None, updated_at=None): + def subtenant_light_theme_image( + self, reference=None, static_uri=None, updated_at=None, + ): """Creates a local `SubtenantLightThemeImage` instance, using the shared SDK context. :param reference: Name of the image. @@ -1540,7 +2080,43 @@ def subtenant_light_theme_image(self, reference=None, static_uri=None, updated_a from mbed_cloud.foundation import SubtenantLightThemeImage return SubtenantLightThemeImage( - _client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at + _client=self._client, reference=reference, static_uri=static_uri, updated_at=updated_at, + ) + + def subtenant_policy_group( + self, account_id=None, apikey_count=None, created_at=None, id=None, name=None, updated_at=None, user_count=None, + ): + """Creates a local `SubtenantPolicyGroup` instance, using the shared SDK context. + + :param account_id: The ID of the account this group belongs to. + :type account_id: str + :param apikey_count: The number of API keys in this group. + :type apikey_count: int + :param created_at: Creation UTC time RFC3339. + :type created_at: datetime + :param id: The ID of the group. + :type id: str + :param name: The name of the group. + :type name: str + :param updated_at: Last update UTC time RFC3339. + :type updated_at: datetime + :param user_count: The number of users in this group. + :type user_count: int + + :return: A new instance of a SubtenantPolicyGroup Foundation Entity. + :rtype: mbed_cloud.foundation.entities.accounts.subtenant_policy_group.SubtenantPolicyGroup + """ + from mbed_cloud.foundation import SubtenantPolicyGroup + + return SubtenantPolicyGroup( + _client=self._client, + account_id=account_id, + apikey_count=apikey_count, + created_at=created_at, + id=id, + name=name, + updated_at=updated_at, + user_count=user_count, ) def subtenant_trusted_certificate( @@ -1642,6 +2218,7 @@ def subtenant_user( email=None, email_verified=None, full_name=None, + groups=None, id=None, is_gtc_accepted=None, is_marketing_accepted=None, @@ -1678,6 +2255,8 @@ def subtenant_user( :type email_verified: bool :param full_name: The full name of the user. :type full_name: str + :param groups: A list of IDs of the groups this user belongs to. + :type groups: list :param id: The ID of the user. :type id: str :param is_gtc_accepted: A flag indicating that the user has accepted General Terms and @@ -1736,6 +2315,7 @@ def subtenant_user( email=email, email_verified=email_verified, full_name=full_name, + groups=groups, id=id, is_gtc_accepted=is_gtc_accepted, is_marketing_accepted=is_marketing_accepted, @@ -1758,6 +2338,7 @@ def subtenant_user_invitation( created_at=None, email=None, expiration=None, + groups=None, id=None, login_profiles=None, updated_at=None, @@ -1773,6 +2354,8 @@ def subtenant_user_invitation( :type email: str :param expiration: Invitation expiration as UTC time RFC3339. :type expiration: datetime + :param groups: A list of IDs of the groups the user is invited to. + :type groups: list :param id: The ID of the invitation. :type id: str :param login_profiles: A list of login profiles for the user. Specified as the identity @@ -1794,6 +2377,7 @@ def subtenant_user_invitation( created_at=created_at, email=email, expiration=expiration, + groups=groups, id=id, login_profiles=login_profiles, updated_at=updated_at, @@ -1890,7 +2474,13 @@ def trusted_certificate( def update_campaign( self, + active_at=None, + approval_required=None, + archived_at=None, + autostop=None, autostop_reason=None, + autostop_success_percent=None, + campaign_strategy=None, created_at=None, description=None, device_filter=None, @@ -1902,37 +2492,65 @@ def update_campaign( root_manifest_id=None, root_manifest_url=None, started_at=None, + starting_at=None, + stopped_at=None, + stopping_at=None, updated_at=None, when=None, ): """Creates a local `UpdateCampaign` instance, using the shared SDK context. + :param active_at: The time the campaign entered the active state. + :type active_at: datetime + :param approval_required: Flag indicating whether approval is needed to start the campaign. + :type approval_required: bool + :param archived_at: The time the campaign was archived. + :type archived_at: datetime + :param autostop: Flag indicating whether the campaign should be auto-stopped on + reaching a threshold. + :type autostop: bool :param autostop_reason: Text description of why a campaign failed to start or why a campaign stopped. :type autostop_reason: str - :param created_at: The time the update campaign was created + :param autostop_success_percent: Percent of successful device updates to auto stop the campaign. + :type autostop_success_percent: float + :param campaign_strategy: 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`. + :type campaign_strategy: str + :param created_at: The time the entity was created. :type created_at: datetime - :param description: An optional description of the campaign + :param description: An optional description of the campaign. :type description: str - :param device_filter: The filter for the devices the campaign is targeting at + :param device_filter: The filter for the devices the campaign targets. Refer to this + using the filter ID. :type device_filter: str :param device_filter_helper: Helper for creating the device filter string. :type device_filter_helper: mbed_cloud.client.api_filter.ApiFilter - :param finished: The campaign finish timestamp + :param finished: The time the campaign finished. :type finished: datetime - :param id: The campaign ID + :param id: The campaign ID. :type id: str - :param name: The campaign name + :param name: The campaign name. :type name: str - :param phase: The current phase of the campaign. + :param phase: The phase of the campaign. :type phase: str - :param root_manifest_id: + :param root_manifest_id: The ID of the manifest that will be sent to the device as part of + the campaign. :type root_manifest_id: str - :param root_manifest_url: + :param root_manifest_url: The URL for the manifest that will be sent to the device as part + of the campaign. :type root_manifest_url: str - :param started_at: + :param started_at: The time the campaign was started. :type started_at: datetime - :param updated_at: The time the object was updated + :param starting_at: The time the campaign will be started. + :type starting_at: datetime + :param stopped_at: The time the campaign was stopped. + :type stopped_at: datetime + :param stopping_at: The time the campaign will be stopped. + :type stopping_at: datetime + :param updated_at: The time the entity was updated. :type updated_at: datetime :param when: The scheduled start time for the campaign. The campaign will start within 1 minute when then start time has elapsed. @@ -1945,7 +2563,13 @@ def update_campaign( return UpdateCampaign( _client=self._client, + active_at=active_at, + approval_required=approval_required, + archived_at=archived_at, + autostop=autostop, autostop_reason=autostop_reason, + autostop_success_percent=autostop_success_percent, + campaign_strategy=campaign_strategy, created_at=created_at, description=description, device_filter=device_filter, @@ -1957,6 +2581,9 @@ def update_campaign( root_manifest_id=root_manifest_id, root_manifest_url=root_manifest_url, started_at=started_at, + starting_at=starting_at, + stopped_at=stopped_at, + stopping_at=stopping_at, updated_at=updated_at, when=when, ) @@ -1972,6 +2599,7 @@ def user( email=None, email_verified=None, full_name=None, + groups=None, id=None, is_gtc_accepted=None, is_marketing_accepted=None, @@ -2008,6 +2636,8 @@ def user( :type email_verified: bool :param full_name: The full name of the user. :type full_name: str + :param groups: A list of IDs of the groups this user belongs to. + :type groups: list :param id: The ID of the user. :type id: str :param is_gtc_accepted: A flag indicating that the user has accepted General Terms and @@ -2066,6 +2696,7 @@ def user( email=email, email_verified=email_verified, full_name=full_name, + groups=groups, id=id, is_gtc_accepted=is_gtc_accepted, is_marketing_accepted=is_marketing_accepted, @@ -2088,6 +2719,7 @@ def user_invitation( created_at=None, email=None, expiration=None, + groups=None, id=None, login_profiles=None, updated_at=None, @@ -2103,6 +2735,8 @@ def user_invitation( :type email: str :param expiration: Invitation expiration as UTC time RFC3339. :type expiration: datetime + :param groups: A list of IDs of the groups the user is invited to. + :type groups: list :param id: The ID of the invitation. :type id: str :param login_profiles: A list of login profiles for the user. Specified as the identity @@ -2124,13 +2758,16 @@ def user_invitation( created_at=created_at, email=email, expiration=expiration, + groups=groups, id=id, login_profiles=login_profiles, updated_at=updated_at, user_id=user_id, ) - def verification_response(self, message=None, successful=None): + def verification_response( + self, message=None, successful=None, + ): """Creates a local `VerificationResponse` instance, using the shared SDK context. :param message: Provides details in case of failure. @@ -2144,4 +2781,4 @@ def verification_response(self, message=None, successful=None): """ from mbed_cloud.foundation import VerificationResponse - return VerificationResponse(_client=self._client, message=message, successful=successful) + return VerificationResponse(_client=self._client, message=message, successful=successful,) diff --git a/src/mbed_cloud/foundation/entities/security/certificate_enrollment.py b/src/mbed_cloud/foundation/entities/security/certificate_enrollment.py index 56fe59f4..7dd493dd 100644 --- a/src/mbed_cloud/foundation/entities/security/certificate_enrollment.py +++ b/src/mbed_cloud/foundation/entities/security/certificate_enrollment.py @@ -352,6 +352,6 @@ def read(self): method="get", path="/v3/certificate-enrollments/{certificate-enrollment-id}", content_type="application/json", - path_params={"certificate-enrollment-id": self._id.to_api()}, + path_params={"certificate-enrollment-id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/certificate_issuer.py b/src/mbed_cloud/foundation/entities/security/certificate_issuer.py index 67c337d1..c7522445 100644 --- a/src/mbed_cloud/foundation/entities/security/certificate_issuer.py +++ b/src/mbed_cloud/foundation/entities/security/certificate_issuer.py @@ -89,21 +89,17 @@ def __init__( :param id: (Required) The ID of the certificate issuer. :type id: str :param issuer_attributes: 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 shall be empty. + When the issuer_type is CFSSL_AUTH, see definition of + CfsslAttributes. :type issuer_attributes: dict :param issuer_type: (Required) The type of the certificate issuer. - GLOBAL_SIGN: - Certificates - are issued by GlobalSign service. The users must provide their own - GlobalSign account credentials. + 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. + Certificates are issued by CFSSL authenticated signing service. + The users must provide their own CFSSL host_url and credentials. :type issuer_type: str :param name: (Required) Certificate issuer name, unique per account. :type name: str @@ -179,10 +175,8 @@ def id(self, value): @property def issuer_attributes(self): """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 shall be empty. + When the issuer_type is CFSSL_AUTH, see definition of CfsslAttributes. :rtype: dict """ @@ -203,14 +197,11 @@ def issuer_attributes(self, value): def issuer_type(self): """The type of the certificate issuer. - GLOBAL_SIGN: - Certificates are issued - by GlobalSign service. The users must provide their own GlobalSign account - credentials. + 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. + Certificates are issued by CFSSL authenticated signing service. + The users must provide their own CFSSL host_url and credentials. This field must be set when creating a new CertificateIssuer Entity. @@ -262,8 +253,8 @@ def create(self, issuer_credentials): :param issuer_credentials: 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. + When the issuer_type is CFSSL_AUTH, see definition of + CfsslAuthCredentials. :type issuer_credentials: dict :rtype: CertificateIssuer @@ -303,7 +294,7 @@ def delete(self): method="delete", path="/v3/certificate-issuers/{certificate-issuer-id}", content_type="application/json", - path_params={"certificate-issuer-id": self._id.to_api()}, + path_params={"certificate-issuer-id": self._id.to_api(),}, unpack=self, ) @@ -416,7 +407,7 @@ def read(self): method="get", path="/v3/certificate-issuers/{certificate-issuer-id}", content_type="application/json", - path_params={"certificate-issuer-id": self._id.to_api()}, + path_params={"certificate-issuer-id": self._id.to_api(),}, unpack=self, ) @@ -428,8 +419,8 @@ def update(self, issuer_credentials=None): :param issuer_credentials: 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. + When the issuer_type is CFSSL_AUTH, see definition of + CfsslAuthCredentials. :type issuer_credentials: dict :rtype: CertificateIssuer @@ -452,7 +443,7 @@ def update(self, issuer_credentials=None): path="/v3/certificate-issuers/{certificate-issuer-id}", content_type="application/json", body_params=body_params, - path_params={"certificate-issuer-id": self._id.to_api()}, + path_params={"certificate-issuer-id": self._id.to_api(),}, unpack=self, ) @@ -470,6 +461,6 @@ def verify(self): method="post", path="/v3/certificate-issuers/{certificate-issuer-id}/verify", content_type="application/json", - path_params={"certificate-issuer-id": self._id.to_api()}, + path_params={"certificate-issuer-id": self._id.to_api(),}, unpack=VerificationResponse, ) diff --git a/src/mbed_cloud/foundation/entities/security/certificate_issuer_config.py b/src/mbed_cloud/foundation/entities/security/certificate_issuer_config.py index c464608d..d3c126c9 100644 --- a/src/mbed_cloud/foundation/entities/security/certificate_issuer_config.py +++ b/src/mbed_cloud/foundation/entities/security/certificate_issuer_config.py @@ -64,7 +64,7 @@ class CertificateIssuerConfig(Entity): _renames_to_api = {} def __init__( - self, _client=None, certificate_issuer_id=None, created_at=None, id=None, reference=None, updated_at=None + self, _client=None, certificate_issuer_id=None, created_at=None, id=None, reference=None, updated_at=None, ): """Creates a local `CertificateIssuerConfig` instance @@ -76,8 +76,7 @@ def __init__( documentation for the setter method. :param certificate_issuer_id: (Required) The ID of the certificate issuer. - Null if Device Management - internal HSM is used. + Null if Device Management internal HSM is used. :type certificate_issuer_id: str :param created_at: Created UTC time RFC3339. :type created_at: datetime @@ -104,8 +103,7 @@ def __init__( @property def certificate_issuer_id(self): """The ID of the certificate issuer. - Null if Device Management internal HSM is - used. + Null if Device Management internal HSM is used. This field must be set when creating a new CertificateIssuerConfig Entity. @@ -230,7 +228,7 @@ def delete(self): method="delete", path="/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", content_type="application/json", - path_params={"certificate-issuer-configuration-id": self._id.to_api()}, + path_params={"certificate-issuer-configuration-id": self._id.to_api(),}, unpack=self, ) @@ -380,7 +378,7 @@ def read(self): method="get", path="/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", content_type="application/json", - path_params={"certificate-issuer-configuration-id": self._id.to_api()}, + path_params={"certificate-issuer-configuration-id": self._id.to_api(),}, unpack=self, ) @@ -403,6 +401,6 @@ def update(self): path="/v3/certificate-issuer-configurations/{certificate-issuer-configuration-id}", content_type="application/json", body_params=body_params, - path_params={"certificate-issuer-configuration-id": self._id.to_api()}, + path_params={"certificate-issuer-configuration-id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/developer_certificate.py b/src/mbed_cloud/foundation/entities/security/developer_certificate.py index 5c1bbe8b..dd3aac9b 100644 --- a/src/mbed_cloud/foundation/entities/security/developer_certificate.py +++ b/src/mbed_cloud/foundation/entities/security/developer_certificate.py @@ -65,10 +65,14 @@ class DeveloperCertificate(Entity): _sdk_fieldnames = _api_fieldnames # Renames to be performed by the SDK when receiving data {: } - _renames = {"developer_certificate": "certificate"} + _renames = { + "developer_certificate": "certificate", + } # Renames to be performed by the SDK when sending data {: } - _renames_to_api = {"certificate": "developer_certificate"} + _renames_to_api = { + "certificate": "developer_certificate", + } def __init__( self, @@ -267,12 +271,12 @@ def delete(self): method="delete", path="/v3/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"cert_id": self._id.to_api()}, + path_params={"cert_id": self._id.to_api(),}, unpack=self, ) def get_trusted_certificate_info(self): - """Get trusted certificate by ID. + """Get a trusted certificate. `REST API Documentation `_. @@ -285,7 +289,7 @@ def get_trusted_certificate_info(self): method="get", path="/v3/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"cert_id": self._id.to_api()}, + path_params={"cert_id": self._id.to_api(),}, unpack=TrustedCertificate, ) @@ -301,6 +305,6 @@ def read(self): method="get", path="/v3/developer-certificates/{developerCertificateId}", content_type="application/json", - path_params={"developerCertificateId": self._id.to_api()}, + path_params={"developerCertificateId": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/enums.py b/src/mbed_cloud/foundation/entities/security/enums.py index 34ac0f5c..7190d681 100644 --- a/src/mbed_cloud/foundation/entities/security/enums.py +++ b/src/mbed_cloud/foundation/entities/security/enums.py @@ -60,7 +60,7 @@ class CertificateEnrollmentEnrollResultEnum(BaseEnum): FAILURE = "failure" SUCCESS = "success" - values = frozenset(("failure", "success")) + values = frozenset(("failure", "success",)) class CertificateEnrollmentEnrollStatusEnum(BaseEnum): @@ -76,7 +76,7 @@ class CertificateEnrollmentEnrollStatusEnum(BaseEnum): COMPLETED = "completed" NEW = "new" - values = frozenset(("completed", "new")) + values = frozenset(("completed", "new",)) class CertificateEnrollmentIncludeEnum(BaseEnum): @@ -107,7 +107,7 @@ class CertificateEnrollmentOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class CertificateIssuerTypeEnum(BaseEnum): @@ -123,7 +123,7 @@ class CertificateIssuerTypeEnum(BaseEnum): CFSSL_AUTH = "CFSSL_AUTH" GLOBAL_SIGN = "GLOBAL_SIGN" - values = frozenset(("CFSSL_AUTH", "GLOBAL_SIGN")) + values = frozenset(("CFSSL_AUTH", "GLOBAL_SIGN",)) class SubtenantTrustedCertificateServiceEnum(BaseEnum): @@ -139,7 +139,7 @@ class SubtenantTrustedCertificateServiceEnum(BaseEnum): BOOTSTRAP = "bootstrap" LWM2M = "lwm2m" - values = frozenset(("bootstrap", "lwm2m")) + values = frozenset(("bootstrap", "lwm2m",)) class SubtenantTrustedCertificateStatusEnum(BaseEnum): @@ -155,7 +155,7 @@ class SubtenantTrustedCertificateStatusEnum(BaseEnum): ACTIVE = "ACTIVE" INACTIVE = "INACTIVE" - values = frozenset(("ACTIVE", "INACTIVE")) + values = frozenset(("ACTIVE", "INACTIVE",)) class TrustedCertificateOrderEnum(BaseEnum): @@ -171,7 +171,7 @@ class TrustedCertificateOrderEnum(BaseEnum): ASC = "ASC" DESC = "DESC" - values = frozenset(("ASC", "DESC")) + values = frozenset(("ASC", "DESC",)) class TrustedCertificateServiceEnum(BaseEnum): @@ -187,7 +187,7 @@ class TrustedCertificateServiceEnum(BaseEnum): BOOTSTRAP = "bootstrap" LWM2M = "lwm2m" - values = frozenset(("bootstrap", "lwm2m")) + values = frozenset(("bootstrap", "lwm2m",)) class TrustedCertificateStatusEnum(BaseEnum): @@ -203,4 +203,4 @@ class TrustedCertificateStatusEnum(BaseEnum): ACTIVE = "ACTIVE" INACTIVE = "INACTIVE" - values = frozenset(("ACTIVE", "INACTIVE")) + values = frozenset(("ACTIVE", "INACTIVE",)) diff --git a/src/mbed_cloud/foundation/entities/security/pre_shared_key.py b/src/mbed_cloud/foundation/entities/security/pre_shared_key.py index d2e91d33..b428bb4b 100644 --- a/src/mbed_cloud/foundation/entities/security/pre_shared_key.py +++ b/src/mbed_cloud/foundation/entities/security/pre_shared_key.py @@ -61,7 +61,9 @@ class PreSharedKey(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, created_at=None, endpoint_name=None, id=None): + def __init__( + self, _client=None, created_at=None, endpoint_name=None, id=None, + ): """Creates a local `PreSharedKey` instance Parameters can be supplied on creation of the instance or given by @@ -193,7 +195,7 @@ def delete(self): method="delete", path="/v2/device-shared-keys/{endpoint_name}", content_type="application/json", - path_params={"endpoint_name": self._id.to_api()}, + path_params={"endpoint_name": self._id.to_api(),}, unpack=self, ) @@ -299,6 +301,6 @@ def read(self): method="get", path="/v2/device-shared-keys/{endpoint_name}", content_type="application/json", - path_params={"endpoint_name": self._id.to_api()}, + path_params={"endpoint_name": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/server_credentials.py b/src/mbed_cloud/foundation/entities/security/server_credentials.py index 8ffd2b34..70b4225a 100644 --- a/src/mbed_cloud/foundation/entities/security/server_credentials.py +++ b/src/mbed_cloud/foundation/entities/security/server_credentials.py @@ -59,7 +59,9 @@ class ServerCredentials(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, created_at=None, id=None, server_certificate=None, server_uri=None): + def __init__( + self, _client=None, created_at=None, id=None, server_certificate=None, server_uri=None, + ): """Creates a local `ServerCredentials` instance Parameters can be supplied on creation of the instance or given by @@ -136,7 +138,7 @@ def get_bootstrap(self): """ return self._client.call_api( - method="get", path="/v3/server-credentials/bootstrap", content_type="application/json", unpack=self + method="get", path="/v3/server-credentials/bootstrap", content_type="application/json", unpack=self, ) def get_lwm2m(self): @@ -148,5 +150,5 @@ def get_lwm2m(self): """ return self._client.call_api( - method="get", path="/v3/server-credentials/lwm2m", content_type="application/json", unpack=self + method="get", path="/v3/server-credentials/lwm2m", content_type="application/json", unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/subtenant_trusted_certificate.py b/src/mbed_cloud/foundation/entities/security/subtenant_trusted_certificate.py index b1cd70f8..83bcff7f 100644 --- a/src/mbed_cloud/foundation/entities/security/subtenant_trusted_certificate.py +++ b/src/mbed_cloud/foundation/entities/security/subtenant_trusted_certificate.py @@ -489,13 +489,13 @@ def create(self): method="post", path="/v3/accounts/{account_id}/trusted-certificates", content_type="application/json", - path_params={"account_id": self._account_id.to_api()}, + path_params={"account_id": self._account_id.to_api(),}, body_params=body_params, unpack=self, ) def delete(self): - """Delete trusted certificate by ID. + """Delete a trusted certificate by ID. `REST API Documentation `_. @@ -506,7 +506,7 @@ def delete(self): method="delete", path="/v3/accounts/{account_id}/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "cert_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "cert_id": self._id.to_api(),}, unpack=self, ) @@ -524,12 +524,12 @@ def get_developer_certificate_info(self): method="get", path="/v3/developer-certificates/{developerCertificateId}", content_type="application/json", - path_params={"developerCertificateId": self._id.to_api()}, + path_params={"developerCertificateId": self._id.to_api(),}, unpack=DeveloperCertificate, ) def read(self): - """Get trusted certificate by ID. + """Get a trusted certificate. `REST API Documentation `_. @@ -540,7 +540,7 @@ def read(self): method="get", path="/v3/accounts/{account_id}/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "cert_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "cert_id": self._id.to_api(),}, unpack=self, ) @@ -572,7 +572,7 @@ def update(self): method="put", path="/v3/accounts/{account_id}/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"account_id": self._account_id.to_api(), "cert_id": self._id.to_api()}, + path_params={"account_id": self._account_id.to_api(), "cert_id": self._id.to_api(),}, body_params=body_params, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/trusted_certificate.py b/src/mbed_cloud/foundation/entities/security/trusted_certificate.py index 7453ef52..86a94077 100644 --- a/src/mbed_cloud/foundation/entities/security/trusted_certificate.py +++ b/src/mbed_cloud/foundation/entities/security/trusted_certificate.py @@ -494,7 +494,7 @@ def delete(self): method="delete", path="/v3/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"cert_id": self._id.to_api()}, + path_params={"cert_id": self._id.to_api(),}, unpack=self, ) @@ -512,7 +512,7 @@ def get_developer_certificate_info(self): method="get", path="/v3/developer-certificates/{developerCertificateId}", content_type="application/json", - path_params={"developerCertificateId": self._id.to_api()}, + path_params={"developerCertificateId": self._id.to_api(),}, unpack=DeveloperCertificate, ) @@ -650,7 +650,7 @@ def _paginate_list(self, after=None, filter=None, order="ASC", limit=50, include ) def read(self): - """Get trusted certificate by ID. + """Get a trusted certificate. `REST API Documentation `_. @@ -661,7 +661,7 @@ def read(self): method="get", path="/v3/trusted-certificates/{cert_id}", content_type="application/json", - path_params={"cert_id": self._id.to_api()}, + path_params={"cert_id": self._id.to_api(),}, unpack=self, ) @@ -694,6 +694,6 @@ def update(self): path="/v3/trusted-certificates/{cert_id}", content_type="application/json", body_params=body_params, - path_params={"cert_id": self._id.to_api()}, + path_params={"cert_id": self._id.to_api(),}, unpack=self, ) diff --git a/src/mbed_cloud/foundation/entities/security/verification_response.py b/src/mbed_cloud/foundation/entities/security/verification_response.py index b4e7ef69..2159d29c 100644 --- a/src/mbed_cloud/foundation/entities/security/verification_response.py +++ b/src/mbed_cloud/foundation/entities/security/verification_response.py @@ -55,7 +55,9 @@ class VerificationResponse(Entity): # Renames to be performed by the SDK when sending data {: } _renames_to_api = {} - def __init__(self, _client=None, message=None, successful=None): + def __init__( + self, _client=None, message=None, successful=None, + ): """Creates a local `VerificationResponse` instance Parameters can be supplied on creation of the instance or given by diff --git a/src/mbed_cloud/foundation/enums/__init__.py b/src/mbed_cloud/foundation/enums/__init__.py index 3e1bee8e..6963a556 100644 --- a/src/mbed_cloud/foundation/enums/__init__.py +++ b/src/mbed_cloud/foundation/enums/__init__.py @@ -9,12 +9,27 @@ Accounts -------- +- :class:`mbed_cloud.foundation.entities.accounts.enums.AccountBusinessModelEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.AccountMfaStatusEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.AccountOrderEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.AccountStatusEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.ApiKeyOrderEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.ApiKeyStatusEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.IdentityProviderAlgorithmEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.IdentityProviderOrderEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.IdentityProviderStatusEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.IdentityProviderTypeEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.LoginProfileTypeEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.OidcRequestTokenModeEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.PolicyGroupOrderEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.PolicyInheritedTypeEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantApiKeyOrderEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantApiKeyStatusEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantIdentityProviderAlgorithmEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantIdentityProviderOrderEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantIdentityProviderStatusEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantPolicyGroupOrderEnum` +- :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantUserOrderEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.SubtenantUserStatusEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.UserInvitationOrderEnum` - :class:`mbed_cloud.foundation.entities.accounts.enums.UserOrderEnum` @@ -39,8 +54,12 @@ - :class:`mbed_cloud.foundation.entities.device_update.enums.CampaignStatisticsIdEnum` - :class:`mbed_cloud.foundation.entities.device_update.enums.CampaignStatisticsSummaryStatusEnum` - :class:`mbed_cloud.foundation.entities.device_update.enums.FirmwareImageOrderEnum` +- :class:`mbed_cloud.foundation.entities.device_update.enums.FirmwareManifestDeliveredPayloadTypeEnum` - :class:`mbed_cloud.foundation.entities.device_update.enums.FirmwareManifestOrderEnum` +- :class:`mbed_cloud.foundation.entities.device_update.enums.FirmwareManifestSchemaVersionEnum` - :class:`mbed_cloud.foundation.entities.device_update.enums.UpdateCampaignOrderEnum` +- :class:`mbed_cloud.foundation.entities.device_update.enums.UpdateCampaignPhaseEnum` +- :class:`mbed_cloud.foundation.entities.device_update.enums.UpdateCampaignStrategyEnum` Devices ------- @@ -50,6 +69,7 @@ - :class:`mbed_cloud.foundation.entities.devices.enums.DeviceEnrollmentBulkDeleteStatusEnum` - :class:`mbed_cloud.foundation.entities.devices.enums.DeviceEnrollmentDenialOrderEnum` - :class:`mbed_cloud.foundation.entities.devices.enums.DeviceEnrollmentOrderEnum` +- :class:`mbed_cloud.foundation.entities.devices.enums.DeviceLifecycleStatusEnum` - :class:`mbed_cloud.foundation.entities.devices.enums.DeviceMechanismEnum` - :class:`mbed_cloud.foundation.entities.devices.enums.DeviceStateEnum` @@ -77,12 +97,27 @@ .. code-block:: python + from mbed_cloud.foundation.enums import AccountBusinessModelEnum from mbed_cloud.foundation.enums import AccountMfaStatusEnum from mbed_cloud.foundation.enums import AccountOrderEnum from mbed_cloud.foundation.enums import AccountStatusEnum from mbed_cloud.foundation.enums import ApiKeyOrderEnum from mbed_cloud.foundation.enums import ApiKeyStatusEnum + from mbed_cloud.foundation.enums import IdentityProviderAlgorithmEnum + from mbed_cloud.foundation.enums import IdentityProviderOrderEnum + from mbed_cloud.foundation.enums import IdentityProviderStatusEnum + from mbed_cloud.foundation.enums import IdentityProviderTypeEnum + from mbed_cloud.foundation.enums import LoginProfileTypeEnum + from mbed_cloud.foundation.enums import OidcRequestTokenModeEnum + from mbed_cloud.foundation.enums import PolicyGroupOrderEnum + from mbed_cloud.foundation.enums import PolicyInheritedTypeEnum + from mbed_cloud.foundation.enums import SubtenantApiKeyOrderEnum from mbed_cloud.foundation.enums import SubtenantApiKeyStatusEnum + from mbed_cloud.foundation.enums import SubtenantIdentityProviderAlgorithmEnum + from mbed_cloud.foundation.enums import SubtenantIdentityProviderOrderEnum + from mbed_cloud.foundation.enums import SubtenantIdentityProviderStatusEnum + from mbed_cloud.foundation.enums import SubtenantPolicyGroupOrderEnum + from mbed_cloud.foundation.enums import SubtenantUserOrderEnum from mbed_cloud.foundation.enums import SubtenantUserStatusEnum from mbed_cloud.foundation.enums import UserInvitationOrderEnum from mbed_cloud.foundation.enums import UserOrderEnum @@ -99,13 +134,18 @@ from mbed_cloud.foundation.enums import CampaignStatisticsIdEnum from mbed_cloud.foundation.enums import CampaignStatisticsSummaryStatusEnum from mbed_cloud.foundation.enums import FirmwareImageOrderEnum + from mbed_cloud.foundation.enums import FirmwareManifestDeliveredPayloadTypeEnum from mbed_cloud.foundation.enums import FirmwareManifestOrderEnum + from mbed_cloud.foundation.enums import FirmwareManifestSchemaVersionEnum from mbed_cloud.foundation.enums import UpdateCampaignOrderEnum + from mbed_cloud.foundation.enums import UpdateCampaignPhaseEnum + from mbed_cloud.foundation.enums import UpdateCampaignStrategyEnum from mbed_cloud.foundation.enums import DeviceDeployedStateEnum from mbed_cloud.foundation.enums import DeviceEnrollmentBulkCreateStatusEnum from mbed_cloud.foundation.enums import DeviceEnrollmentBulkDeleteStatusEnum from mbed_cloud.foundation.enums import DeviceEnrollmentDenialOrderEnum from mbed_cloud.foundation.enums import DeviceEnrollmentOrderEnum + from mbed_cloud.foundation.enums import DeviceLifecycleStatusEnum from mbed_cloud.foundation.enums import DeviceMechanismEnum from mbed_cloud.foundation.enums import DeviceStateEnum from mbed_cloud.foundation.enums import CertificateEnrollmentEnrollResultEnum @@ -122,12 +162,27 @@ ------------ """ +from mbed_cloud.foundation.entities.accounts.enums import AccountBusinessModelEnum from mbed_cloud.foundation.entities.accounts.enums import AccountMfaStatusEnum from mbed_cloud.foundation.entities.accounts.enums import AccountOrderEnum from mbed_cloud.foundation.entities.accounts.enums import AccountStatusEnum from mbed_cloud.foundation.entities.accounts.enums import ApiKeyOrderEnum from mbed_cloud.foundation.entities.accounts.enums import ApiKeyStatusEnum +from mbed_cloud.foundation.entities.accounts.enums import IdentityProviderAlgorithmEnum +from mbed_cloud.foundation.entities.accounts.enums import IdentityProviderOrderEnum +from mbed_cloud.foundation.entities.accounts.enums import IdentityProviderStatusEnum +from mbed_cloud.foundation.entities.accounts.enums import IdentityProviderTypeEnum +from mbed_cloud.foundation.entities.accounts.enums import LoginProfileTypeEnum +from mbed_cloud.foundation.entities.accounts.enums import OidcRequestTokenModeEnum +from mbed_cloud.foundation.entities.accounts.enums import PolicyGroupOrderEnum +from mbed_cloud.foundation.entities.accounts.enums import PolicyInheritedTypeEnum +from mbed_cloud.foundation.entities.accounts.enums import SubtenantApiKeyOrderEnum from mbed_cloud.foundation.entities.accounts.enums import SubtenantApiKeyStatusEnum +from mbed_cloud.foundation.entities.accounts.enums import SubtenantIdentityProviderAlgorithmEnum +from mbed_cloud.foundation.entities.accounts.enums import SubtenantIdentityProviderOrderEnum +from mbed_cloud.foundation.entities.accounts.enums import SubtenantIdentityProviderStatusEnum +from mbed_cloud.foundation.entities.accounts.enums import SubtenantPolicyGroupOrderEnum +from mbed_cloud.foundation.entities.accounts.enums import SubtenantUserOrderEnum from mbed_cloud.foundation.entities.accounts.enums import SubtenantUserStatusEnum from mbed_cloud.foundation.entities.accounts.enums import UserInvitationOrderEnum from mbed_cloud.foundation.entities.accounts.enums import UserOrderEnum @@ -144,13 +199,18 @@ from mbed_cloud.foundation.entities.device_update.enums import CampaignStatisticsIdEnum from mbed_cloud.foundation.entities.device_update.enums import CampaignStatisticsSummaryStatusEnum from mbed_cloud.foundation.entities.device_update.enums import FirmwareImageOrderEnum +from mbed_cloud.foundation.entities.device_update.enums import FirmwareManifestDeliveredPayloadTypeEnum from mbed_cloud.foundation.entities.device_update.enums import FirmwareManifestOrderEnum +from mbed_cloud.foundation.entities.device_update.enums import FirmwareManifestSchemaVersionEnum from mbed_cloud.foundation.entities.device_update.enums import UpdateCampaignOrderEnum +from mbed_cloud.foundation.entities.device_update.enums import UpdateCampaignPhaseEnum +from mbed_cloud.foundation.entities.device_update.enums import UpdateCampaignStrategyEnum from mbed_cloud.foundation.entities.devices.enums import DeviceDeployedStateEnum from mbed_cloud.foundation.entities.devices.enums import DeviceEnrollmentBulkCreateStatusEnum from mbed_cloud.foundation.entities.devices.enums import DeviceEnrollmentBulkDeleteStatusEnum from mbed_cloud.foundation.entities.devices.enums import DeviceEnrollmentDenialOrderEnum from mbed_cloud.foundation.entities.devices.enums import DeviceEnrollmentOrderEnum +from mbed_cloud.foundation.entities.devices.enums import DeviceLifecycleStatusEnum from mbed_cloud.foundation.entities.devices.enums import DeviceMechanismEnum from mbed_cloud.foundation.entities.devices.enums import DeviceStateEnum from mbed_cloud.foundation.entities.security.enums import CertificateEnrollmentEnrollResultEnum @@ -166,12 +226,27 @@ __all__ = [ + "AccountBusinessModelEnum", "AccountMfaStatusEnum", "AccountOrderEnum", "AccountStatusEnum", "ApiKeyOrderEnum", "ApiKeyStatusEnum", + "IdentityProviderAlgorithmEnum", + "IdentityProviderOrderEnum", + "IdentityProviderStatusEnum", + "IdentityProviderTypeEnum", + "LoginProfileTypeEnum", + "OidcRequestTokenModeEnum", + "PolicyGroupOrderEnum", + "PolicyInheritedTypeEnum", + "SubtenantApiKeyOrderEnum", "SubtenantApiKeyStatusEnum", + "SubtenantIdentityProviderAlgorithmEnum", + "SubtenantIdentityProviderOrderEnum", + "SubtenantIdentityProviderStatusEnum", + "SubtenantPolicyGroupOrderEnum", + "SubtenantUserOrderEnum", "SubtenantUserStatusEnum", "UserInvitationOrderEnum", "UserOrderEnum", @@ -188,13 +263,18 @@ "CampaignStatisticsIdEnum", "CampaignStatisticsSummaryStatusEnum", "FirmwareImageOrderEnum", + "FirmwareManifestDeliveredPayloadTypeEnum", "FirmwareManifestOrderEnum", + "FirmwareManifestSchemaVersionEnum", "UpdateCampaignOrderEnum", + "UpdateCampaignPhaseEnum", + "UpdateCampaignStrategyEnum", "DeviceDeployedStateEnum", "DeviceEnrollmentBulkCreateStatusEnum", "DeviceEnrollmentBulkDeleteStatusEnum", "DeviceEnrollmentDenialOrderEnum", "DeviceEnrollmentOrderEnum", + "DeviceLifecycleStatusEnum", "DeviceMechanismEnum", "DeviceStateEnum", "CertificateEnrollmentEnrollResultEnum",