AvailableResource

1
2
3
4
5
{
    "Name": "RESTar.AvailableResource",
    "Kind": "EntityResource",
    "Methods": ["GET", "REPORT", "HEAD"]
}

AvailableResource is a meta-resource that contains the available resources for the current consumer. The entities contained in the output from a GET request to AvailableResource, and the values of their Methods properties, are decided by the API key used in the request (if keys are required for the service). It’s the default resource for HTTP requests, used if no resource locator is provided in the request URI.

Format

Property name Type Description
Name string The name of the resource
Description string The description of the resource
Methods array of string The methods available for the resource (for the current API key)
Kind string The kind of the resource, for example EntityResource
Views array of ViewInfo The views of the resource (only for entity resources)

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
GET https://my-server.com/rest
Response body:
[
    {
        "Name": "RESTar.Admin.Console",
        "Description": "The console is a terminal resource that allows a WebSocket client to receive pushed updates when the REST API receives requests and WebSocket events.",
        "Methods": [
            "GET"
        ],
        "Kind": "TerminalResource"
    },
    {
        "Name": "RESTar.Admin.DatabaseIndex",
        "Description": "The DatabaseIndex resource lets an administrator set indexes for Starcounter database resources.",
        "Methods": [
            "GET",
            "POST",
            "PATCH",
            "PUT",
            "DELETE",
            "REPORT",
            "HEAD"
        ],
        "Kind": "EntityResource",
        "Views": []
    },
    {
        "Name": "RESTar.Admin.Error",
        "Description": "The Error resource records instances where an error was encountered while handling a request.",
        "Methods": [
            "GET",
            "DELETE",
            "REPORT",
            "HEAD"
        ],
        "Kind": "EntityResource",
        "Views": []
    } ...
]