RAD Server Groups Resource

From RAD Studio
Jump to: navigation, search

Go Up to RAD Server Administrative API


The RAD Server database stores data about the groups of registered users of your application. You can access this information by using the registered Groups Resource.

You can use the RAD Server Groups to authorize (allow or deny) a group of RAD Server Users to access a particular RAD Server Resource of your RAD Server Engine (depending on the credentials in the HTTP request).

Note: Use the TEMSClientAPI or the TBackendGroups components to create, update, or delete a RAD Server Group, or to add RAD Server Users to existing RAD Server Groups.

Groups Resource Endpoints

Groups Resource exposes the following RAD Server Resource Endpoints:

Endpoint Method Name Resource Suffix HTTP Request Type Use

GetGroups

--

HTTP GET

To retrieve all data from Groups Resource.

GetGroup

{item}

HTTP GET

To retrieve all data from a Group.
item is the unique RAD Server Group name in the RAD Server database.

GetGroupFields

fields

HTTP GET

To retrieve the field names of all RAD Server Groups.

AddGroup

--

HTTP POST

To add a new Group to the RAD Server database.

UpdateGroup

{item}

HTTP PUT

To update a Group in the RAD Server database.
item is the unique RAD Server Group name in the RAD Server database.

DeleteGroup

{item}

HTTP DELETE

To delete a Group from the RAD Server database.
item is the unique RAD Server Group name in the RAD Server database.

GetGroups Endpoint

Returns a list of RAD Server Groups data.

Use the QueryGroups method, TBackendGroups or the TBackendQuery components and the Groups resource to retrieve the list of RAD Server Users.

If successful, the response from the RAD Server Engine provides a list of all RAD Server Groups with details about each one of them.

  • name
  • _meta (creator, created date and updated date fields)
  • users
  • Custom fields (optional)

Example Response

This is an example response:

[
    {
        "name": "testgroup",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000001",
            "created": "2014-08-20T11:08:56.000Z"
        },
        "description": "Created by EMS setup.",
        "users": [
            "24EDA495-90FC-4BC4-9626-C87783357948"
        ]
    },
    {
        "name": "admins",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000001",
            "created": "2014-08-20T11:08:56.000Z",
            "updated": "2014-08-20T11:09:56.000Z"
        },
        "users": [
            "24EDA495-90FC-4BC4-9626-C87783357948",
            "AB4900CC-CD7A-4890-B20D-9A3E65B450C7"
        ]
    }
]

GetGroup Endpoint

Returns the data of a specified RAD Server Group.

Your request must provide the following field:

  • name

Use the RetrieveGroup method, the TBackendGroups or the TBackendQuery components and the GroupName to retrieve its data.

If successful, the response from the RAD Server Engine provides RAD Server Group with details.

  • name
  • _meta (creator, created and updated fields)
  • users
  • Custom fields (optional)

Example Response

This is an example response to the request for group name "testgroup" :

{
    "name": "testgroup",
    "_meta": {
        "creator": "00000000-0000-0000-0000-000000000001",
        "created": "2014-08-20T11:08:56.000Z"
    },
    "description": "Created by EMS setup.",
    "users": [
        "24EDA495-90FC-4BC4-9626-C87783357948"
    ]
}

GetFields Endpoint

Retrieves the field names of all RAD Server Groups from the RAD Server database.

Use the RetrieveGroupsFields method to retrieve the fields of a RAD Server Group.

If successful, the response from the RAD Server Engine provides all the field names of the RAD Server Groups .

  • name
  • _meta (creator, created and updated fields)
  • users

Example Response

This is an example response:

[  
   {  
      "name":"groupname"
   },
   {  
      "name":"_meta",
      "fields":[  
         {  
            "name":"creator"
         },
         {  
            "name":"created"
         },
         {  
            "name":"updated"
         }
      ]
   },
   {  
      "name":"users"
   },
   {  
      "name":"description",
      "custom":true
   }
]

AddGroup Endpoint

Adds a new group to the RAD Server database.

Your request must provide the following field:

  • name

Use the TEMSClientAPI.CreateGroup method or the CreateGroup method of TBackendGroups component to add a new RAD Server Group.

UpdateGroup Endpoint

Updates the data of an existing RAD Server Group that is stored in the RAD Server database.

Your request must provide at least the following field:

  • name

Use the TEMSClientAPI.UpdateGroup method or the UpdateGroup method of TBackendGroups component to update the data of an existing RAD Server Group.

DeleteGroup Endpoint

Deletes an existing RAD Server Group from the RAD Server database.

Your request must provide the following field:

  • name

Use the TEMSClientAPI.DeleteGroup method or the DeleteGroup method of TBackendGroups component to delete an existing RAD Server Group.

RAD Server Groups Fields

Groups resource in RAD Server request and responses may include any combination of the following fields:

Item Example Description
"name"
"admins"

Unique RAD Server Group name in the RAD Server database.

"_meta"
{
    "creator": "00000000-0000-0000-0000-000000000001",
    "created": "2014-08-20T11:08:56.000Z",
    "updated": "2014-08-20T11:09:56.000Z"
}
  • creator: RAD Server Group creator in the RAD Server database.
  • created: Creation time of the RAD Server Group.
  • updated: Time when the RAD Server Group has been updated.
"users"
[
    "24EDA495-90FC-4BC4-9626-C87783357948",
    "AB4900CC-CD7A-4890-B20D-9A3E65B450C7"
]

List of RAD Server Users that belong to that RAD Server Group.

Custom fields

"myCustomField": "My Custom Field description"

Additional stored information for the RAD Server Group.

See Also