Description
Retrieves all steps for the specified form.
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_forms_steps filter.
Using the Endpoint
GET /gravityformsapi/forms/{form_id}/steps
Required Parameters
| Key | Type | Description |
|---|---|---|
| form_id | integer | The ID of the form. |
Optional Parameters
None.
Response
Success
A JSON array of step objects.
Object Properties
| Key | Description |
|---|---|
| id | Unique identifier of the step. |
| type | Step type, |
| label | Human‑readable step label. |
| name | Programmatic name/slug of the step. |
| is_active | Whether the step is active (boolean). |
| entry_count | Number of entries currently on this step. |
| supports_expiration | Whether this step supports expiration. |
| assignees | Array of assignee objects. |
| settings | Object of step settings (key/value pairs specific to the step type). |
Failure
If the request fails, an error status code with a message will be returned.
Usage
cURL Request
curl "https://{domain}/gravityformsapi/forms/{form_id}/steps?api_key={api_key}&signature={signature}&expires={timestamp}"
PHP Request
$response = wp_remote_get( 'https://{domain}/gravityformsapi/forms/{form_id}/steps?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 );
$steps = json_decode( $body, true );
} else {
$error_message = wp_remote_retrieve_response_message( $response );
}
} else {
$error_message = $response->get_error_message();
}