Skip to content

Commit 97ce157

Browse files
committed
updated POST
1 parent 6eff6ef commit 97ce157

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

graph/patterns/LRO.gif

2.74 KB
Loading

graph/patterns/RELO.gif

2.97 KB
Loading

graph/patterns/longRunningOperations.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Guidelines](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md
5252

5353
There are some deviations from the base guidelines where Microsoft Graph API standards require that you do one of the following:
5454

55-
- For RELO pattern you should return the Content-Location header that indicates the location of the resource.
56-
- The API response says the targeted resource is being created by returning a 201 status code and the resource URI is provided in the Content-Location header, but the response indicates that the request is not completed by including "Provisioning" status.
55+
- For RELO pattern you should return the Location header that indicates the location of the resource.
56+
- The API response says the targeted resource is being created by returning a 201 status code and the resource URI is provided in the Location header, but the response indicates that the request is not completed by including "Provisioning" status.
5757

5858
- For LRO pattern you should return the Location header that indicates the location of a new stepwise operation resource.
5959
- The API response says the operation resource is being created at the URL provided in the Location header and indicates that the request is not completed by including a 202 status code.
@@ -113,7 +113,7 @@ A client wants to provision a new database
113113
POST https://graph.microsoft.com/v1.0/storage/databases/
114114
115115
{
116-
"id": "db1",
116+
"displayName": "Retail DB",
117117
}
118118
```
119119

@@ -123,10 +123,11 @@ Content-Location header and status property in the response payload.
123123

124124
```
125125
HTTP/1.1 201 Created
126-
Content-Location: https://graph.microsoft.com/v1.0/storage/databases/db1
126+
Location: https://graph.microsoft.com/v1.0/storage/databases/db1
127127
128128
{
129129
"id": "db1",
130+
"displayName": "Retail DB",
130131
"status": "provisioning",
131132
[ … other fields for "database" …]
132133
}
@@ -139,6 +140,7 @@ GET https://graph.microsoft.com/v1.0/storage/databases/db1
139140
HTTP/1.1 200 Ok
140141
{
141142
"id": "db1",
143+
"displayName": "Retail DB",
142144
"status": "succeeded",
143145
[ … other fields for "database" …]
144146
}
@@ -156,22 +158,24 @@ DELETE https://graph.microsoft.com/v1.0/storage/databases/db1
156158

157159
The API responds synchronously that the database is being deleted and indicates
158160
that the operation is accepted and is not fully completed by including the
159-
Content-Location header and status property in the response payload.
161+
status property in the response payload. The API might provide a
162+
recommendation to wait for 30 seconds.
160163

161164
```
162165
HTTP/1.1 202 Accepted
163-
Content-Location: https://graph.microsoft.com/v1.0/storage/databases/db1
166+
Retry-After: 30
164167
165168
{
166169
"id": "db1",
170+
"displayName": "Retail DB",
167171
"status": "deleting",
168172
[ … other fields for "database" …]
169173
}
170174
```
171175
The client waits for a period of time then invokes another request to try to get the deletion status.
172176

173177
```
174-
GET https://graph.microsoft.com/v1.0/storage/db1
178+
GET https://graph.microsoft.com/v1.0/storage/databases/db1
175179
176180
HTTP/1.1 404 Not Found
177181
```
@@ -181,7 +185,7 @@ HTTP/1.1 404 Not Found
181185
POST https://graph.microsoft.com/v1.0/storage/databases/
182186
183187
{
184-
"id": "db1",
188+
"displayName": "Retail DB",
185189
}
186190
```
187191

@@ -211,6 +215,7 @@ Retry-After: 30
211215
212216
{
213217
"createdDateTime": "2015-06-19T12-01-03.4Z",
218+
"lastActionDateTime": "2015-06-19T12-01-03.45Z",
214219
"status": "running"
215220
}
216221
```

0 commit comments

Comments
 (0)