# Bug SPPM-285 - There is a recent change in Capabilities API without backward compatibility 

Project: Stream Project Portfolio Management
Status: closed
URL: https://community.openproject.org/work_packages/SPPM-285

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 17.0.0 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Eric Schubert |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

It seems that after projects-to-workspaces changes, the capability filters were also changed. 

### 

Steps to reproduce

1.  Make a call to capabilities endpoint with specifying project in the context field, like it is described in <https://www.openproject.org/docs/api/endpoints/actions-capabilities/> (List capabilities -\> filters)
    
    An example of request can look like this:  
    `https://community.openproject.org/api/v3/capabilities?filters=[{"principal":{"operator":"=","values":["85313"]}},{"action":{"operator":"=","values":["work_packages/create"]}},{"context":{"operator":"=","values":["p1259"]}}]&pageSize=1`

2.  Observe that API returns an error

### What is the buggy behavior?

  - API returns an error because of the regex validation on the backend. It allows only `g` and `w` values

### What is the expected behavior?

  - API should allow to send `p` prefix (as it is described in the [documentation](https://www.openproject.org/docs/api/endpoints/actions-capabilities/) )  
    OR

  - Maybe we should change the documentation if we don't want to support workspaces and projects together
