List Roles

List Roles
List roles

This endpoint lists roles that the user has access to.

Request
URI
GET
https://api.example.local/v3/roles
COPY
Query Parameters
integer
page
Optional

Page to display; valid values are integers >= 1

page example
1
integer
per_page
Optional

Number of results per page, valid values are 1 through 5000

per_page example
50
string
order_by
Optional

Value to sort by. Defaults to ascending; prepend with - to sort descending.

order_by example
created_at
string
created_ats
Optional

Timestamp to filter by. When filtering on equality, several comma-delimited timestamps may be passed. Also supports filtering with relational operators.

created_ats example
2021-01-01T00:00:00Z
string
updated_ats
Optional

Timestamp to filter by. When filtering on equality, several comma-delimited timestamps may be passed. Also supports filtering with relational operators.

updated_ats example
2021-01-01T00:00:00Z
string
label_selector
Optional

A query string containing a list of label selector requirements

label_selector example
environment=production
string of array
guids
Optional

Comma-delimited list of role guids to filter by

string of array
types
Optional

Comma-delimited list of role types to filter by

string of array
organization_guids
Optional

Comma-delimited list of organization guids to filter by

string of array
space_guids
Optional

Comma-delimited list of space guids to filter by

string of array
user_guids
Optional

Comma-delimited list of user guids to filter by

string of array
include
Optional

Optionally include additional related resources in the response; valid values are user, space, and organization.


Authentication
This operation uses the following authentication methods.
Responses
200

Roles retrieved

