Get Projects List for a Global Role

JFrog REST APIs

Content Type
REST API

Description: Returns a list of projects where a specific global role is used.

Since: 7.117.1

Security: Requires admin permissions

Usage: GET /v2/projects?role_name=role&limit=10&descending_order=true&cursor=project1

Produces: application/json

Header parameter: Authorization: Bearer

Sample Query

curl --location --request GET 'http://localhost:8082/access/api/v2/projects?role_name=role&limit=10&descending_order=true&cursor=project1' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer' \

Query Parameters

String

Type

Mandatory

Description

limit

Number

Optional

Allows you to control the number of results. The valid value is a minimum of 1, and the default value is 1,000. For example, to set the limit to 5000, use the following API: /access/api/v2/groups?limit=5000

cursor

String

Optional

Divides the list of results and shows those that fall after the cursor for pagination purposes.

role_name

String

Mandatory

Filter results by role: only global roles are supported.Manage Global Roles

descending_order

Boolean

Optional

When set to true, the result will be ordered by project name.

Sample Response

{"projects":[{"name":"proj10","projectKey":"proj10"},{"name":"proj11","projectKey":"proj11"},{"name":"proj2","projectKey":"proj2"},{"name":"proj3","projectKey":"proj3"},{"name":"proj4","projectKey":"proj4"},{"name":"proj5","projectKey":"proj5"},{"name":"proj6","projectKey":"proj6"},{"name":"proj7","projectKey":"proj7"},{"name":"proj8","projectKey":"proj8"},{"name":"proj9","projectKey":"proj9"}],"cursor":"proj9"}

Success Response Codes:

200: Ok successful.

Error Response Codes:

404 The request payload was not found.