RAD Server EdgeModules Resource

From RAD Studio
Jump to: navigation, search

Go Up to RAD Server Administrative API‎


The RAD Server database stores data about the registered RAD Server EdgeModules in the RAD Server Engine (EMS Server). You can access this information by using the registered EdgeModules Resource.

You can use the RAD Server EdgeModules resource to register, unregister or modify a RAD Server EdgeModule and its resources in your RAD Server Engine.

Note: Use the TEMSClientAPI component to register, unregister, update, or retrieve the data info of a RAD Server EdgeModules from the RAD Server Engine (EMS Server).

EdgeModules Resource Endpoints

EdgeModules Resource exposes the following RAD Server Resource Endpoints:

Endpoint Method Name Resource Suffix HTTP Request Type Use

GetModules

--

HTTP GET

To retrieve all data from the EdgeModules Resource.

GetModule

{id}

HTTP GET

To retrieve all data from an EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.

GetModulesFields

fields

HTTP GET

To retrieve the field names of all RAD Server EdgeModules.

GetResources

resources

HTTP GET

To retrieve all data from the resources of all EdgeModules.

GetModuleResources

{id}/resources

HTTP GET

To retrieve all data from the resources of an EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.

GetResourcesFields

resources/fields

HTTP GET

To retrieve the field names of all resources of the RAD Server EdgeModules.

GetModuleResource

{id}/resources/{resourcename}

HTTP GET

To retrieve all data from a resource of an EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.
resourcename is the name of the resource.

RegisterModule

--

HTTP POST

To add a new RAD Server EdgeModule to the RAD Server database.

RegisterModuleResource

{id}/resources

HTTP POST

To register a new resource from a RAD Server EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.

UpdateModule

{id}

HTTP PUT

To update the data of an existing RAD Server EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.

UpdateModuleResource

{id}/resources/{resourcename}

HTTP PUT

To update the data of an existing resource from a RAD Server EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.
resourcename is the name of the resource.

UnregisterModule

{id}

HTTP DELETE

To delete an existing RAD Server EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.

UnregisterModuleResource

{id}/resources/{resourcename}

HTTP DELETE

To delete the data of an existing resource from a RAD Server EdgeModule.
id is the unique RAD Server EdgeModule identifier in the RAD Server database.
resourcename is the name of the resource.

GetResourceEndpoint

{modulename}/{resourcename}

HTTP GET

To get the data from the GET resource endpoint from an existing RAD Server EdgeModule.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.

GetResourceEndpointItem

{modulename}/{resourcename}/{item}

HTTP GET

To retrieve the data of a specific endpoint from an RAD Server EdgeModule resource.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.
item is the resource suffix to identify the endpoint.

PutResourceEndpoint

{modulename}/{resourcename}

HTTP PUT

To update the data from the resource endpoint from an existing RAD Server EdgeModule.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.

PutResourceEndpointItem

{modulename}/{resourcename}/{item}

HTTP PUT

To update the data of a specific endpoint from a RAD Server EdgeModule resource.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.
item is the resource suffix to identify the endpoint.

PostResourceEndpoint

{modulename}/{resourcename}

HTTP POST

To add new data to the resource endpoint from an existing RAD Server EdgeModule.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.

PostResourceEndpointItem

{modulename}/{resourcename}/{item}

HTTP POST

To add new data of a specific endpoint from a RAD Server EdgeModule resource.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.
item is the resource suffix to identify the endpoint.

PatchResourceEndpoint

{modulename}/{resourcename}

HTTP PATCH

To request a set of changes in the data of the resource endpoint from an existing RAD Server EdgeModule.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.

PatchResourceEndpointItem

{modulename}/{resourcename}/{item}

HTTP PATCH

To request a set of changes in the data of a specific endpoint from a RAD Server EdgeModule resource.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.
item is the resource suffix to identify the endpoint.

DeleteResourceEndpoint

{modulename}/{resourcename}

HTTP DELETE

To delete the data of the resource endpoint from an existing RAD Server EdgeModule.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.

DeleteResourceEndpointItem

{modulename}/{resourcename}/{item}

HTTP DELETE

