filtering results from new assignedRoles endpoint
We used to use the GET hubrestapi/projectroles endpoint to get a list of project roles. This required using the project ringId. With the new 2026.1 release, the hubrestapi/projects endpoint no longer returns anything since the projects resources are no longer in hub. Is there an easy way to get the project ringId from the YouTrack rest API (I have not found one yet) or alternatively, is there a way to add a query to the ytrestapi/assignedRoles endpoint to filter b a specific project id/shortName? Currently the project details are within the scope grouping "fields": “id,role(id,name,description),holder(id,login),scope(id,project(id,shortName,name))” and I can't work out how to target the “scope.project.shortName” as a query parameter.
Please sign in to leave a comment.
Hi Nick,
I'm Stan from the YouTrack Team. Thanks for reaching out!
As I can see, my colleague already shared a detailed reply on your support ticket. Reposting it here so other users hitting the same migration question can find it. I've also submitted an internal documentation update request to address the gap you mentioned about the
!suffix not being covered in the REST API docs.Starting with YouTrack 2026.1, project roles are managed directly through the YouTrack REST API, and the Hub
projectsresource is no longer active. Here's how to update your workflow.Getting the project ID
The Hub project
ringIdhas no direct replacement, but you no longer need it. The YouTrack REST API uses its own project entity IDs (for example,0-6), which the new endpoints accept. Retrieve them with:You can narrow this down to a specific project by adding the
queryparameter:Filtering assigned roles by project
The
/api/assignedRolesendpoint supports aqueryparameter for filtering. Usescope:PROJECT_ID!with the entity ID from the previous step:The
!suffix matters. Without it, the response also includes organization-level and globally-assigned roles that apply to the project, not just the ones assigned at the project level, which is almost certainly not what you want. The!restricts results to roles assigned directly to the project, matching what the old Hubprojectrolesendpoint returned.A couple of things to keep in mind:
scope.project.shortNamesyntax you tried isn't supported. Thescope:filter only accepts a YouTrack project entity ID, an organization entity ID, or the literal stringglobal. Passing a dotted path returns a 400 error.orderByparameter from the old Hub endpoint isn't available onassignedRoles. Results are returned in a fixed order.For background on which entities moved from Hub to the YouTrack REST API in 2026.1, please see Users, Groups, and Access Management.
Please don't hesitate to reach out anytime if you have any questions or need any assistance. Have a nice day!