TerraGo API

Roles

Read-only lookup of the platform's role definitions (System Admin, Administrative Staff, Staff, Parent). Used to resolve the role_id required when creating or filtering user accounts.

1 endpoint(s)
GET List Roles {{url}}/roles

This endpoint returns an array of role objects, each representing a user role within the system. It is typically used to display available roles for user management or assignment purposes.

Auth
None
Sample Response (200 OK)
{
    "data": [
        {
            "id": "184ad925-a873-445e-a140-1edc1b11c2db",
            "name": "System Admin",
            "created_at": "2025-11-27 13:35:56"
        },
        {
            "id": "582c5dc9-4ef6-4238-98e3-7318c57349fb",
            "name": "Parent",
            "created_at": "2025-11-27 13:35:56"
        },
        {
            "id": "989d4025-e939-41f7-b032-356c7269612c",
            "name": "Staff",
            "created_at": "2025-11-27 13:35:56"
        },
        {
            "id": "4583792c-7951-4bf5-ba5f-68c374a12420",
            "name": "Administrative Staff",
            "created_at": "2025-11-27 13:35:56"
        }
    ],
    "links": {
        "first": "https://terragostg.terrasofthq.com/api/roles?page=1",
        "last": "https://terragostg.terrasofthq.com/api/roles?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "page": null,
                "active": false
            },
            {
                "url": "https://terragostg.terrasofthq.com/api/roles?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "page": null,
                "active": false
            }
        ],
        "path": "https://terragostg.terrasofthq.com/api/roles",
        "per_page": 15,
        "to": 4,
        "total": 4
    },
    "status": 200,
    "message": "Roles Retrieved Successfully"
}