The Workflow Web/REST API

The following endpoints are currently available for the Gravity Flow Web/REST API. More will be added - if you need one for your project, please get in touch.

GET /entries/[Entry ID]/assignees

Returns a collection of assignees for the specified entry

URI: gravityformsapi/entries/[Entry ID]/assignees

Capability: gravityflow_create_steps

Response: a JSON collection of object containing the following information about each assignee:

  • key - e.g. user_id|1
  • id - e.g. 1
  • type - e.g. user_id
  • display_name - e.g. admin
  • status - e.g. pending

GET entries/[Entry ID]/steps

Returns a collection of steps for the specified entry

URI: gravityformsapi/entries/[Entry ID]/steps

Capability: gravityflow_create_steps

Response: a JSON collection of objects containing the following information about each step:

  • id
  • type
  • label
  • name
  • is_current_step
  • is_active
  • supports_expiration
  • assignees
  • settings
  • status
  • expiration_timestamp
  • is_expired
  • is_queued
  • entry_count

GET forms/[Entry ID]/steps

Returns a collection of steps for the specified form

URI: gravityformsapi/entries/[Entry ID]/steps

Capability: gravityflow_create_steps

Response: a JSON collection of objects containing the following information about each step:

  • id
  • type 
  • label
  • name
  • is_active
  • supports_expiration
  • assignees
  • settings
  • entry_count

POST entries/[Entry ID]/assignees/[Assignee Key]

Processes a status update for a specified assignee of the current step of the specified entry.

URI: gravityformsapi/entries/[Entry ID]/assignees/[Assignee Key]

The assignee key must be a url-encoded string containing the assignee type plus the ID separated by a pipe. For example for the user ID 1 the assignee key is user_id|1. Once url-encoded this becomes user_id%7c1.

Capability: gravityflow_create_steps

Body: A JSON object containing a status element. e.g. for an approval step: { "status" : "approved" } for a user input step: { "status" : "complete" }

Response: A confirmation message.