To delete the data of a specific endpoint from a RAD Server EdgeModule resource.
modulename is the RAD Server EdgeModule name in the RAD Server database.
resourcename is the name of a resource from a RAD Server EdgeModule in the RAD Server database.
item is the resource suffix to identify the endpoint.

GetModules Endpoint

Returns a list of RAD Server EdgeModules data.

Use the QueryModules method, or the TBackendQuery components and the EdgeModule resource to retrieve the list of RAD Server EdgeModules.

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

  • modulename
  • _id
  • protocol
  • protocolprops (port and host)
  • _meta (creator, created date and updated date fields)
  • Custom fields (optional)

Example Response

This is an example response:

[
    {
        "modulename": "WinEdge1",
        "_id": "34C977F1-4DCE-4412-ACE8-35339CEE7282",
        "protocol": "http",
        "protocolprops": "{\"port\":8082,\"host\":\"localhost\"}",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-12T14:57:19.000Z"
        }
    },
    {
        "modulename": "WinEdge2",
        "_id": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
        "protocol": "http",
        "protocolprops": "{\"port\":8081,\"host\":\"localhost\"}",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-13T13:54:18.000Z"
        }
    }
]

GetModule Endpoint

It returns the data of a specified RAD Server EdgeModule.

Your request must provide the following field:

  • _id

Use the RetrieveModule method, or the TBackendQuery component and the EdgeModule Resource to retrieve its data.

If successful, the response from the RAD Server Engine provides a RAD Server EdgeModule with the following details:

  • modulename
  • _id
  • protocol
  • protocolprops (port and host)
  • _meta (creator, created date and updated date fields)
  • Custom fields (optional)

Example Response

This is an example response for the module "5B2A78B8-2599-433F-956D-720A12FFCD0B":

{
    "modulename": "WinEdge2",
    "_id": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
    "protocol": "http",
    "protocolprops": "{\"port\":8081,\"host\":\"localhost\"}",
    "_meta": {
        "creator": "00000000-0000-0000-0000-000000000000",
        "created": "2015-08-13T13:54:18.000Z"
    }
}

GetModulesFields Endpoint

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

Use the RetrieveModulesFields method to retrieve the fields of a RAD Server EdgeModule.

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

  • modulename
  • _id
  • protocol
  • protocolprops
  • _meta (creator, created and updated fields)

Example Response

This is an example response:

[
    {
        "name": "modulename"
    },
    {
        "name": "_id"
    },
    {
        "name": "protocol"
    },
    {
        "name": "protocolprops"
    },
    {
        "name": "_meta",
        "fields": [
            {
                "name": "creator"
            },
            {
                "name": "created"
            },
            {
                "name": "updated"
            }
        ]
    }
]

GetResources Endpoint

Returns a list of resources of all RAD Server EdgeModules.

Use the QueryModuleResources method, or the TBackendQuery component and the EdgeModule resource to retrieve the list of resources from the RAD Server EdgeModules.

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

  • resourcename
  • modulename
  • moduleid
  • _meta (creator, created date and updated date fields)
  • Custom fields (optional)

Example Response

This is an example response:

[
    {
        "resourcename": "version",
        "modulename": "WinEdge1",
        "moduleid": "34C977F1-4DCE-4412-ACE8-35339CEE7282",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-12T14:57:19.000Z"
        }
    },
    {
        "resourcename": "Measurements",
        "modulename": "WinEdge1",
        "moduleid": "34C977F1-4DCE-4412-ACE8-35339CEE7282",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-12T14:57:19.000Z"
        }
    },
    {
        "resourcename": "version",
        "modulename": "WinEdge2",
        "moduleid": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-13T13:54:18.000Z"
        }
    },
    {
        "resourcename": "Measurements",
        "modulename": "WinEdge2",
        "moduleid": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-13T13:54:18.000Z"
        }
    }
]

GetModuleResources Endpoint

Returns a list of resources data for a given RAD Server EdgeModule.

Use the QueryModuleResource method, or the TBackendQuery component and the EdgeModule resource to retrieve the list of resources from a RAD Server EdgeModule.

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

  • resourcename
  • modulename
  • moduleid
  • _meta (creator, created date and updated date fields)
  • Custom fields (optional)

