这是关于基于REST调用到Windows表存储
清单表一些示例代码:
http://<storageaccount>.table.core.windows.net/Tables
删除表:
http://<storageaccount>.table.core.windows.net/Tables('TableName')
为了创建你有一个新的表创建POST请求到下一个Uri:
POST http://<storageaccount>.table.core.windows.net/Tables
这可能是您的要求的身体:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://www.w3.org/2005/Atom">
<title />
<updated>2010-11-18T11:48:34.9840639-07:00</updated>
<author>
<name/>
</author>
<id/>
<content type="application/xml">
<m:properties>
<d:TableName>ProductTable</d:TableName>
</m:properties>
</content>
</entry>
如果你需要插入一个新的实体,您应该使用下一个开放的:
POST http://<storageaccountname>.table.core.windows.net/<TableName>
和请求体为以下的Atom XML:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://www.w3.org/2005/Atom">
<title />
<updated>2010-12-13T13:26:48.8875037Z</updated>
<author>
<name />
</author>
<id />
<content type="application/xml">
<m:properties>
<d:Description>My descripcion</d:Description>
<d:Name>Entity Name</d:Name>
<d:PartitionKey>Definitions</d:PartitionKey>
<d:RowKey>Things</d:RowKey>
<d:Timestamp m:type="Edm.DateTime">0001-01-01T00:00:00</d:Timestamp>
</m:properties>
</content>
</entry>
删除实体
http://<storageaccountname>.table.core.windows.net/<TableName>(PartitionKey="Definitions",
RowKey="Things")
使用REST API来更新或合并数据实际上是DELETE和插入REST API的组合。 的URI来更新或合并本地实体回表存储是相同的URI删除操作
http://<storageaccountname>.table.core.windows.net/<TableName>(PartitionKey="Definitions",
RowKey="Things")
什么是你的应用程序的安全模型?您的应用的每个用户是否拥有存储帐户? (您不应将_your_存储钥匙交给客户端......任何使用存储钥匙的人都可以删除所有数据,将其替换为私人DVD收藏夹等) – smarx 2010-12-12 09:13:47
否..每个用户都不拥有存储帐户..什么是安全模型? – Aditya 2010-12-12 19:04:12
看看这个博客。似乎是全面的http://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/ – Chandermani 2010-12-13 12:34:52