Certificates - List By Iot Hub
Get the certificate list.
Returns the list of certificates.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates?api-version=2023-06-30
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string |
The name of the resource group that contains the IoT hub. |
|
resource
|
path | True |
string |
The name of the IoT hub. |
|
subscription
|
path | True |
string |
The subscription identifier. |
|
api-version
|
query | True |
string |
The version of the API. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The body contains all the certificate list. |
|
| Other Status Codes |
DefaultErrorResponse |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Certificates_ListByIotHub
Sample request
GET https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testhub/certificates?api-version=2023-06-30
Sample response
{
"value": [
{
"properties": {
"subject": "CN=testdevice1",
"expiry": "Sat, 31 Dec 2039 23:59:59 GMT",
"thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25",
"isVerified": false,
"created": "Thu, 12 Oct 2017 19:23:50 GMT",
"updated": "Thu, 12 Oct 2017 19:23:50 GMT",
"certificate": "############################################"
},
"id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert",
"name": "cert",
"type": "Microsoft.Devices/IotHubs/Certificates",
"etag": "AAAAAAExpNs="
}
]
}
Definitions
| Name | Description |
|---|---|
|
Certificate |
The X509 Certificate. |
|
Certificate |
The JSON-serialized array of Certificate objects. |
|
Certificate |
The description of an X509 CA Certificate. |
|
Error |
Error details. |
CertificateDescription
The X509 Certificate.
| Name | Type | Description |
|---|---|---|
| etag |
string |
The entity tag. |
| id |
string |
The resource identifier. |
| name |
string |
The name of the certificate. |
| properties |
The description of an X509 CA Certificate. |
|
| type |
string |
The resource type. |
CertificateListDescription
The JSON-serialized array of Certificate objects.
| Name | Type | Description |
|---|---|---|
| value |
The array of Certificate objects. |
CertificateProperties
The description of an X509 CA Certificate.
| Name | Type | Description |
|---|---|---|
| certificate |
string |
The certificate content |
| created |
string (date-time-rfc1123) |
The certificate's create date and time. |
| expiry |
string (date-time-rfc1123) |
The certificate's expiration date and time. |
| isVerified |
boolean |
Determines whether certificate has been verified. |
| subject |
string |
The certificate's subject name. |
| thumbprint |
string |
The certificate's thumbprint. |
| updated |
string (date-time-rfc1123) |
The certificate's last update date and time. |
ErrorDetails
Error details.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| details |
string |
The error details. |
| httpStatusCode |
string |
The HTTP status code. |
| message |
string |
The error message. |