@@ -46,6 +46,7 @@ Ensure you have `curl` installed on your system. You will use it to make API cal
46
46
## Ingest wellbore data by using ` curl `
47
47
48
48
To ingest a sample wellbore data CSV file into the Azure Data Manager for Energy instance, complete the following steps:
49
+ Replace the placeholders (` <DNS> ` , ` <access_token> ` , etc.) with the appropriate values.
49
50
50
51
### 1. Create a Schema
51
52
@@ -82,7 +83,14 @@ curl -X POST "https://<DNS>/api/schema-service/v1/schema" \
82
83
}'
83
84
```
84
85
85
- Replace the placeholders (` <DNS> ` , ` <access_token> ` , etc.) with the appropriate values. Save the ` id ` from the response for use in subsequent steps.
86
+ ** Sample Response:**
87
+ ``` json
88
+ {
89
+ "id" : " schema-12345" ,
90
+ "status" : " DEVELOPMENT"
91
+ }
92
+ ```
93
+ Save the ` id ` from the response for use in subsequent steps.
86
94
87
95
### 2. Create a Legal Tag
88
96
@@ -109,6 +117,14 @@ curl -X POST "https://<DNS>/api/legal/v1/legaltags" \
109
117
}'
110
118
```
111
119
120
+ ** Sample Response:**
121
+ ``` json
122
+ {
123
+ "name" : " LegalTagName" ,
124
+ "status" : " Created"
125
+ }
126
+ ```
127
+
112
128
### 3. Get a Signed URL for Uploading a CSV File
113
129
114
130
Run the following ` curl ` command to get a signed URL:
@@ -119,6 +135,14 @@ curl -X GET "https://<DNS>/api/file/v2/files/uploadURL" \
119
135
-H " data-partition-id: <data-partition-id>"
120
136
```
121
137
138
+ ** Sample Response:**
139
+ ``` json
140
+ {
141
+ "SignedURL" : " https://storageaccount.blob.core.windows.net/container/file.csv?sv=..." ,
142
+ "FileSource" : " file-source-12345"
143
+ }
144
+ ```
145
+
122
146
Save the ` SignedURL ` and ` FileSource ` from the response for use in the next steps.
123
147
124
148
### 4. Upload a CSV File
@@ -129,6 +153,13 @@ Download the [Wellbore.csv](https://github.com/microsoft/meds-samples/blob/main/
129
153
curl -X PUT -T " Wellbore.csv" " <SignedURL>" -H " x-ms-blob-type: BlockBlob"
130
154
```
131
155
156
+ ** Sample Response:**
157
+ ``` json
158
+ {
159
+ "status" : " Success"
160
+ }
161
+ ```
162
+
132
163
### 5. Upload CSV File Metadata
133
164
134
165
Run the following ` curl ` command to upload metadata for the CSV file:
@@ -158,6 +189,15 @@ curl -X POST "https://<DNS>/api/file/v2/files/metadata" \
158
189
}
159
190
}'
160
191
```
192
+
193
+ ** Sample Response:**
194
+ ``` json
195
+ {
196
+ "id" : " metadata-12345" ,
197
+ "status" : " Created"
198
+ }
199
+ ```
200
+
161
201
Save the ` id ` , which is the uploaded file's id, from the response for use in the next step.
162
202
163
203
@@ -177,6 +217,15 @@ curl -X POST "https://<DNS>/api/workflow/v1/workflow/csv-parser/workflowRun" \
177
217
}
178
218
}'
179
219
```
220
+
221
+ ** Sample Response:**
222
+ ``` json
223
+ {
224
+ "runId" : " workflow-12345" ,
225
+ "status" : " Running"
226
+ }
227
+ ```
228
+
180
229
Save the ` runId ` from the response for use in the next step.
181
230
182
231
### 7. Check the status of the workflow and wait for its completion.
@@ -189,6 +238,15 @@ curl -X GET "https://<DNS>/api/workflow/v1/workflow/csv-parser/workflowRun/<runI
189
238
-H " Content-Type: application/json" \
190
239
-H " data-partition-id: <data-partition-id>"
191
240
```
241
+
242
+ ** Sample Response:**
243
+ ``` json
244
+ {
245
+ "runId" : " workflow-12345" ,
246
+ "status" : " Completed"
247
+ }
248
+ ```
249
+
192
250
Keep checking every few seconds, until the response indicates a sccessful completion.
193
251
194
252
### 8. Search for Ingested CSV Records
@@ -205,6 +263,19 @@ curl -X POST "https://<DNS>/api/search/v2/query" \
205
263
}'
206
264
```
207
265
266
+ ** Sample Response:**
267
+ ``` json
268
+ {
269
+ "results" : [
270
+ {
271
+ "id" : " dataset-12345" ,
272
+ "kind" : " osdu:wks:dataset--File.Generic:1.0.0" ,
273
+ "status" : " Available"
274
+ }
275
+ ]
276
+ }
277
+ ```
278
+
208
279
You should be able to see the records in the search results.
209
280
210
281
## Next step
0 commit comments