Example Response

This is an example response for the module "5B2A78B8-2599-433F-956D-720A12FFCD0B":

[
    {
        "resourcename": "version",
        "modulename": "WinEdge2",
        "moduleid": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-13T13:54:18.000Z"
        }
    },
    {
        "resourcename": "Measurements",
        "modulename": "WinEdge2",
        "moduleid": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
        "_meta": {
            "creator": "00000000-0000-0000-0000-000000000000",
            "created": "2015-08-13T13:54:18.000Z"
        }
    }
]

GetResourcesFields Endpoint

Retrieves the field names of all resources of all RAD Server EdgeModules from the RAD Server database.

Use the RetrieveModuleResourcesFields method to retrieve the fields of the resources from the RAD Server EdgeModules.

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

  • resourcename
  • modulename
  • moduleid
  • _meta (creator, created and updated fields)
  • users

Example Response

This is an example response:

[
    {
        "name": "resourcename"
    },
    {
        "name": "modulename"
    },
    {
        "name": "moduleid"
    },
    {
        "name": "_meta",
        "fields": [
            {
                "name": "creator"
            },
            {
                "name": "created"
            },
            {
                "name": "updated"
            }
        ]
    }
]

GetModuleResource Endpoint

Returns the data of a given resource for a RAD Server EdgeModule.

Use the RetrieveModuleResource method, or the TBackendQuery component and the EdgeModule resource to retrieve the data of a resource from a RAD Server EdgeModule.

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

  • resourcename
  • modulename
  • moduleid
  • _meta (creator, created date and updated date fields)
  • Custom fields (optional)

Example Response

This is an example response for the module "5B2A78B8-2599-433F-956D-720A12FFCD0B" and the "version" resource:

{
    "resourcename": "version",
    "modulename": "WinEdge2",
    "moduleid": "5B2A78B8-2599-433F-956D-720A12FFCD0B",
    "_meta": {
        "creator": "00000000-0000-0000-0000-000000000000",
        "created": "2015-08-13T13:54:18.000Z"
    }
}


RegisterModule Endpoint

Registers the given RAD Server EdgeModule in the RAD Server Engine.

Your request must provide the following fields:

  • modulename
  • protocol
  • protocolprops (port and host)

Use the RegisterModule method, or the TBackendQuery component and the EdgeModule resource to register a new RAD Server EdgeModule in the RAD Server Engine.

RegisterModuleResource Endpoint

Registers a new resource in the RAD Server EdgeModule of the RAD Server Engine.

UpdateModule Endpoint

Updates an existing RAD Server EdgeModule in the RAD Server Engine.

Your request must provide the following field:

  • modulename

Use the UpdateModule method to update the data from an existing RAD Server EdgeModule in the RAD Server Engine.

UpdateModuleResource Endpoint

Registers an existing resource from a RAD Server EdgeModule in the RAD Server Engine. Your request must provide the following fields:

  • moduleid
  • resourcename

Use the UpdateModuleResource method to update the resource data from an existing EdgeModule in the RAD Server Engine.

UnregisterModule Endpoint

Deletes and unregisters an existing RAD Server EdgeModule in the RAD Server Engine.

Your request must provide the following fields:

  • moduleid

Use the UnregisterModule method to delete the data from an existing RAD Server EdgeModule in the RAD Server Engine.

UnregisterModuleResource Endpoint

Deletes and unregisters the existing resource from a RAD Server EdgeModule in the RAD Server Engine. Your request must provide the following fields:

  • moduleid
  • resourcename

Use the UnregisterModuleResource method to delete the resource data from an existing EdgeModule in the RAD Server Engine.

GetResourceEndpoint Endpoint

Returns the data from the GET endpoint from a RAD Server EdgeModule resource.

Example Response

This is an example response for the WinEdge1 module and the Measurements resource:

[
    {
        "device": "heartrate",
        "time": "2015-08-17T15:53:07.075Z",
        "data": {
            "bpm": 68
        }
    },
    {
        "device": "bloodpressure",
        "time": "2015-08-17T15:54:59.015Z",
        "data": {
            "systolic": 115,
            "diastolic": 77
        }
    }
]

