-
Notifications
You must be signed in to change notification settings - Fork 10
/
Digital-Twins-Get-Component.yml
169 lines (161 loc) · 4.38 KB
/
Digital-Twins-Get-Component.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
### YamlMime:RESTOperation
uid: digitaltwins-hostname.dataplane.twins.digitaltwins_getcomponent
name: DigitalTwins GetComponent
service: Reference
groupName: Twins
apiVersion: 2023-10-31
summary: >-
Retrieves a component from a digital twin.
Status codes:
* 200 OK
* 400 Bad Request
* InvalidArgument - The digital twin id or component path is invalid.
* 404 Not Found
* DigitalTwinNotFound - The digital twin was not found.
* ComponentNotFound - The component path was not found.
consumes:
- application/json
produces:
- application/json
paths:
- content: GET https://digitaltwins-hostname/digitaltwins/{id}/components/{componentPath}?api-version=2023-10-31
uriParameters:
- name: id
in: path
isRequired: true
description: The id of the digital twin. The id is unique within the service and case sensitive.
types:
- uid: string
- name: componentPath
in: path
isRequired: true
description: The name of the DTDL component.
types:
- uid: string
- name: api-version
in: query
isRequired: true
description: The requested API version.
types:
- uid: string
responses:
- name: 200 OK
headers:
- name: ETag
value: string
description: Success
types:
- uid: Component
- name: Other Status Codes
headers:
- name: x-ms-error-code
value: string
description: Default response.
types:
- uid: ErrorResponse
requestHeader:
- name: traceparent
in: header
description: Identifies the request in a distributed tracing system.
types:
- uid: string
- name: tracestate
in: header
description: Provides vendor-specific trace identification information and is a companion to traceparent.
types:
- uid: string
definitions:
- name: ErrorResponse
description: Error response.
kind: object
properties:
- name: error
description: The error details.
types:
- uid: Error
- name: Error
description: Error definition.
kind: object
properties:
- name: code
isReadOnly: true
description: Service specific error code which serves as the substatus for the HTTP error code.
types:
- uid: string
- name: message
isReadOnly: true
description: A human-readable representation of the error.
types:
- uid: string
- name: details
isReadOnly: true
description: Internal error details.
types:
- uid: Error
isArray: true
- name: innererror
description: An object containing more specific information than the current object about the error.
types:
- uid: InnerError
- name: InnerError
description: A more specific error description than was provided by the containing error.
kind: object
properties:
- name: code
description: A more specific error code than was provided by the containing error.
types:
- uid: string
- name: innererror
description: An object containing more specific information than the current object about the error.
types:
- uid: InnerError
examples:
- name: Get a component in a digital twin
request:
uri: GET https://digitaltwins-hostname/digitaltwins/myTwinId/components/myComponent?api-version=2023-10-31
codeTab: |+
# [HTTP](#tab/HTTP)
``` http
GET https://digitaltwins-hostname/digitaltwins/myTwinId/components/myComponent?api-version=2023-10-31
```
responses:
- statusCode: "200"
body: >-
{
"property1": 1,
"property2": {
"subProperty1": "some value",
"subProperty2": "some other value"
},
"component1": {
"componentProperty": "some value",
"$metadata": {
"$lastUpdateTime": "2022-02-28T00:30:00.1234567Z",
"componentProperty": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
}
}
},
"$metadata": {
"$lastUpdateTime": "2022-02-28T00:30:00.1234567Z",
"property1": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
},
"property2": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
}
}
}
security:
- name: oauth2
type: oauth2
flow: implicit
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0
metadata:
description: >-
Retrieves a component from a digital twin.
Status codes:
200 OK
400 Bad Request
InvalidArgument - The digital twin id or component path is invalid.
errorCodes: []