Skip to content

List all servers in a project

Request

OPA roles:
  • resource_admin
  • delegated_resource_admin

Lists all servers in a project in a resource group

Security
bearerAuth
Path
team_namestringrequired

The name of your team

resource_group_idstringrequired

The UUID of a resource group

project_idstringrequired

The UUID of a project

Query
idArray of strings

Only returns results with the specified IDs

hostnamestring

Only return servers whose hostname equals the specified string (case sensitive)

Example:hostname=host
hostname_containsstring, [ 1 .. 255 ] characters

Only return servers whose hostname contains the specified string (case-insensitive)

Example:hostname_contains=host
os_typestring

Only return servers with the specified OS type. Possible values: linux or windows.

Enum:"windows""linux"
Example:os_type=windows
countinteger, (int32)

The number of objects per page

descendingboolean

If true, results are listed in descending order. By default, results are listed in ascending order.

offsetstring

The offset value for pagination. The rel="next" and rel="prev" Link headers define the offset for subsequent or previous pages.

prevboolean

The direction of paging

curl -i -X GET \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/resource_groups/{resource_group_id}/projects/{project_id}/servers?id=string&hostname=host&hostname_contains=host&os_type=windows&count=0&descending=true&offset=string&prev=true' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
listArray of objects(Server)
Response
{ "list": [ { … }, { … } ] }