添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Your browser is outdated and unsupported. You may run into errors and degraded experience on this page. Please update your browser.
  • 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

      Greetings,

      I'm trying to filter projects by a custom filter I defined. Is this possible or is it an enterprise edition feature? I get an error message saying the filter doesn't exist.

      same goes for a built-in filter principal which is listed among the default filters in the api documentation yet I get the same message when I use it.

      here is my sample request:

      /api/v3/projects?filters=[{ "principal": { "operator": "=", "values": ["hassan "] }}]

      btw, I'm using the community edition.

      Hi Hassan,

      the principal filter on projects acts as a filter of memberships. The filter value needs to be the principal ID (e.g., user ID), not a string value. It is available in all editions of OpenProject.

      For example, to see all projects I'm member of (this will be empty for unauthorized users without the view_members permission)

      https://community.openproject.com/api/v3/projects?filters=[{ "principal": { "operator": "=", "values": ["9177"] }}]

      Oliver

      Hi Hassan,

      the principal filter on projects acts as a filter of memberships. The filter value needs to be the principal ID (e.g., user ID), not a string value. It is available in all editions of OpenProject.

      For example, to see all projects I'm member of (this will be empty for unauthorized users without the view_members permission)

      https://community.openproject.com/api/v3/projects?filters=[{ \"principal\": { \"operator\": \"=\", \"values\": [\"9177\"] }}]

      Hey Oliver, thanks for the reply

      still I get the same error even after I put an ID in the values list

      "_type" : "Error" , "errorIdentifier" : "urn:openproject-org:api:v3:errors:InvalidQuery" , "message" : [ "Filters Principal does not exist."

      is there some API configuration I'm missing? and how about the custom fields? can I filter by them?

      I also want to ask about the memberships endpoint, I get 404 when I request it .. is it enterprise edition only or what?

      I'm using 8.1 , but the api is v3 , it should be the same regardless of open project version right?

      Oliver Günther wrote:

      Are you perhaps using an older version of OpenProject?

      Best,

      Oliver

  •