diff --git a/reference/specs/bindings/blobstorage.md b/reference/specs/bindings/blobstorage.md index 73d0e53f9..94fe19dde 100644 --- a/reference/specs/bindings/blobstorage.md +++ b/reference/specs/bindings/blobstorage.md @@ -28,9 +28,67 @@ spec: ## Output Binding Supported Operations -* create +* [create](#create-blob) +* [get](#get-blob) -## Additional information + +## Create Blob + +To perform a get blob operation, invoke the Azure Blob Storage binding with a `POST` method and the following JSON body: + +```json +{ + "operation": "create", + "data": { + "field1": "value1" + } +} +``` + +Example: + +```bash + +curl -d '{ "operation": "create", "data": { "field1": "value1" }}' \ + http://localhost:/v1.0/bindings/ +``` + +### Response + +The response body will contain the following JSON: + +```json +{ + "blobURL": "https://. blob.core.windows.net//" +} + +``` + +## Get Blob + +To perform a get blob operation, invoke the Azure Blob Storage binding with a `POST` method and the following JSON body: + +```json +{ + "operation": "get", + "metadata": { + "blobName": "myblob" + } +} +``` + +Example: + +```bash +curl -d '{ "operation": "get", "metadata": { "blobName": "myblob" }}' \ + http://localhost:/v1.0/bindings/ +``` + +### Response + +The response body will contain the value stored in the blob object. + +## Metadata information By default the Azure Blob Storage output binding will auto generate a UUID as blob filename and not assign any system or custom metadata to it. It is configurable in the Metadata property of the message (all optional). @@ -50,4 +108,4 @@ Applications publishing to an Azure Blob Storage output binding should send a me }, "operation": "create" } -``` +``` \ No newline at end of file