Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Updated by Martin Czuchra over 11 years ago

**As** Developer
**I want** to be able to read workflows via the REST-API,
**so that** my external application can decide if a certain status-transition is allowed or prohibited.

**Acceptance criteria**

- The API v2 provides read access to workflows
- Ability to determine allowed transitions for current (authenticated) user

**Of our scope**

- write-access (i.e. change allowed transitions for a role/user)
- ability to determine allowed transitions for any other user

## Implementation Details

### Endpoint

api/v2/projects/1/workflows.xml

### Response

<?xml version="1.0" encoding="UTF-8"?>
<workflows>
<workflow>
<type_id>$(integer)</type_id>
<old_status_id>$(integer)</old_status_id>
<transitions>
<transition>
<new_status_id>$(integer)</new_status_id>
<scope>$(role|author|assignee)</scope>
</transition>
<transition>
<new_status_id>$(integer)</new_status_id>
<scope>$(role|author|assignee)</scope>
</transition>
<transition>
<new_status_id>$(integer)</new_status_id>
<scope>$(role|author|assignee)</scope>
</transition>
</transitions>
</workflow>
</workflows>

The scopes are related to the following <code>author</code>/<code>assignee</code>:

<table>
<tbody>
<tr class="odd">
<td><strong>author</strong></td>
<td><strong>assignee</strong></td>
<td></td>
<td><strong>scope</strong></td>
</tr>
<tr class="even">
<td>false</td>
<td>false</td>
<td></td>
<td>role</td>
</tr>
<tr class="odd">
<td>false</td>
<td>true</td>
<td></td>
<td>assignee</td>
</tr>
<tr class="even">
<td>true</td>
<td>false</td>
<td></td>
<td>author</td>
</tr>
<tr class="odd">
<td>true</td>
<td>true</td>
<td></td>
<td><em>invalid</em></td>
</tr>
</tbody>
</table>

Back

Loading...