Returns RoleListResponse of type(s) application/json
{
    "pagination": {
        "total_results": 0,
        "total_pages": 0,
        "first": {
            "href": "string",
            "method": "string"
        },
        "last": {
            "href": "string",
            "method": "string"
        },
        "next": {
            "href": "string",
            "method": "string"
        },
        "previous": {
            "href": "string",
            "method": "string"
        }
    },
    "resources": [
        {
            "guid": "string",
            "created_at": "string",
            "updated_at": "string",
            "type": "string",
            "relationships": {
                "organization": {
                    "data": {
                        "guid": "string"
                    }
                },
                "space": {
                    "data": {
                        "guid": "string"
                    }
                },
                "user": {
                    "data": {
                        "guid": "string"
                    }
                }
            },
            "links": {
                "self": {
                    "href": "string",
                    "method": "string"
                },
                "user": {
                    "href": "string",
                    "method": "string"
                },
                "organization": {
                    "href": "string",
                    "method": "string"
                },
                "space": {
                    "href": "string",
                    "method": "string"
                }
            },
            "included": {
                "spaces": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "name": "string",
                        "relationships": {
                            "organization": {
                                "data": {
                                    "guid": "string"
                                }
                            },
                            "quota": {
                                "data": {
                                    "guid": "string"
                                }
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "organization": {
                                "href": "string",
                                "method": "string"
                            },
                            "features": {
                                "href": "string",
                                "method": "string"
                            },
                            "apply_manifest": {
                                "href": "string",
                                "method": "string"
                            }
                        },
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "included": "IncludedResources Object"
                    }
                ],
                "organizations": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "name": "string",
                        "suspended": false,
                        "relationships": {
                            "quota": {
                                "data": {
                                    "guid": "string"
                                }
                            }
                        },
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "domains": {
                                "href": "string",
                                "method": "string"
                            },
                            "quota": {
                                "href": "string",
                                "method": "string"
                            },
                            "default_domain": {
                                "href": "string",
                                "method": "string"
                            }
                        }
                    }
                ],
                "domains": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "name": "string",
                        "internal": false,
                        "router_group": {
                            "guid": "string"
                        },
                        "supported_protocols": [
                            "string"
                        ],
                        "relationships": {},
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "organization": {
                                "href": "string",
                                "method": "string"
                            },
                            "route_reservations": {
                                "href": "string",
                                "method": "string"
                            },
                            "shared_organizations": {
                                "href": "string",
                                "method": "string"
                            },
                            "router_group": {
                                "href": "string",
                                "method": "string"
                            }
                        }
                    }
                ],
                "service_offerings": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "name": "string",
                        "description": "string",
                        "available": false,
                        "tags": [
                            "string"
                        ],
                        "requires": [
                            "string"
                        ],
                        "shareable": false,
                        "documentation_url": "string",
                        "broker_catalog": {
                            "id": "string",
                            "metadata": {
                                "displayName": "string",
                                "documentationUrl": "string",
                                "imageUrl": "string",
                                "longDescription": "string",
                                "providerDisplayName": "string",
                                "supportUrl": "string"
                            },
                            "features": {
                                "plan_updateable": false,
                                "bindable": false,
                                "instances_retrievable": false,
                                "bindings_retrievable": false,
                                "allow_context_updates": false
                            }
                        },
                        "relationships": {
                            "service_broker": {
                                "data": {
                                    "guid": "string"
                                }
                            }
                        },
                        "service_broker_guid": "string",
                        "service_broker_name": "string",
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "service_plans": {
                                "href": "string",
                                "method": "string"
                            },
                            "service_broker": {
                                "href": "string",
                                "method": "string"
                            }
                        }
                    }
                ],
                "service_instances": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "type": "string",
                        "name": "string",
                        "tags": [
                            "string"
                        ],
                        "syslog_drain_url": "string",
                        "route_service_url": "string",
                        "dashboard_url": "string",
                        "maintenance_info": {
                            "version": "string",
                            "description": "string"
                        },
                        "upgrade_available": false,
                        "last_operation": {
                            "type": "string",
                            "state": "string",
                            "description": "string",
                            "created_at": "string",
                            "updated_at": "string"
                        },
                        "relationships": {
                            "space": {
                                "data": {
                                    "guid": "string"
                                }
                            },
                            "service_plan": {
                                "data": {
                                    "guid": "string"
                                }
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "space": {
                                "href": "string",
                                "method": "string"
                            },
                            "service_plan": {
                                "href": "string",
                                "method": "string"
                            },
                            "parameters": {
                                "href": "string",
                                "method": "string"
                            },
                            "service_credential_bindings": {
                                "href": "string",
                                "method": "string"
                            },
                            "service_route_bindings": {
                                "href": "string",
                                "method": "string"
                            },
                            "shared_spaces": {
                                "href": "string",
                                "method": "string"
                            }
                        },
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        }
                    }
                ],
                "apps": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "name": "string",
                        "state": "string",
                        "lifecycle": {
                            "type": "string",
                            "data": {
                                "buildpacks": [
                                    "string"
                                ],
                                "stack": "string",
                                "credentials": {
                                    "credentials": {
                                        "username": "string",
                                        "password": "string",
                                        "token": "string"
                                    }
                                }
                            }
                        },
                        "relationships": {},
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "space": {
                                "href": "string",
                                "method": "string"
                            },
                            "processes": {
                                "href": "string",
                                "method": "string"
                            },
                            "packages": {
                                "href": "string",
                                "method": "string"
                            },
                            "environment_variables": {
                                "href": "string",
                                "method": "string"
                            },
                            "current_droplet": {
                                "href": "string",
                                "method": "string"
                            },
                            "droplets": {
                                "href": "string",
                                "method": "string"
                            }
                        },
                        "included": "IncludedResources Object"
                    }
                ],
                "routes": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "protocol": "string",
                        "host": "string",
                        "path": "string",
                        "port": 0,
                        "url": "string",
                        "relationships": {},
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            },
                            "space": {
                                "href": "string",
                                "method": "string"
                            },
                            "domain": {
                                "href": "string",
                                "method": "string"
                            },
                            "destinations": {
                                "href": "string",
                                "method": "string"
                            }
                        },
                        "included": "IncludedResources Object"
                    }
                ],
                "users": [
                    {
                        "guid": "string",
                        "created_at": "string",
                        "updated_at": "string",
                        "username": "string",
                        "presentation_name": "string",
                        "origin": "string",
                        "metadata": {
                            "labels": {
                                "labels": "string"
                            },
                            "annotations": {
                                "annotations": "string"
                            }
                        },
                        "links": {
                            "self": {
                                "href": "string",
                                "method": "string"
                            }
                        }
                    }
                ]
            }
        }
    ],
    "included": {
        "spaces": [
            "Space Object"
        ],
        "organizations": [
            {
                "guid": "string",
                "created_at": "string",
                "updated_at": "string",
                "name": "string",
                "suspended": false,
                "relationships": {
                    "quota": {
                        "data": {
                            "guid": "string"
                        }
                    }
                },
                "metadata": {
                    "labels": {
                        "labels": "string"
                    },
                    "annotations": {
                        "annotations": "string"
                    }
                },
                "links": {
                    "self": {
                        "href": "string",
                        "method": "string"
                    },
                    "domains": {
                        "href": "string",
                        "method": "string"
                    },
                    "quota": {
                        "href": "string",
                        "method": "string"
                    },
                    "default_domain": {
                        "href": "string",
                        "method": "string"
                    }
                }
            }
        ],
        "domains": [
            {
                "guid": "string",
                "created_at": "string",
                "updated_at": "string",
                "name": "string",
                "internal": false,
                "router_group": {
                    "guid": "string"
                },
                "supported_protocols": [
                    "string"
                ],
                "relationships": {},
                "metadata": {
                    "labels": {
                        "labels": "string"
                    },
                    "annotations": {
                        "annotations": "string"
                    }
                },
                "links": {
                    "self": {
                        "href": "string",
                        "method": "string"
                    },
                    "organization": {
                        "href": "string",
                        "method": "string"
                    },
                    "route_reservations": {
                        "href": "string",
                        "method": "string"
                    },
                    "shared_organizations": {
                        "href": "string",
                        "method": "string"
                    },
                    "router_group": {
                        "href": "string",
                        "method": "string"
                    }
                }
            }
        ],
        "service_offerings": [
            {
                "guid": "string",
                "created_at": "string",
                "updated_at": "string",
                "name": "string",
                "description": "string",
                "available": false,
                "tags": [
                    "string"
                ],
                "requires": [
                    "string"
                ],
                "shareable": false,
                "documentation_url": "string",
                "broker_catalog": {
                    "id": "string",
                    "metadata": {
                        "displayName": "string",
                        "documentationUrl": "string",
                        "imageUrl": "string",
                        "longDescription": "string",
                        "providerDisplayName": "string",
                        "supportUrl": "string"
                    },
                    "features": {
                        "plan_updateable": false,
                        "bindable": false,
                        "instances_retrievable": false,
                        "bindings_retrievable": false,
                        "allow_context_updates": false
                    }
                },
                "relationships": {
                    "service_broker": {
                        "data": {
                            "guid": "string"
                        }
                    }
                },
                "service_broker_guid": "string",
                "service_broker_name": "string",
                "metadata": {
                    "labels": {
                        "labels": "string"
                    },
                    "annotations": {
                        "annotations": "string"
                    }
                },
                "links": {
                    "self": {
                        "href": "string",
                        "method": "string"
                    },
                    "service_plans": {
                        "href": "string",
                        "method": "string"
                    },
                    "service_broker": {
                        "href": "string",
                        "method": "string"
                    }
                }
            }
        ],
        "service_instances": [
            {
                "guid": "string",
                "created_at": "string",
                "updated_at": "string",
                "type": "string",
                "name": "string",
                "tags": [
                    "string"
                ],
                "syslog_drain_url": "string",
                "route_service_url": "string",
                "dashboard_url": "string",
                "maintenance_info": {
                    "version": "string",
                    "description": "string"
                },
                "upgrade_available": false,
                "last_operation": {
                    "type": "string",
                    "state": "string",
                    "description": "string",
                    "created_at": "string",
                    "updated_at": "string"
                },
                "relationships": {
                    "space": {
                        "data": {
                            "guid": "string"
                        }
                    },
                    "service_plan": {
                        "data": {
                            "guid": "string"
                        }
                    }
                },
                "links": {
                    "self": {
                        "href": "string",
                        "method": "string"
                    },
                    "space": {
                        "href": "string",
                        "method": "string"
                    },
                    "service_plan": {
                        "href": "string",
                        "method": "string"
                    },
                    "parameters": {
                        "href": "string",
                        "method": "string"
                    },
                    "service_credential_bindings": {
                        "href": "string",
                        "method": "string"
                    },
                    "service_route_bindings": {
                        "href": "string",
                        "method": "string"
                    },
                    "shared_spaces": {
                        "href": "string",
                        "method": "string"
                    }
                },
                "metadata": {
                    "labels": {
                        "labels": "string"
                    },
                    "annotations": {
                        "annotations": "string"
                    }
                }
            }
        ],
        "apps": [
            "App Object"
        ],
        "routes": [
            "Route Object"
        ],
        "users": [
            {
                "guid": "string",
                "created_at": "string",
                "updated_at": "string",
                "username": "string",
                "presentation_name": "string",
                "origin": "string",
                "metadata": {
                    "labels": {
                        "labels": "string"
                    },
                    "annotations": {
                        "annotations": "string"
                    }
                },
                "links": {
                    "self": {
                        "href": "string",
                        "method": "string"
                    }
                }
            }
        ]
    }
}
object
pagination
Optional

