Description
Retrieves one or more assignees for the specified entry. If an assignee_key is provided, the response is limited to that specific assignee.
Authentication
For available methods to authenticate to the API, refer to our REST API v1 Authentication guide.
The capability gravityflow_create_steps is required to access this endpoint.
This can be filtered using the gravityflow_web_api_capability_get_entries_assignees filter.
Using the Endpoint
GET /gravityformsapi/entries/{entry_id}/assignees/{assignee_key?}
Required Parameters
| Key | Type | Description |
|---|---|---|
| entry_id | integer | The ID of the entry. |
Optional Parameters
| Key | Type | Description |
|---|---|---|
| assignee_key | string | Retrieve a specific assignee by key (e.g., `user_id |
Response
Success
A JSON array of assignee objects.
Object Properties
| Key | Description |
|---|---|
| key | Unique identifier of the assignee (e.g., `user_id |
| id | The ID of the assignee (e.g., 1). |
| type | The type of assignee (e.g., user_id, role, email). |
| display_name | The display name of the assignee (e.g., admin). |
| status | The workflow status of the assignee (e.g., pending, complete). |
Example Response
{
"status": 200,
"response": [
{
"key": "user_id|1",
"id": 1,
"type": "user_id",
"display_name": "admin",
"status": "pending"
}
]
}
Failure
If the request fails, an error status code with a message will be returned.
Usage
cURL Request
curl "https://{domain}/gravityformsapi/entries/{entry_id}/assignees?api_key={api_key}&signature={signature}&expires={timestamp}"
PHP Request
$response = wp_remote_get( 'https://{domain}/gravityformsapi/entries/{entry_id}/assignees?api_key={api_key}&signature={signature}&expires={timestamp}' );
if ( ! is_wp_error( $response ) ) {
if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
$body = wp_remote_retrieve_body( $response );
$assignees = json_decode( $body, true );
} else {
$error_message = wp_remote_retrieve_response_message( $response );
}
} else {
$error_message = $response->get_error_message();
}