1. Retrieve Multiple Workflow Stages

Retrieve Multiple Workflow Stages

Returns an array of workflow stages.

https://mapi.storyblok.com/v1/spaces/:space_id/workflow_stages/

Path Parameters

  • :space_id

    required number

    Numeric ID of a space

Query Parameters

  • exclude_id

    number

    Exclude a specific workflow stage by ID

  • by_ids

    string

    Filter by workflow stage IDs (comma separated)

  • search

    string

    Filter by the workflow stage name

  • in_workflow

    number

    Filter all the workflow stages present in a specific workflow using the numeric workflow ID

Response Properties

  • workflow_stages

    Workflow Stage Object[]
    • id

      number

      The numeric ID

    • allow_publish

      boolean

      Boolean to allow publishing for all the users in the stage

    • is_default

      boolean

      True if the workflow stage is the default one for a particular workflow. One workflow can only have one default stage.

    • user_ids

      number[]

      An array of user ids that are allowed to change the stage to next available stages

    • space_role_ids

      number[]

      Space role ids that are allowed to change the stage to the next available stages

    • workflow_stage_ids

      number[]

      An array of IDs of next available stages

    • name

      string

      The workflow stage name, cannot be the same as another stage in the same workflow.

    • color

      string

      Workflow stage color, two stages in the same workflow cannot have the same color

    • allow_all_stages

      boolean

      Boolean to allow all stages as the next available stages

    • allow_admin_publish

      boolean

      Boolean to allow admin publishing

    • allow_all_users

      boolean

      Boolean to allow changing the workflow stage by all users

    • allow_admin_change

      boolean

      Allow admins to change from the current stage to the next available stages

    • allow_editor_change

      boolean

      Allow editors to change from the current stage to the next available stages

    • position

      number

      Numeric position of the workflow stage in the workflow

    • after_publish_id

      number

      Workflow stage id that gets assigned after publishing

    • workflow_id

      number

      Numeric ID of the connected workflow. If empty while creating a new stage, then the stage is created in the default workflow.

Request
curl "https://mapi.storyblok.com/v1/spaces/606/workflow_stages/" \
  -X GET \
  -H "Authorization: YOUR_OAUTH_TOKEN" \
  -H "Content-Type: application/json"
Request
// Using the Universal JavaScript Client:
// https://github.com/storyblok/storyblok-js-client
Storyblok.get('/spaces/606/workflow_stages/', {})
  .then(response => {
    console.log(response)
  }).catch(error => { 
    console.log(error)
  })
Request
$client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');

$client->get('/spaces/606/workflow_stages/')->getBody();
Request
require 'storyblok'
client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')

client.false('/spaces/606/workflow_stages/')
Request
HttpResponse<String> response = Unirest.get("https://mapi.storyblok.com/v1/spaces/606/workflow_stages/")
  .header("Authorization", "YOUR_OAUTH_TOKEN")
  .asString();
Request
var client = new RestClient("https://mapi.storyblok.com/v1/spaces/606/workflow_stages/");
var request = new RestRequest(Method.GET);

request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
IRestResponse response = client.Execute(request);
Request
import Foundation

let headers = [
  "Content-Type": "application/json",
  "Authorization": "YOUR_OAUTH_TOKEN"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://mapi.storyblok.com/v1/spaces/606/workflow_stages/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.method = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
Request
import requests

url = "https://mapi.storyblok.com/v1/spaces/606/workflow_stages/"

querystring = {}

payload = ""
headers = {
  'Content-Type': "application/json",
  'Authorization': "YOUR_OAUTH_TOKEN"
}

response = requests.request("GET", url, data=payload, headers=headers, params=querystring)

print(response.text)

You will see an array of workflow stages as response.