Metadata Requests

When creating views on top of the RamBase API, it can be useful to know some information about the resource you are using.

The syntax of the request URI is:

http://api.rambase.net/$metadata?uri={resourceURL}&verb={resourceVerb}

The response includes the following metadata of the resource:

Example:

In this example we request metadata for the PUT resource of a specified customer:

http://api.rambase.net/$metadata?uri=/sales/customers/100000&verb=put&$format=xml

The result is divided into seperate elements for each part of the metadata:

1
<Metadata>
2
<Fields>
3
    <Name>
4
        <Datatype>String</Datatype>
5
        <XPath>/Customer/Name</XPath>
6
        <Required>False</Required>
7
        <MinValue/>
8
        <MaxValue/>
9
        <Regexp/>
10
        <DefaultValue/>
11
    </Name>
12
    ...
13
    <PreferredLanguage>
14
        <Datatype>String</Datatype>
15
        <XPath>/Customer/PreferredLanguage</XPath>
16
        <Required>False</Required>
17
        <MinValue/>
18
        <MaxValue/>
19
        <Regexp>^[a-z]{3}$</Regexp>
20
        <DefaultValue/>
21
    </PreferredLanguage>
22
    ...
23
    <Sales.MinimumGrossMargin>
24
        <Datatype>Decimal</Datatype>
25
        <XPath>/Customer/Sales/MinimumGrossMargin</XPath>
26
        <Required>False</Required>
27
        <MinValue>0</MinValue>
28
        <MaxValue>99</MaxValue>
29
        <Regexp/>
30
        <DefaultValue/>
31
    </Sales.MinimumGrossMargin>
32
    ...
33
</Fields>
34
<FilterFields/>
35
<SortableFields/>
36
<NamedFilters/>
37
</Metadata>