AzureStorageBinder
- A binder REST service for Azure Storage APIs.These Binder APIs can be called from both Mobile and Web applications using corresponding client libraries.
- Dockerfile is included which would help containerize the service and also can be used seamlessly with Azure Container Registry or Docker Cloud or running locally. This would help in local testing and then hosting in Azure as Web API (or any other hosting services)
- No need to send Storage account details as part of the request (although that option is open); these secured information can be in Azure Web API layer and service can read from process.env dictionary
- Server host address is kept at 0.0.0.0 - so that it can be accesses from containerized hosting solutions like Docker Swarm
API Endpoints:
Default
URL - https://<host_server_details>
GET request body -
{ }
Table
-
URL - https://<host_server_details>/table/create
PUT request body -{ "tablename" : <TABLE_NAME> }
-
URL - https://<host_server_details>/table/delete
DELETE request body -{ "tablename" : <TABLE_NAME> }
-
URL - https://<host_server_details>/table/row/insert
PUT request body -{ "tablename" : <TABLE_NAME>, "entity" : { "PartitionKey" : <PARTITION_KEY>, "RowKey" : <ROW_KEY>, ... (OTHER FIELDS as per requirement) } }
-
URL - https://<host_server_details>/table/delete
DELETE request body -{ "tablename" : <TABLE_NAME>, "entity" : { "PartitionKey" : <PARTITION_KEY>, "RowKey" : <ROW_KEY> } }
-
URL - https://<host_server_details>/table/rows/insert
PUT request body -{ "tablename" : <TABLE_NAME>, "entity" : [{ "PartitionKey" : <PARTITION_KEY>, "RowKey" : <ROW_KEY>, ... (Other Fields as per requirement) }, ... (Other Entities) ] }
-
URL - https://<host_server_details>/table/fetch
GET query parameters -tablename=<TABKLE_NAME>&condition=<CONDITION>
-
URL - https://<host_server_details>/table/row/update
POST request body -{ "tablename" : <TABLE_NAME>, "entity" : { "PartitionKey" : <PARTITION_KEY>, "RowKey" : <ROW_KEY> } }
POST query parameters -
force=<boolean>&merge=<boolean>&where=<CONDITION>
-
URL - https://<host_server_details>/table/retrieve
GET request body -tablename=<TABLE_NAME>&partitionkey=<PARTITION_KEY>&rowkey=<ROW_KEY>
Blob
-
URL - https://<host_server_details>/blob/container/create
PUT request body -{ "containername" : <CONTAINER_NAME> }
-
URL - https://<host_server_details>/blob/container/delete
DELETE request body -{ "containername" : <CONTAINER_NAME> }
-
URL - https://<host_server_details>/blob/upload
POST request body -{ "containername" : <CONTAINER_NAME>, "blobname" : <BLOB_NAME> }
-
URL - https://<host_server_details>/blob/download
POST request body -{ "containername" : <CONTAINER_NAME>, "blobname" : <BLOB_NAME> }
-
URL - https://<host_server_details>/blob/delete
DELETE request body -{ "containername" : <CONTAINER_NAME>, "blobname" : <BLOB_NAME> }
Queue
-
URL - https://<host_server_details>/queue/create
PUT request body -{ "queuename" : <QUEUE_NAME> }
-
URL - https://<host_server_details>/queue/delete
DELETE request body -{ "queuename" : <QUEUE_NAME> }
-
URL - https://<host_server_details>/queue/message/add
PUT request body -{ "queuename" : <QUEUE_NAME>, "message" : <MESSAGE> }
-
URL - https://<host_server_details>/queue/message/delete
DELETE request body -{ "queuename" : <QUEUE_NAME>, "messageid" : <MESSAGE_ID>, "popreceipt" : <POP_RECEIPT_NUMBER> }
-
URL - https://<host_server_details>/queue/message/
POST request body -{ "queuename" : <QUEUE_NAME> }
-
URL - https://<host_server_details>/queue/messages/all
POST request body -{ "queuename" : <QUEUE_NAME> }
-
URL - https://<host_server_details>/queue/message/update
POST request body -{ "queuename" : <QUEUE_NAME>, "popreceipt" : <POP_RECEIPT_NUMBER>, "updatemessage" : { "messageText" : <MESSAGE_TEXT_TEXT> } }
-
URL - https://<host_server_details>/queue/dequeue
POST request body -{ "queuename" : <QUEUE_NAME> }
-
URL - https://<host_server_details>/queue/dequeue/all
POST request body -{ "queuename" : <QUEUE_NAME> }