Pagination is a technique used to divide a large set of results into smaller, more manageable sets. This allows clients to retrieve results in smaller chunks, reducing the amount of data transferred and improving performance. The pagination object is a JSON object that contains information about the pagination state of the results. It includes the total number of results available, the total number of pages available, and links to the first, last, next, and previous pages of results.

array of object
resources
Optional

Roles represent a set of permissions that can be granted to users. Roles are represented as a JSON object. A role consists of several required role fields and other attributes specific to the role. See Roles for specific roles.

object
included
Optional

Additional related resources included in the response when using the include parameter


400

Bad Request

Returns BadRequest of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


409

Conflict

Returns Conflict of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


422

Unprocessable Entity

Returns UnprocessableEntity of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


500

Internal Server Error

Returns 500 of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


502

Bad Gateway

Returns BadGateway of type(s) application/json
{
    "code": 0,
    "detail": "string",
    "title": "string"
}
integer
code
Optional

A numeric code for this error

string
detail
Optional

Detailed description of the error

string
title
Optional

Name of the error


503

Service Unavailable

Returns ServiceUnavailable of type(s) application/json
{
    "errors": [
        {
            "code": 0,
            "detail": "string",
            "title": "string"
        }
    ]
}
array of object
errors
Optional

errors


Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/v3/roles