Updating Actor api refs to remove non transactional state apis.

This commit is contained in:
Aman Bhardwaj 2020-01-21 14:34:03 -08:00
parent 48714ffd42
commit c4174a90c6
1 changed files with 34 additions and 64 deletions

View File

@ -49,42 +49,10 @@ curl -X POST http://localhost:3500/v1.0/actors/x-wing/33/method/fly \
> The response from the remote endpoint will be returned in the request body.
### Save Actor State
Saves the state for an actor using a specified key.
### Actor State Changes - Transaction
#### HTTP Request
`POST/PUT http://localhost:<daprPort>/v1.0/actors/<actorType>/<actorId>/state/<key>`
#### HTTP Response Codes
Code | Description
---- | -----------
201 | Request successful
500 | Request failed
404 | Actor not found
#### URL Parameters
Parameter | Description
--------- | -----------
daprPort | The Dapr port.
actorType | The actor type.
actorId | The actor ID.
key | The key for the state value.
```shell
curl -X POST http://localhost:3500/v1.0/actors/stormtrooper/50/state/location \
-H "Content-Type: application/json"
-d '{
"location": "Alderaan"
}'
```
### Save Actor State - Transaction
Saves the state for an actor as a multi-item transaction.
Persists the changed to the state for an actor as a multi-item transaction.
***Note that this operation is dependant on a state store that supports multi-item transactions.***
@ -166,36 +134,6 @@ curl http://localhost:3500/v1.0/actors/stormtrooper/50/state/location \
}
```
### Delete Actor State
Deletes the state for an actor using a specified key.
#### HTTP Request
`DELETE http://localhost:<daprPort>/v1.0/actors/<actorType>/<actorId>/state/<key>`
#### HTTP Response Codes
Code | Description
---- | -----------
200 | Request successful
500 | Request failed
404 | Actor not found
#### URL Parameters
Parameter | Description
--------- | -----------
daprPort | The Dapr port.
actorType | The actor type.
actorId | The actor ID.
key | The key for the state value.
```shell
curl http://localhost:3500/v1.0/actors/stormtrooper/50/state/location \
-X "Content-Type: application/json"
```
### Create Actor Reminder
Creates a persistent reminder for an actor.
@ -471,6 +409,38 @@ curl -X DELETE http://localhost:3000/actors/stormtrooper/50 \
-H "Content-Type: application/json"
```
### Invoke Actor method
Invokes a method for an actor.
#### HTTP Request
`PUT http://localhost:<appPort>/actors/<actorType>/<actorId>/method/<methodName>`
#### HTTP Response Codes
Code | Description
---- | -----------
200 | Request successful
500 | Request failed
404 | Actor not found
#### URL Parameters
Parameter | Description
--------- | -----------
appPort | The application port.
actorType | The actor type.
actorId | The actor ID.
methodName | The name of the method to invoke.
> Example of invoking a method for an actor:
```shell
curl -X POST http://localhost:3000/actors/stormtrooper/50/method/performAction \
-H "Content-Type: application/json"
```
### Invoke Reminder
Invokes a reminder for an actor.