GetResourceEndpointItem Endpoint

Returns the data from a specific GET endpoint (specified by the {item} resource suffix) from a RAD Server EdgeModule resource.

Example Response

This is an example response for the WinEdge1 module, the Measurements resource, and the detailed resource suffix:

[
    {
        "device": "heartrate",
        "time": "2015-08-17T15:53:07.075Z",
        "data": {
            "bpm": {
                "last": 68,
                "mean": 69.9354838709677,
                "stddev": 1.38889605732917
            }
        }
    },
    {
        "device": "bloodpressure",
        "time": "2015-08-17T15:54:59.015Z",
        "data": {
            "diastolic": {
                "last": 77,
                "mean": 76.875,
                "stddev": 1.64208056179609
            },
            "systolic": {
                "last": 115,
                "mean": 117.125,
                "stddev": 1.64208056179609
            }
        }
    }
]

PutResourceEndpoint Endpoint

Updates the data from the resource endpoint from an existing RAD Server EdgeModule.

Your request must provide the following fields:

  • modulename
  • resourcename

PutResourceEndpointItem Endpoint

Updates the data of a specific endpoint (specified by the {item} resource suffix) from a RAD Server EdgeModule resource.

Your request must provide the following fields:

  • modulename
  • resourcename
  • Resource Suffix

PostResourceEndpoint Endpoint

Adds new data to the resource endpoint from an existing RAD Server EdgeModule.

Your request must provide the following fields:

  • modulename
  • resourcename

PostResourceEndpointItem Endpoint

Adds new data to a specific endpoint (specified by the {item} resource suffix) from a RAD Server EdgeModule resource.

Your request must provide the following fields:

  • modulename
  • resourcename
  • Resource Suffix

PatchResourceEndpoint Endpoint

Requests a set of changes in the data of the resource endpoint from an existing RAD Server EdgeModule.

Your request must provide the following fields:

  • modulename
  • resourcename

PatchResourceEndpointItem Endpoint

Requests a set of changes in the data of a specific endpoint (specified by the {item} resource suffix) from a RAD Server EdgeModule resource.

Your request must provide the following fields:

  • modulename
  • resourcename
  • Resource Suffix

DeleteResourceEndpoint Endpoint

Deletes the data of the resource endpoint from an existing RAD Server EdgeModule.

Your request must provide the following fields:

  • modulename
  • resourcename

DeleteResourceEndpointItem Endpoint

Deletes the data of a specific endpoint (specified by the {item} resource suffix) from a RAD Server EdgeModule resource

Your request must provide the following fields:

  • modulename
  • resourcename
  • Resource Suffix

RAD Server EdgeModules Fields

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

Item Example Description
"modulename"
"WinEdge1"

RAD Server EdgeModule name in the RAD Server database.

"_id"
"34C977F1-4DCE-4412-ACE8-35339CEE7282"

Unique RAD Server EdgeModule identifier in the RAD Server database.

"protocol"
"http"

Protocol name that is used for communication between the RAD Server EdgeModule and the RAD Server Engine.

"protocolprops"
"{
\"port\":8082,
\"host\":\"localhost\"}"
  • Port: Connection port in which the RAD Server EdgeModule service is listening for request from the RAD Server Engine.
  • Host: Host info where the RAD Server EdgeModule is running.
"resourcename"
"version"

Name of the resources that extend the RAD Server EdgeModule functionality.

"moduleid"
"34C977F1-4DCE-4412-ACE8-35339CEE7282"

Unique RAD Server EdgeModule identifier (_id) that registers the resource.

"_meta"
{
    "creator": "00000000-0000-0000-0000-000000000001",
    "created": "2014-08-20T11:08:56.000Z",
    "updated": "2014-08-20T11:09:56.000Z"
}
  • creator: RAD Server EdgeModule or RAD Server EdgeModule resource creator in the RAD Server database.
  • created: Registration time of the RAD Server EdgeModule or the RAD Server EdgeModule resource.
  • updated: Time when the RAD Server EdgeModule or the RAD Server EdgeModule resource has been updated.

Custom fields

"myCustomField": "My Custom Field description"

Additional stored information for the RAD Server EdgeModule.

See Also