-
Notifications
You must be signed in to change notification settings - Fork 326
Postman Table API
xiaonlimsft edited this page Jul 28, 2020
·
1 revision
- Copy and save following template as a local JSON file, for example
tables.json
. - Install and open Postman.
- Click "Import" and select
tables.json
to import APIs into Postman. - Create following 2 environment variables in Postman:
-
tableendpoint
http://127.0.0.1:10002/devstoreaccount1 -
sas
sv=2016-05-31&sig=SL1tiZVonWXUNfh93EQHCpz5DKYSeie5%2F7jeyK58yeI%3D&st=2018-12-17T06%3A10%3A39Z&se=2020-12-17T06%3A10%3A39Z&srt=sco&ss=bfqt&sp=racupwdl
- Refer to https://docs.microsoft.com/en-us/rest/api/storageservices/table-service-rest-api as full API definitions.
{
"info": {
"_postman_id": "b0310567-2ab2-4b23-a535-2200fe640d86",
"name": "Azure V3 Table",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Create Table",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json;odata=fullmetadata",
"type": "text"
},
{
"key": "Accept",
"value": "application/json;odata=minimalmetadata",
"type": "text",
"disabled": true
},
{
"key": "Accept",
"value": "application/json;odata=nometadata",
"type": "text",
"disabled": true
},
{
"key": "Accept",
"value": "application/atom+xml",
"type": "text",
"disabled": true
},
{
"key": "Prefer",
"value": "return-content",
"type": "text",
"disabled": true
},
{
"key": "Prefer",
"value": "return-content",
"description": "return-content,return-no-content",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{ \r\n \"TableName\":\"mytable2ds\" \r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{tableendpoint}}/Tables?{{sas}}",
"host": [
"{{tableendpoint}}"
],
"path": [
"Tables"
],
"query": [
{
"key": "{{sas}}",
"value": null
}
]
}
},
"response": []
},
{
"name": "Query Tables",
"request": {
"method": "GET",
"header": [
{
"key": "MaxDataServiceVersion",
"value": "MaxDataServiceVersionValue",
"type": "text"
},
{
"key": "DataServiceVersion",
"value": "DataServiceVersionValue",
"type": "text"
},
{
"key": "Accept",
"value": "application/json;odata=nometadata",
"type": "text"
},
{
"key": "x-ms-client-request-id",
"value": "abc",
"type": "text"
}
],
"url": {
"raw": "{{tableendpoint}}/Tables?{{sas}}&NextTableName=nextTable&$format=formatcontent&$top=20&$select=$select&$filter=filter",
"host": [
"{{tableendpoint}}"
],
"path": [
"Tables"
],
"query": [
{
"key": "{{sas}}",
"value": null
},
{
"key": "NextTableName",
"value": "nextTable"
},
{
"key": "$format",
"value": "formatcontent"
},
{
"key": "$top",
"value": "20"
},
{
"key": "$select",
"value": "$select"
},
{
"key": "$filter",
"value": "filter"
}
]
}
},
"response": []
},
{
"name": "Delete Table",
"request": {
"method": "DELETE",
"header": [
{
"key": "x-ms-version",
"value": "x-ms-version",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "x-ms-client-request-id",
"value": "x-ms-request-id",
"type": "text"
}
],
"url": {
"raw": "{{tableendpoint}}/Tables('mytable')?{{sas}}",
"host": [
"{{tableendpoint}}"
],
"path": [
"Tables('mytable')"
],
"query": [
{
"key": "{{sas}}",
"value": null
}
]
}
},
"response": []
},
{
"name": "Get Table ACL",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{tableendpoint}}/mytable?comp=acl",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable"
],
"query": [
{
"key": "comp",
"value": "acl"
}
]
}
},
"response": []
},
{
"name": "Set Table ACL",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<SignedIdentifiers> \n <SignedIdentifier> \n <Id>unique-64-character-value</Id> \n <AccessPolicy> \n <Start>start-time</Start> \n <Expiry>expiry-time</Expiry> \n <Permission>abbreviated-permission-list</Permission> \n </AccessPolicy> \n </SignedIdentifier> \n</SignedIdentifiers> ",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{tableendpoint}}/mytable?comp=acl",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable"
],
"query": [
{
"key": "comp",
"value": "acl"
}
]
}
},
"response": []
},
{
"name": "Query Entities With Primary Key & Row Key",
"request": {
"method": "GET",
"header": [
{
"key": "x-ms-client-request-id",
"value": "x-ms-client-request-id",
"type": "text"
},
{
"key": "DataServiceVersion",
"value": "DataServiceVersion",
"type": "text"
}
],
"url": {
"raw": "{{tableendpoint}}/mytable(PartitionKey='<partition-key>',RowKey='<row-key>')?$select=<comma-separated-property-names>&$filter=<query-expression>&$top=20&$format=format",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable(PartitionKey='<partition-key>',RowKey='<row-key>')"
],
"query": [
{
"key": "$select",
"value": "<comma-separated-property-names>"
},
{
"key": "$filter",
"value": "<query-expression>"
},
{
"key": "$top",
"value": "20"
},
{
"key": "$format",
"value": "format"
}
]
}
},
"response": []
},
{
"name": "Query Entities",
"request": {
"method": "GET",
"header": [
{
"key": "x-ms-client-request-id",
"value": "x-ms-client-request-id",
"type": "text"
}
],
"url": {
"raw": "{{tableendpoint}}/mytable()?$select=<comma-separated-property-names>&$filter=<query-expression>&$top=20",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable()"
],
"query": [
{
"key": "$select",
"value": "<comma-separated-property-names>"
},
{
"key": "$filter",
"value": "<query-expression>"
},
{
"key": "$top",
"value": "20"
}
]
}
},
"response": []
},
{
"name": "Insert Entity",
"request": {
"method": "POST",
"header": [
{
"key": "x-ms-client-request-id",
"type": "text",
"value": "x-ms-client-request-id"
},
{
"key": "Accept",
"type": "text",
"value": "application/json;odata=fullmetadata"
},
{
"key": "Prefer",
"value": "return-content",
"description": "return-content,return-no-content",
"type": "text"
},
{
"key": "x-ms-client-request-id",
"value": "x-ms-client-request-id",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "DataServiceVersion",
"value": "DataServiceVersion",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "raw",
"raw": "{ \n \"Address\":\"Mountain View\", \n \"Age\":23, \n \"AmountDue\":200.23, \n \"CustomerCode@odata.type\":\"Edm.Guid\", \n \"CustomerCode\":\"c9da6455-213d-42c9-9a79-3e9149a57833\", \n \"CustomerSince@odata.type\":\"Edm.DateTime\", \n \"CustomerSince\":\"2008-07-10T00:00:00\", \n \"IsActive\":true, \n \"NumberOfOrders@odata.type\":\"Edm.Int64\", \n \"NumberOfOrders\":\"255\", \n \"PartitionKey2\":\"mypartitionkeys2s\", \n \"RowKey\":\"myrowkey\" \n} ",
"options": {
"raw": {}
}
},
"url": {
"raw": "{{tableendpoint}}/mytable?timeout=123&{{sas}}",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable"
],
"query": [
{
"key": "timeout",
"value": "123"
},
{
"key": "$format",
"value": "$format",
"disabled": true
},
{
"key": "{{sas}}",
"value": null
}
]
}
},
"response": []
},
{
"name": "Update Entity",
"request": {
"method": "PUT",
"header": [
{
"key": "x-ms-client-request-id",
"type": "text",
"value": "x-ms-client-request-id"
},
{
"key": "DataServiceVersion",
"type": "text",
"value": "DataServiceVersion"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
},
{
"key": "If-Match",
"value": "*",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{ \n \"Address\":\"Santa Clara\", \n \"Age\":23, \n \"AmountDue\":200.23, \n \"CustomerCode@odata.type\":\"Edm.Guid\", \n \"CustomerCode\":\"c9da6455-213d-42c9-9a79-3e9149a57833\", \n \"CustomerSince@odata.type\":\"Edm.DateTime\", \n \"CustomerSince\":\"2008-07-10T00:00:00\", \n \"IsActive\":false, \n \"NumberOfOrders@odata.type\":\"Edm.Int64\", \n \"NumberOfOrders\":\"255\", \n \"PartitionKey\":\"mypartitionkey\", \n \"RowKey\":\"myrowkey\" \n} ",
"options": {
"raw": {}
}
},
"url": {
"raw": "{{tableendpoint}}/mytable(PartitionKey='<partition-key>',RowKey='<row-key>')?timeout=120",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable(PartitionKey='<partition-key>',RowKey='<row-key>')"
],
"query": [
{
"key": "$select",
"value": "<comma-separated-property-names>",
"disabled": true
},
{
"key": "$filter",
"value": "<query-expression>",
"disabled": true
},
{
"key": "$top",
"value": "20",
"disabled": true
},
{
"key": "$format",
"value": "format",
"disabled": true
},
{
"key": "timeout",
"value": "120"
}
]
}
},
"response": []
},
{
"name": "Merge Entity",
"request": {
"method": "PATCH",
"header": [
{
"key": "x-ms-client-request-id",
"type": "text",
"value": "x-ms-client-request-id"
},
{
"key": "DataServiceVersion",
"type": "text",
"value": "DataServiceVersion"
},
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "If-Match",
"type": "text",
"value": "*"
}
],
"body": {
"mode": "raw",
"raw": "{ \n \"Address\":\"Santa Clara\", \n \"Age\":23, \n \"AmountDue\":200.23, \n \"CustomerCode@odata.type\":\"Edm.Guid\", \n \"CustomerCode\":\"c9da6455-213d-42c9-9a79-3e9149a57833\", \n \"CustomerSince@odata.type\":\"Edm.DateTime\", \n \"CustomerSince\":\"2008-07-10T00:00:00\", \n \"IsActive\":false, \n \"NumberOfOrders@odata.type\":\"Edm.Int64\", \n \"NumberOfOrders\":\"255\", \n \"PartitionKey\":\"mypartitionkey\", \n \"RowKey\":\"myrowkey\" \n} ",
"options": {
"raw": {}
}
},
"url": {
"raw": "{{tableendpoint}}/mytable(PartitionKey='<partition-key>',RowKey='<row-key>')?$format=format&timeout=120",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable(PartitionKey='<partition-key>',RowKey='<row-key>')"
],
"query": [
{
"key": "$select",
"value": "<comma-separated-property-names>",
"disabled": true
},
{
"key": "$filter",
"value": "<query-expression>",
"disabled": true
},
{
"key": "$top",
"value": "20",
"disabled": true
},
{
"key": "$format",
"value": "format"
},
{
"key": "timeout",
"value": "120"
}
]
}
},
"response": []
},
{
"name": "Delete Entity",
"request": {
"method": "DELETE",
"header": [
{
"key": "x-ms-client-request-id",
"type": "text",
"value": "x-ms-client-request-id"
},
{
"key": "DataServiceVersion",
"type": "text",
"value": "DataServiceVersion"
},
{
"key": "Content-Type",
"type": "text",
"value": "application/json"
},
{
"key": "If-Match",
"type": "text",
"value": "*"
}
],
"body": {
"mode": "raw",
"raw": "{ \n \"Address\":\"Santa Clara\", \n \"Age\":23, \n \"AmountDue\":200.23, \n \"CustomerCode@odata.type\":\"Edm.Guid\", \n \"CustomerCode\":\"c9da6455-213d-42c9-9a79-3e9149a57833\", \n \"CustomerSince@odata.type\":\"Edm.DateTime\", \n \"CustomerSince\":\"2008-07-10T00:00:00\", \n \"IsActive\":false, \n \"NumberOfOrders@odata.type\":\"Edm.Int64\", \n \"NumberOfOrders\":\"255\", \n \"PartitionKey\":\"mypartitionkey\", \n \"RowKey\":\"myrowkey\" \n} ",
"options": {
"raw": {}
}
},
"url": {
"raw": "{{tableendpoint}}/mytable(PartitionKey='<partition-key>',RowKey='<row-key>')?$format=format&timeout=120",
"host": [
"{{tableendpoint}}"
],
"path": [
"mytable(PartitionKey='<partition-key>',RowKey='<row-key>')"
],
"query": [
{
"key": "$select",
"value": "<comma-separated-property-names>",
"disabled": true
},
{
"key": "$filter",
"value": "<query-expression>",
"disabled": true
},
{
"key": "$top",
"value": "20",
"disabled": true
},
{
"key": "$format",
"value": "format"
},
{
"key": "timeout",
"value": "120"
}
]
}
},
"response": []
},
{
"name": "Set Table Service Properties",
"request": {
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<StorageServiceProperties> \n <Logging> \n <Version>version-number</Version> \n <Delete>true</Delete> \n <Read>false</Read> \n <Write>true</Write> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>10</Days> \n </RetentionPolicy> \n </Logging> \n <HourMetrics> \n <Version>version-number</Version> \n <Enabled>true</Enabled> \n <IncludeAPIs>true</IncludeAPIs> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>20</Days> \n </RetentionPolicy> \n </HourMetrics> \n <MinuteMetrics> \n <Version>version-number</Version> \n <Enabled>true</Enabled> \n <IncludeAPIs>true</IncludeAPIs> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>20</Days> \n </RetentionPolicy> \n </MinuteMetrics> \n <Cors> \n <CorsRule> \n <AllowedOrigins>comma-separated-list-of-allowed-origins</AllowedOrigins> \n <AllowedMethods>comma-separated-list-of-HTTP-verb</AllowedMethods> \n <MaxAgeInSeconds>234</MaxAgeInSeconds> \n <ExposedHeaders>comma-seperated-list-of-response-headers</ExposedHeaders> \n <AllowedHeaders> comma-seperated-list-of-request-headers </AllowedHeaders> \n </CorsRule> \n </Cors> \n</StorageServiceProperties>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{tableendpoint}}/?restype=service&comp=properties",
"host": [
"{{tableendpoint}}"
],
"path": [
""
],
"query": [
{
"key": "restype",
"value": "service"
},
{
"key": "comp",
"value": "properties"
}
]
}
},
"response": []
},
{
"name": "Get Table Service Properties Copy",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<StorageServiceProperties> \n <Logging> \n <Version>version-number</Version> \n <Delete>true</Delete> \n <Read>false</Read> \n <Write>true</Write> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>10</Days> \n </RetentionPolicy> \n </Logging> \n <HourMetrics> \n <Version>version-number</Version> \n <Enabled>true</Enabled> \n <IncludeAPIs>true</IncludeAPIs> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>20</Days> \n </RetentionPolicy> \n </HourMetrics> \n <MinuteMetrics> \n <Version>version-number</Version> \n <Enabled>true</Enabled> \n <IncludeAPIs>true</IncludeAPIs> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>20</Days> \n </RetentionPolicy> \n </MinuteMetrics> \n <Cors> \n <CorsRule> \n <AllowedOrigins>comma-separated-list-of-allowed-origins</AllowedOrigins> \n <AllowedMethods>comma-separated-list-of-HTTP-verb</AllowedMethods> \n <MaxAgeInSeconds>234</MaxAgeInSeconds> \n <ExposedHeaders>comma-seperated-list-of-response-headers</ExposedHeaders> \n <AllowedHeaders> comma-seperated-list-of-request-headers </AllowedHeaders> \n </CorsRule> \n </Cors> \n</StorageServiceProperties>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{tableendpoint}}/?restype=service&comp=properties",
"host": [
"{{tableendpoint}}"
],
"path": [
""
],
"query": [
{
"key": "restype",
"value": "service"
},
{
"key": "comp",
"value": "properties"
}
]
}
},
"response": []
},
{
"name": "Get Table Service Stats",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<StorageServiceProperties> \n <Logging> \n <Version>version-number</Version> \n <Delete>true</Delete> \n <Read>false</Read> \n <Write>true</Write> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>10</Days> \n </RetentionPolicy> \n </Logging> \n <HourMetrics> \n <Version>version-number</Version> \n <Enabled>true</Enabled> \n <IncludeAPIs>true</IncludeAPIs> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>20</Days> \n </RetentionPolicy> \n </HourMetrics> \n <MinuteMetrics> \n <Version>version-number</Version> \n <Enabled>true</Enabled> \n <IncludeAPIs>true</IncludeAPIs> \n <RetentionPolicy> \n <Enabled>true</Enabled> \n <Days>20</Days> \n </RetentionPolicy> \n </MinuteMetrics> \n <Cors> \n <CorsRule> \n <AllowedOrigins>comma-separated-list-of-allowed-origins</AllowedOrigins> \n <AllowedMethods>comma-separated-list-of-HTTP-verb</AllowedMethods> \n <MaxAgeInSeconds>234</MaxAgeInSeconds> \n <ExposedHeaders>comma-seperated-list-of-response-headers</ExposedHeaders> \n <AllowedHeaders> comma-seperated-list-of-request-headers </AllowedHeaders> \n </CorsRule> \n </Cors> \n</StorageServiceProperties>",
"options": {
"raw": {
"language": "xml"
}
}
},
"url": {
"raw": "{{tableendpoint}}/?restype=service&comp=stats",
"host": [
"{{tableendpoint}}"
],
"path": [
""
],
"query": [
{
"key": "restype",
"value": "service"
},
{
"key": "comp",
"value": "stats"
}
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}