Update StateAPI doc for GET/BULK GET State - metadata information (#780)

This commit is contained in:
Shalabh Mohan Shrivastava 2020-09-10 12:06:31 -07:00 committed by GitHub
parent 9629ff2cf8
commit 212d19a22f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -135,6 +135,7 @@ daprPort | the Dapr port
storename | ```metadata.name``` field in the user configured state store component yaml. Please refer Dapr State Store configuration structure mentioned above.
key | the key of the desired state
consistency | (optional) read consistency mode, see [state operation options](#optional-behaviors)
metadata | (optional) metadata as query parameters to the state store
### HTTP Response
@ -171,6 +172,12 @@ curl http://localhost:3500/v1.0/state/starwars/planet \
}
```
To pass metadata as query parammeter:
```http
GET http://localhost:3500/v1.0/state/starwars/planet?metadata.partitionKey=mypartitionKey
```
## Get bulk state
This endpoint lets you get a list of values for a given list of keys.
@ -188,6 +195,7 @@ Parameter | Description
daprPort | the Dapr port
storename | ```metadata.name``` field in the user configured state store component yaml. Please refer Dapr State Store configuration structure mentioned above.
consistency | (optional) read consistency mode, see [state operation options](#optional-behaviors)
metadata | (optional) metadata as query parameters to the state store
### HTTP Response
@ -229,6 +237,12 @@ curl http://localhost:3500/v1.0/state/myRedisStore/bulk \
},
]
```
To pass metadata as query parammeter:
```http
POST http://localhost:3500/v1.0/state/myRedisStore/bulk?metadata.partitionKey=mypartitionKey
```
## Delete state