mirror of https://github.com/dapr/docs.git
Updating Actor api refs to remove non transactional state apis.
This commit is contained in:
parent
48714ffd42
commit
c4174a90c6
|
@ -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.
|
> 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
|
Persists the changed to the state for an actor as a multi-item transaction.
|
||||||
|
|
||||||
`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.
|
|
||||||
|
|
||||||
***Note that this operation is dependant on a state store that supports multi-item transactions.***
|
***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
|
### Create Actor Reminder
|
||||||
|
|
||||||
Creates a persistent reminder for an actor.
|
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"
|
-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
|
### Invoke Reminder
|
||||||
|
|
||||||
Invokes a reminder for an actor.
|
Invokes a reminder for an actor.
|
||||||
|
|
Loading…
Reference in New Issue