特定のデバイス・モデルの取得
get
/iot/api/v2/deviceModels/{urn}
このリソースを使用すると、デバイス・モデルを取得できます
リクエスト
パス・パラメータ
- urn: string
返すデバイス・モデルのURN
問合せパラメータ
- expand(optional): string
結果で展開されるフィールドのリスト。 すべての展開可能なフィールドを結果に展開する場合は、allを使用します
- fields(optional): string
レスポンスとして表示されるフィールドのカンマ区切りリストです。 デフォルトではすべてのレスポンス・オブジェクト・フィールドが表示されます
レスポンス
サポートされているメディア・タイプ
- application/json
- application/vnd.oracle.resource+json;type=singular
200レスポンス
正常に処理されました
ルート・スキーマ: DeviceModelImpl_receive
型:
Show Source
object
- actions: array actions
プロパティの説明が設定されていません
- attributes: array attributes
プロパティの説明が設定されていません
- created: integer
プロパティの説明が設定されていません
- createdAsDate: integer
プロパティの説明が設定されていません
- description: string
プロパティの説明が設定されていません
- draft: boolean
プロパティの説明が設定されていません
- formatObjects: array formatObjects
プロパティの説明が設定されていません
- lastModified: integer
プロパティの説明が設定されていません
- lastModifiedAsDate: integer
プロパティの説明が設定されていません
- name: string
プロパティの説明が設定されていません
- system: boolean
プロパティの説明が設定されていません
- uRN: string
プロパティの説明が設定されていません
- userLastModified: string
プロパティの説明が設定されていません
ネストされたスキーマ: DeviceModelActionModel_receive
型:
Show Source
object
- alias: string
プロパティの説明が設定されていません
- argType: string
[STRING、NUMBER、BOOLEAN、INTEGER、DATETIME、URI]のいずれか。
- arguments: array arguments
プロパティの説明が設定されていません
- description: string
プロパティの説明が設定されていません
- name: string
プロパティの説明が設定されていません
- range: string
プロパティの説明が設定されていません
ネストされたスキーマ : DeviceModelActionArgumentModel_receive
型:
Show Source
object
- description: string
プロパティの説明が設定されていません
- name: string
プロパティの説明が設定されていません
- range: string
プロパティの説明が設定されていません
- type: string
[STRING、NUMBER、BOOLEAN、INTEGER、DATETIME、URI]のいずれか。
ネストされたスキーマ: DeviceModelAttributeModel_receive
型:
Show Source
object
- alias: string
プロパティの説明が設定されていません
- description: string
プロパティの説明が設定されていません
- name: string
プロパティの説明が設定されていません
- range: string
プロパティの説明が設定されていません
- type: string
[STRING、NUMBER、BOOLEAN、INTEGER、DATETIME、URI]のいずれか。
- writable: boolean
プロパティの説明が設定されていません
ネストされたスキーマ: MessageFormatModel_receive
型:
Show Source
object
- description: string
プロパティの説明が設定されていません
- deviceModel: string
プロパティの説明が設定されていません
- explorationId: string
プロパティの説明が設定されていません
- name: string
プロパティの説明が設定されていません
- severity: string
プロパティの説明が設定されていません
- sourceId: string
プロパティの説明が設定されていません
- sourceType: string
[UNKNOWN、DEVICE_MODEL、EXPLORATION、ANALYTICS]の1つ。
- type: string
[DATA、ALERT、EXPLORATION、EXPLORATION_DATA、EXPLORATION_ALERT、IACS_DATA、IACS_ALERT]のいずれか。
- uRN: string
プロパティの説明が設定されていません
- value: object MessageFormatValue_receive
ネストされたスキーマ: MessageFormatValue_receive
型:
Show Source
object
- fields: array fields
プロパティの説明が設定されていません
ネストされたスキーマ: MessageFormatField_receive
型:
Show Source
object
- name: string
プロパティの説明が設定されていません
- optional: boolean
プロパティの説明が設定されていません
- type: string
[STRING、NUMBER、BOOLEAN、INTEGER、DATETIME、URI]のいずれか。
400レスポンス
不正リクエスト。 構文が正しくないため、リクエストがサーバーで認識できませんでした。 クライアントが変更なしにリクエストを繰り返すことはできません。
401レスポンス
未認可。 リクエストにはユーザー認証が必要です。
403レスポンス
禁止。 サーバーはリクエストを理解しましたが、その実行を拒否しました。 認証では解決できないため、リクエストを繰り返さないでください。
404レスポンス
未検出。 サーバーは、リクエストURIに一致するものを見つけられませんでした。 この状態が一時的か恒久的かにかかわらず、指示は与えられません。
406レスポンス
リクエストは受け入れられません。 リクエストによって識別されるリソースは、リクエストで送信されたAcceptヘッダーによって受け入れられない内容特性を持つレスポンス・エンティティを生成する能力のみを持ちます。
例
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/iot/api/v2/deviceModels/{urn}
レスポンス本文の例
次の例は、レスポンス本文の内容をJSON形式で示しています:
{
"urn":"urn:example:unique:identifier:of:the:resource:4675",
"name":"Human friendly name of the device model",
"description":"Optional description of the device model",
"system":false,
"draft":false,
"created":1469184297746,
"createdAsString":"2016-07-22T10:44:57.746Z",
"lastModified":1469184297746,
"lastModifiedAsString":"2016-07-22T10:44:57.746Z",
"userLastModified":"Name of the user who last to modify this device model",
"attributes":[
{
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive.",
"alias":"Optional alternative name. This property is deprecated and should not be used for new or updated device models.",
"writable":false,
"description":"A human friendly description",
"name":"A name for the attribute. Name can contain only A-Z, a-z, 0-9 or underscore (_) characters.",
"type":"The data typeOne of [STRING, NUMBER, BOOLEAN, INTEGER, DATETIME, URI]."
}
],
"actions":[
{
"argType":"If it is specified, then there is a single required argument. If neither this nor arguments field is present, then action has no arguments. Is not allowed when arguments field is specified.One of [STRING, NUMBER, BOOLEAN, INTEGER, DATETIME, URI].",
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive. Is not allowed when arguments field is specified.",
"alias":"Optional alternative name. This property is deprecated and should not be used for new or updated device models.",
"description":"A human friendly description",
"arguments":[
{
"range":"For NUMBERs and INTEGERs only, defines the acceptable range of values such as '1,10'. This range is inclusive.",
"description":"A human friendly description",
"name":"A name for the action",
"type":"Argument type.One of [STRING, NUMBER, BOOLEAN, INTEGER, DATETIME, URI]."
}
],
"name":"A name for the action"
}
],
"formats":[
{
"urn":"urn:example:unique:identifier:of:the:resource:82d",
"name":"Message format name",
"description":"Message format description",
"type":"Message format typeOne of [DATA, ALERT, EXPLORATION, EXPLORATION_DATA, EXPLORATION_ALERT, IACS_DATA, IACS_ALERT].",
"deviceModel":"Device model that created this message format",
"value":{
"fields":[
{
"optional":false,
"name":"Name of the message format field. Name can contain only A-Z, a-z, 0-9 or underscore (_) characters.",
"type":"Type of the message format fieldOne of [STRING, NUMBER, BOOLEAN, INTEGER, DATETIME, URI]."
}
]
},
"explorationID":"ID of an exploration assocoated with the message format",
"severity":"The severity of exploration's alert message format",
"sourceType":"Type of the source from which format was createdOne of [UNKNOWN, DEVICE_MODEL, EXPLORATION, ANALYTICS].",
"sourceId":"4ee06d3d1033-34ca"
}
],
"devicePolicies":{
"links":[
{
"rel":"self",
"href":"https://iotserver/iot/api/version/resource/path"
},
{
"rel":"canonical",
"href":"https://iotserver/iot/api/version/resource/path"
}
]
}
}
完全なcURLの例
以下の例は、記述された操作を実行するために使用できる完全なcURLコマンドを示しています:
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/iot/api/v2/deviceModels/urn:example:unique:identifier:of:the:resource:5d21
このリクエストでは、
https://iotserver
は、割り当てられたIoTクラウド・サービス・インスタンスの名前とポートに置き換えられます。 クラウド・サービスのインスタンスの形式はhttps://myinstance-myidentitydomain.iot.us.oraclecloud.com
で、デフォルトのポートは443です。