Standard Service Management Automation POST/GET/PUT/DELETE Headers
Below are examples of Create (POST), Read (GET), Update (PUT/MERGE), and Delete (DELETE) headers.
Included are example Request and Response headers for each operation.
Important
The below requests show the headers for regular CRUD (Create, Read, Update, Delete) operations on entities, not for actions on entities such as starting a runbook.
Create (POST) Headers
Request
Example POST Request Header |
---|
POST https://sma-server:9090/00000000-0000-0000-0000-000000000000/Variables HTTP/1.1 |
User-Agent: Microsoft ADO.NET Data Services |
Accept-Charset: UTF-8 |
Content-Type: application/atom+xml |
DataServiceVersion: 1.0;NetFx |
MaxDataServiceVersion: 3.0;NetFx |
Accept: application/atom+xml,application/xml |
Authorization: Negotiate <TOKEN STRING> |
Host: sma-server:9090 |
Content-Length: 1007 |
Expect: 100-continue |
Response
Example POST Response Header |
---|
HTTP/1.1 201 Created |
Cache-Control: no-cache |
Content-Length: 1292 |
Content-Type: application/atom+xml;type=entry;charset=utf-8 |
Location: https://sma-server:9090/00000000-0000-0000-0000-000000000000/Variables(guid'2f46304e-e9c4-42a6-873a-028d14aa18b7') |
Server: Microsoft-IIS/8.5 |
Set-Cookie: ASP.NET_SessionId=2y1us3z3xf0dqqyronha3fzm; path=/; HttpOnly |
X-Content-Type-Options: nosniff |
DataServiceVersion: 1.0; |
X-AspNet-Version: 4.0.30319 |
Persistent-Auth: true |
X-Powered-By: ASP.NET |
Date: Wed, 02 Apr 2014 17:31:24 GMT |
Read (GET) Headers
Request
Example GET Request Header |
---|
GET https://sma-server:9090/00000000-0000-0000-0000-000000000000/Runbooks(guid'ec1c8f52-c5d4-4acc-a42b-19a55764ae90') HTTP/1.1 |
User-Agent: Microsoft ADO.NET Data Services |
Accept-Charset: UTF-8 |
DataServiceVersion: 1.0;NetFx |
MaxDataServiceVersion: 3.0;NetFx |
Accept: application/atom+xml,application/xml |
Authorization: Negotiate <TOKEN STRING> |
Host: sma-server:9090 |
Response
Example GET Response Header |
---|
HTTP/1.1 200 OK |
Cache-Control: no-cache |
Content-Length: 3960 |
Content-Type: application/atom+xml;type=entry;charset=utf-8 |
Server: Microsoft-IIS/8.5 |
Set-Cookie: ASP.NET_SessionId=rcgpfzp0sphmll0uk4o1zqo2; path=/; HttpOnly |
X-Content-Type-Options: nosniff |
DataServiceVersion: 1.0; |
X-AspNet-Version: 4.0.30319 |
Persistent-Auth: true |
X-Powered-By: ASP.NET |
Date: Wed, 02 Apr 2014 17:04:00 GMT |
Update (PUT/MERGE) Headers
Request
Example MERGE Request Header |
---|
MERGE https://sma-server:9090/00000000-0000-0000-0000-000000000000/Schedules(guid'36acbbcd-311e-4229-9343-45e87ace4fd5') HTTP/1.1 |
User-Agent: Microsoft ADO.NET Data Services |
Accept-Charset: UTF-8 |
Content-Type: application/atom+xml |
DataServiceVersion: 1.0;NetFx |
MaxDataServiceVersion: 3.0;NetFx |
Accept: application/atom+xml,application/xml |
Host: waplabvm4:9090 |
Content-Length: 1279 |
Expect: 100-continue |
Response
Example MERGE Response Header |
---|
HTTP/1.1 204 No Content |
Cache-Control: no-cache |
Server: Microsoft-IIS/8.5 |
Set-Cookie: ASP.NET_SessionId=w1mp4m41ihoatap02l1gg4as; path=/; HttpOnly |
X-Content-Type-Options: nosniff |
DataServiceVersion: 1.0; |
X-AspNet-Version: 4.0.30319 |
Persistent-Auth: true |
X-Powered-By: ASP.NET |
Date: Tue, 01 Apr 2014 21:25:08 GMT |
Delete (DELETE) Headers
Request
Example DELETE Request Header |
---|
DELETE https://sma-server:9090/00000000-0000-0000-0000-000000000000/Runbooks(guid'83357133-17ba-4165-bdbc-16d35dd4e2cd') HTTP/1.1 |
User-Agent: Microsoft ADO.NET Data Services |
Accept-Charset: UTF-8 |
DataServiceVersion: 1.0;NetFx |
MaxDataServiceVersion: 3.0;NetFx |
Accept: application/atom+xml,application/xml |
Host: waplabvm4:9090 |
Content-Length: 0 |
Response
Example DELETE Response Header |
---|
HTTP/1.1 204 No Content |
Cache-Control: no-cache |
Server: Microsoft-IIS/8.5 |
Set-Cookie: ASP.NET_SessionId=5rzdqid0vhh2zw2mskrmi4a5; path=/; HttpOnly |
X-Content-Type-Options: nosniff |
DataServiceVersion: 1.0; |
X-AspNet-Version: 4.0.30319 |
Persistent-Auth: true |
X-Powered-By: ASP.NET |
Date: Wed, 02 Apr 2014 16:31:15 GMT |
See Also
Concepts
OData Queries Using the Service Management Automation Web Service
Authentication and Authorization
Paging in Service Management Automation Web Service
Programming Using the Service Management Automation Web Service
Service Management Automation Web Service Fundamentals
Other Resources
Service Management Automation Web Service Error Messages [SMA SDK]