# REST API Data model

# WhoisResources

# Description

The RIPE Database REST API uses a uniform format for transferring structured data. The root object type is called whoisResources.

# XML

Example structure

<?xml version="1.0" encoding="UTF-8"?>
<whois-resources>
    <link xlink:type="..." xlink:href="..."/>
    <parameters>...</parameters>
    <objects>
        <object>...</object>
        <object>...</object>
        <!--...more "object" elements...-->
    </objects>
    <sources>
        <source name="..." id="...">...</source>
        <source name="..." id="...">...</source>
        <!--...more "source" elements...-->
    </sources>
    <errormessages>
        <errormessage severity="..." text="…">...</errormessage>
        <!--...more "errormessage" elements...-->
    </errormessages>
    <grs-sources>
        <source name="..." id="..." grs-id="..."/>
        <source name="..." id="..." grs-id="..."> <!--...--> </source>
        <!--...more "source" elements...-->
    </grs-sources>
    <geolocation-attributes>...</geolocation-attributes>
    <versions>...</versions>
    <errormessages>...</errormessages>
    <terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

Example request

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<whois-resources>
    <objects>
        <object type="person">
            <source id="RIPE"/>
            <attributes>
                <attribute name="person" value="Pauleth Palthen"/>
                <attribute name="address" value="Singel 258"/>
                <attribute name="phone" value="+31-1234567890"/>
                <attribute name="e-mail" value="noreply@ripe.net"/>
                <attribute name="mnt-by" value="OWNER-MNT"/>
                <attribute name="nic-hdl" value="AUTO-1"/>
                <attribute name="source" value="RIPE"/>
            </attributes>
        </object>
    </objects>
</whois-resources>

Example response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources xmlns:xlink="http://www.w3.org/1999/xlink">
    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe"/>
    <objects>
        <object type="person">
            <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/person/PP1-RIPE"/>
            <source id="ripe"/>
            <primary-key>
                <attribute name="nic-hdl" value="PP1-RIPE"/>
            </primary-key>
            <attributes>
                <attribute name="person" value="Pauleth Palthen"/>
                <attribute name="address" value="Singel 258"/>
                <attribute name="phone" value="+31-1234567890"/>
                <attribute name="e-mail" value="noreply@ripe.net"/>
                <attribute name="mnt-by" value="OWNER-MNT" referenced-type="mntner">
                    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/mntner/OWNER-MNT"/>
                </attribute>
                <attribute name="nic-hdl" value="PP1-RIPE"/>
                <attribute name="remarks" value="remark"/>
                <attribute name="source" value="RIPE"/>
            </attributes>
        </object>
    </objects>
    <terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

Example request body with error in source and in admin-c attribute:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources>
<objects>
    <object type="person">
        <source id="INVALID_SOURCE"/>
        <attributes>
            <attribute name="person" value="Pauleth Palthen"/>
            <attribute name="address" value="Singel 258"/>
            <attribute name="phone" value="+31-1234567890"/>
            <attribute name="e-mail" value="noreply@ripe.net"/>
            <attribute name="admin-c" value="INVALID"/>
            <attribute name="mnt-by" value="OWNER-MNT"/>
            <attribute name="nic-hdl" value="PP1-RIPE"/>
            <attribute name="source" value="INVALID_SOURCE"/>
        </attributes>
    </object>
</objects>
</whois-resources>

Example XML response with error in source and in admin-c attribute:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources xmlns:xlink="http://www.w3.org/1999/xlink">
<link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/person"/>
<objects>
    <object type="person">
        <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/invalid_source/person/PP1-RIPE"/>
        <source id="invalid_source"/>
        <primary-key>
            <attribute name="nic-hdl" value="PP1-RIPE"/>
        </primary-key>
        <attributes>
            <attribute name="person" value="Pauleth Palthen"/>
            <attribute name="address" value="Singel 258"/>
            <attribute name="phone" value="+31-1234567890"/>
            <attribute name="e-mail" value="noreply@ripe.net"/>
            <attribute name="admin-c" value="INVALID"/>
            <attribute name="mnt-by" value="OWNER-MNT" referenced-type="mntner">
                <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/invalid_source/mntner/OWNER-MNT"/>
            </attribute>
            <attribute name="nic-hdl" value="PP1-RIPE"/>
            <attribute name="source" value="INVALID_SOURCE"/>
        </attributes>
    </object>
</objects>
<errormessages>
    <errormessage severity="Error" text="Unrecognized source: %s">
        <args value="INVALID_SOURCE"/>
    </errormessage>
    <errormessage severity="Error" text="&quot;%s&quot; is not valid for this object type">
        <attribute name="admin-c" value="INVALID"/>
        <args value="admin-c"/>
    </errormessage>
</errormessages>
<terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

Example XML Response for bad request when trying to delete an object that is referenced by other objects:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources xmlns:xlink="http://www.w3.org/1999/xlink">
    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/person/PP1-RIPE"/>
    <objects>
        <object type="person">
            <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/person/PP1-RIPE"/>
            <source id="ripe"/>
            <primary-key>
                <attribute name="nic-hdl" value="PP1-RIPE"/>
            </primary-key>
            <attributes>
                <attribute name="person" value="Test Person"/>
                <attribute name="address" value="Singel 258"/>
                <attribute name="phone" value="+31 6 12345678"/>
                <attribute name="nic-hdl" value="PP1-RIPE"/>
                <attribute name="mnt-by" value="OWNER-MNT" referenced-type="mntner">
                    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/mntner/OWNER-MNT"/>
                </attribute>
                <attribute name="source" value="RIPE"/>
            </attributes>
        </object>
    </objects>
    <errormessages>
        <errormessage severity="Error" text="Object [%s] %s is referenced from other objects">
            <args value="person"/>
            <args value="PP1-RIPE"/>
        </errormessage>
    </errormessages>
    <terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

Example XML Response for incorrect password

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources xmlns:xlink="http://www.w3.org/1999/xlink">
    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/person/PP1-RIPE"/>
    <objects>
        <object type="person">
            <link xlink:type="locator" xlink:href="rest.db.ripe.net/ripe/person/PP1-RIPE"/>
            <source id="ripe"/>
            <primary-key>
                <attribute name="nic-hdl" value="PP1-RIPE"/>
            </primary-key>
            <attributes>
                <attribute name="person" value="Pauleth Palthen"/>
                <attribute name="address" value="Singel 258"/>
                <attribute name="phone" value="+31-1234567890"/>
                <attribute name="e-mail" value="noreply@ripe.net"/>
                <attribute name="mnt-by" value="OWNER-MNT" referenced-type="mntner">
                    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/mntner/OWNER-MNT"/>
                </attribute>
                <attribute name="nic-hdl" value="PP1-RIPE"/>
                <attribute name="remarks" value="remark"/>
                <attribute name="source" value="RIPE"/>
            </attributes>
        </object>
    </objects>
    <errormessages>
        <errormessage severity="Error"
                    text="Authorisation for [%s] %s failed&#xA;using &quot;%s:&quot;&#xA;not authenticated by: %s">
            <args value="person"/>
            <args value="PP1-RIPE"/>
            <args value="mnt-by"/>
            <args value="OWNER-MNT"/>
        </errormessage>
    </errormessages>
    <terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

Example XML with Object type error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources xmlns:xlink="http://www.w3.org/1999/xlink">
    <link xlink:type="locator" xlink:href="http://rest.db.ripe.net/ripe/mntner/PP1-RIPE"/>
    <errormessages>
        <errormessage severity="Error"
                    text="Object type and key specified in URI (%s: %s) do not match the WhoisResources contents">
            <args value="mntner"/>
            <args value="PP1-RIPE"/>
        </errormessage>
    </errormessages>
    <terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

# JSON structure

Example structure

{
    "link": {
        "type": "...",
        "href": "..."
    },
    "parameters": { },
    "objects": {
        "object": [
            { },
            { }
        ]
    },
    "sources": {
        "source": [
            { },
            { }
        ]
    },
    "errormessages" : {
        "errormessage" : [ 
            { },
            { } 
        ]
    },
    "grs-sources": {
        "source": [
            { },
            { }
        ]
    },
    "geolocation-attributes": { },
    "versions": { },
    "errormessages": {},
    "terms-and-conditions": {
        "xlink:type": "locator",
        "xlink:href": "http://www.ripe.net/db/support/db-terms-conditions.pdf"
    },
}

Example request

{
"objects": {
    "object": [
    {
        "source": {
        "id": "RIPE"
        },
        "attributes": {
        "attribute": [
            {
            "name": "person",
            "value": "Pauleth Palthen"
            },
            {
            "name": "address",
            "value": "Singel 258"
            },
            {
            "name": "phone",
            "value": "+31-1234567890"
            },
            {
            "name": "mnt-by",
            "value": "OWNER-MNT"
            },
            {
            "name": "nic-hdl",
            "value": "AUTO-1"
            },
            {
            "name": "remarks",
            "value": "remark"
            },
            {
            "name": "source",
            "value": "RIPE"
            }
        ]
        }
    }
    ]
}
}

Example response

{
    "link": {
        "xlink:type": "locator",
        "xlink:href": "http://rest.db.ripe.net/ripe"
    },
    "objects": {
        "object": [
            {
                "type": "person",
                "link": {
                    "xlink:type": "locator",
                    "xlink:href": "http://rest.db.ripe.net/ripe/person/PP1-RIPE"
                },
                "source": {
                    "id": "ripe"
                },
                "primary-key": {
                    "attribute": [
                        {
                            "name": "nic-hdl",
                            "value": "PP1-RIPE"
                        }
                    ]
                },
                "attributes": {
                    "attribute": [
                        {
                            "name": "person",
                            "value": "Pauleth Palthen"
                        },
                        {
                            "name": "address",
                            "value": "Singel 258"
                        },
                        {
                            "name": "phone",
                            "value": "+31-1234567890"
                        },
                        {
                            "name": "e-mail",
                            "value": "noreply@ripe.net"
                        },
                        {
                            "link": {
                                "xlink:type": "locator",
                                "xlink:href": "http://rest.db.ripe.net/ripe/mntner/OWNER-MNT"
                            },
                            "name": "mnt-by",
                            "value": "OWNER-MNT",
                            "referenced-type": "mntner"
                        },
                        {
                            "name": "nic-hdl",
                            "value": "PP1-RIPE"
                        },
                        {
                            "name": "remarks",
                            "value": "remark"
                        },
                        {
                            "name": "source",
                            "value": "RIPE"
                        }
                    ]
                }
            }
        ]
    }, 
    "terms-and-conditions": {
        "xlink:type": "locator",
        "xlink:href": "http://www.ripe.net/db/support/db-terms-conditions.pdf"
    }  
}

Example JSON response with error in source and in admin-c attribute:

{
"link" : {
    "type" : "locator",
    "href" : "http://rest.db.ripe.net/ripe/person"
},
"objects" : {
    "object" : [ {
    "type" : "person",
    "link" : {
        "type" : "locator",
        "href" : "http://rest.db.ripe.net/invalid_source/person/PP1-RIPE"
    },
    "source" : {
        "id" : "invalid_source"
    },
    "primary-key" : {
        "attribute" : [ {
        "name" : "nic-hdl",
        "value" : "PP1-RIPE"
        } ]
    },
    "attributes" : {
        "attribute" : [ {
        "name" : "person",
        "value" : "Pauleth Palthen"
        }, {
        "name" : "address",
        "value" : "Singel 258"
        }, {
        "name" : "phone",
        "value" : "+31-1234567890"
        }, {
        "name" : "e-mail",
        "value" : "noreply@ripe.net"
        }, {
        "name" : "admin-c",
        "value" : "INVALID"
        }, {
        "link" : {
            "type" : "locator",
            "href" : "http://rest.db.ripe.net/invalid_source/mntner/OWNER-MNT"
        },
        "name" : "mnt-by",
        "value" : "OWNER-MNT",
        "referenced-type" : "mntner"
        }, {
        "name" : "nic-hdl",
        "value" : "PP1-RIPE"
        }, {
        "name" : "source",
        "value" : "INVALID_SOURCE"
        } ]
    }
    } ]
    },
"errormessages" : {
    "errormessage" : [ {
    "severity" : "Error",
    "text" : "Unrecognized source: %s",
    "args" : [ {
        "value" : "INVALID_SOURCE"
    } ]
    }, {
    "severity" : "Error",
    "attribute" : {
        "name" : "admin-c",
        "value" : "INVALID"
    },
    "text" : "\"%s\" is not valid for this object type",
    "args" : [ {
        "value" : "admin-c"
    } ]
    } ]
},
"terms-and-conditions" : {
    "type" : "locator",
    "href" : "http://www.ripe.net/db/support/db-terms-conditions.pdf"
}
}

Example JSON Response for bad request when trying to delete an object that is referenced by other objects:

{
"link" : {
    "type" : "locator",
    "href" : "http://rest.db.ripe.net/ripe/person/PP1-RIPE"
},
"objects" : {
    "object" : [ {
    "type" : "person",
    "link" : {
        "type" : "locator",
        "href" : "http://rest.db.ripe.net/ripe/person/PP1-RIPE"
    },
    "source" : {
        "id" : "ripe"
    },
    "primary-key" : {
        "attribute" : [ {
        "name" : "nic-hdl",
        "value" : "PP1-RIPE"
        } ]
    },
    "attributes" : {
        "attribute" : [ {
        "name" : "person",
        "value" : "Test Person"
        }, {
        "name" : "address",
        "value" : "Singel 258"
        }, {
        "name" : "phone",
        "value" : "+31 6 12345678"
        }, {
        "name" : "nic-hdl",
        "value" : "PP1-RIPE"
        }, {
        "link" : {
            "type" : "locator",
            "href" : "http://rest.db.ripe.net/ripe/mntner/OWNER-MNT"
        },
        "name" : "mnt-by",
        "value" : "OWNER-MNT",
        "referenced-type" : "mntner"
        }, {
        "name" : "source",
        "value" : "RIPE"
        } ]
    }
    } ]
},
"errormessages" : {
    "errormessage" : [ {
    "severity" : "Error",
    "text" : "Object [%s] %s is referenced from other objects",
    "args" : [ {
        "value" : "person"
    }, {
        "value" : "PP1-RIPE"
    } ]
    } ]
},
"terms-and-conditions" : {
    "type" : "locator",
    "href" : "http://www.ripe.net/db/support/db-terms-conditions.pdf"
}
}

Example JSON Response for incorrect password

{
"link" : {
    "type" : "locator",
    "href" : "http://rest.db.ripe.net/ripe/person/PP1-RIPE"
},
"objects" : {
    "object" : [ {
    "type" : "person",
    "link" : {
        "type" : "locator",
        "href" : "http://rest.db.ripe.net/ripe/person/PP1-RIPE"
    },
    "source" : {
        "id" : "ripe"
    },
    "primary-key" : {
        "attribute" : [ {
        "name" : "nic-hdl",
        "value" : "PP1-RIPE"
        } ]
    },
    "attributes" : {
        "attribute" : [ {
        "name" : "person",
        "value" : "Pauleth Palthen"
        }, {
        "name" : "address",
        "value" : "Singel 258"
        }, {
        "name" : "phone",
        "value" : "+31-1234567890"
        }, {
        "name" : "e-mail",
        "value" : "noreply@ripe.net"
        }, {
        "link" : {
            "type" : "locator",
            "href" : "http://rest.db.ripe.net/ripe/mntner/OWNER-MNT"
        },
        "name" : "mnt-by",
        "value" : "OWNER-MNT",
        "referenced-type" : "mntner"
        }, {
        "name" : "nic-hdl",
        "value" : "PP1-RIPE"
        }, {
        "name" : "remarks",
        "value" : "remark"
        }, {
        "name" : "source",
        "value" : "RIPE"
        } ]
    }
    } ]
},
"errormessages" : {
    "errormessage" : [ {
    "severity" : "Error",
    "text" : "Authorisation for [%s] %s failed\nusing \"%s:\"\nnot authenticated by: %s",
    "args" : [ {
        "value" : "person"
    }, {
        "value" : "PP1-RIPE"
    }, {
        "value" : "mnt-by"
    }, {
        "value" : "OWNER-MNT"
    } ]
    } ]
},
"terms-and-conditions" : {
    "type" : "locator",
    "href" : "http://www.ripe.net/db/support/db-terms-conditions.pdf"
}
}

Example JSON Object Type error:

{
"link" : {
    "type" : "locator",
    "href" : "http://rest.db.ripe.net/ripe/mntner/PP1-RIPE"
},
"errormessages" : {
    "errormessage" : [ {
    "severity" : "Error",
    "text" : "Object type and key specified in URI (%s: %s) do not match the WhoisResources contents",
    "args" : [ {
        "value" : "mntner"
    }, {
        "value" : "PP1-RIPE"
    } ]
    } ]
},
"terms-and-conditions" : {
    "type" : "locator",
    "href" : "http://www.ripe.net/db/support/db-terms-conditions.pdf"
}
}

# Text/Plain

Example response

mntner:         RIPE-DBM-MNT
descr:          Mntner for RIPE DBM objects.
admin-c:        RD132-RIPE
tech-c:         RD132-RIPE
org:            ORG-NCC1-RIPE
auth:           PGPKEY-1290F9D2
auth:           MD5-PW # Filtered
mnt-by:         RIPE-DBM-MNT
created:        2002-09-17T10:24:30Z
last-modified:  2015-07-22T09:34:26Z
source:         RIPE # Filtered

# Elements


Pointer to the resource.

  • The XLink format is used for the links (ref: http://en.wikipedia.org/wiki/XLink).

      <link xlink:type="locator" xlink:href="http://rest-test.db.ripe.net/test/person/TP1-TEST"/>
      "link": {
          "xlink:type": "locator",
          "xlink:href": "http://rest-test.db.ripe.net/test/person/TP1-TEST"
      }
    

# Parameters:

part of a search response, indicating which query flags were used.

  • Inverse-lookup: wraps a set of inverse-attribute

  • Inverse-attribute: value of an inverse query flag

  • Type-filters: wraps a set of type-filter

  • Type-filter: id = the RPSL object type to limit the search to

  • Flags: wraps a set of flag

  • Flag: the value of a query flag

  • Query-strings: wraps a set of query-string

  • Query-string: the value of the query string

  • Sources: wraps a set of source

  • Source: id of RIPE database source

      <parameters>
          <inverse-lookup/>
          <type-filters/>
          <flags>
              <flag value="r"/>
              ...
          </flags>
          <query-strings>
              <query-string value="LP1-TEST"/>
          </query-strings>
          <sources>
              <source id="TEST"/>
          </sources>
      </parameters>
      "parameters": {
          "inverse-lookup": {"inverse-attribute": []},
          "type-filters": {"type-filter": []},
          "flags": {
              "flag": [{"value": "r"}, ...]
          },
          "query-strings": {
              "query-string": [{"value": "LP1-TEST"}]
          },
          "sources": {
              "source": [{"id": "TEST"}]
          }
      }
    

# Objects:

A set of (RPSL-) object representations.

  • Type: the RPSL object type

  • Link: see above

  • Source: indication of which RIPE source object is registered in

  • Primary-key: searchable key in the RIPE database

  • Attributes: set of attribute describing the RPSL object

  • Attribute:

    • can be divided by mandatory:
      • name, value
    • and non-mandatory:
      • link (see Link), referenced-type: used to describe pointer to resource where referenced-type is the RIPE object type.
  • comment

          <objects>
              <object>...</object>
              ...
          </objects>
          "objects": {
              "object": [ ... ]
          }
    

# Object:

Representation of a RPSL object. Contained within Objects.

    <object type="person">
        <link xlink:type="locator" xlink:href="http://rest-test.db.ripe.net/test/person/LP1-TEST"/>
        <source id="test"/>
        <primary-key>
            <attribute name="nic-hdl" value="LP1-TEST"/>
        </primary-key>
        <attributes>
            <attribute .../>
            ...
        </attributes>
        <tags/>
    </object>
    "object": [
        {"type": "person",
        "link": {
                    "xlink:type": "locator",
                    "xlink:href": "http://rest-test.db.ripe.net/test/person/LP1-TEST"
                },
        "source": {"id": "test"},
        "primary-key": { "attribute": [{ "name": "nic-hdl", "value": "LP1-TEST" }] },
        "attributes": { "attribute": [ ... ] },
        "tags": { "tag": [] }
    }
    ]

# Tags:

Set of tag

  • Tag: extra data about a particular object in the RIPE database. Consists of id - the name of the tag, and data

      <tags>
          <tag id="..." data="..."/>
          ...
      </tags>
      "tags": {
          "tag": [ {"id": "...", "data": "..."}, ...]
      }
    

# Geolocation-attributes:

Extra information for inetnum / inet6num RPSL objects.

  • Location: a link (see Link) to the inet(6)num and a longitude latitude value

  • Language: a link (see Link) to the inet(6)num and an ISO 639-1 language code

      <geolocation-attributes>
          <location value="52.375599 4.899902">
              <link xlink:type="locator" xlink:href="..."/>
          </location>
      </geolocation-attributes>
      "geolocation-attributes": {
          "location": [{"value": "52.375599 4.899902", "link": {"xlink:type": "locator", "xlink:href": "..."}}]
      }
    

# Sources:

A set of available source for the RIPE database

  • Source: name, id

  • Valid values: RIPE, TEST

      <sources>
          <source name="RIPE" id="ripe"/>
          <source name="TEST" id="test"/>
      </sources>
      "sources" : {
          "source" : [ {"name" : "RIPE", "id" : "ripe"}, {"name" : "TEST","id" : "test"} ]
      }
    

# Grs-sources:

A set of available grs-source for the RIPE database

  • Source: name, id and grs-id

  • Valid Values: AFRINIC-GRS, APNIC-GRS, ARIN-GRS, JPIRR-GRS, LACNIC-GRS, RADB-GRS

      <grs-sources>
          <source name="APNIC-GRS" id="apnic-grs" grs-id="apnic-grs"/>
      </grs-sources>
      "grs-sources" : {
          "source" : [ {"name" : "APNIC-GRS", "id" : "apnic-grs", "grs-id" : "apnic-grs"} ]
      }
    

# Versions:

Enumeration of the changes of a particular object. Will only be in the versions response payload. Consists of type (see Type), key (see Primary key) and version.

  • Version: information about a particular version of the object. It can either be deleted, in which case there's only a date, or show information about the revision.

      <versions type="aut-num" key="...">
          <version>
              <revision>1</revision>
              <date>2013-08-27 11:23</date>
              <operation>ADD/UPD</operation>
          </version>
      </versions>
      "versions" : {
          "type" : "aut-num",
          "key" : "...",
          "version" : [ {
              "deleted" : null,
              "revision" : 1,
              "date" : "2013-08-27 11:26",
              "operation" : "ADD/UPD"
          } ]
      }
    

# Error messages:

A set of errormessage containing information about the performed operation. A message concerns the operation, an object of the operation, or an attribute of an object. It has a severity (Error, Warning, Info), a text description and a set of arguments supplied to the operation.

    <errormessages>
        <errormessage severity="..." text="...">
        <args value="..."/>
        <!--...more "args" elements...-->
        </errormessage>
        <!--...more "errormessage" elements...-->
    </errormessages>
    "errormessages" : {
        "errormessage" : [ {
            "severity" : "...",
            "text" : "...",
            "args" : [ ]
            } ]
    }

Example XML error response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<whois-resources xmlns:xlink="http://www.w3.org/1999/xlink">
<link xlink:type="locator" xlink:href="http://rest.db.ripe.net/invalid/person/TP1-RIPE"/>
<errormessages>
    <errormessage severity="Error" text="Invalid source '%s'">
        <args value="invalid"/>
    </errormessage>
</errormessages>
<terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/>
</whois-resources>

Example JSON error response:

{
"link" : {
    "type" : "locator",
    "href" : "http://rest.db.ripe.net/invalid/person/TP1-RIPE"
},
"errormessages" : {
    "errormessage" : [ {
    "severity" : "Error",
    "text" : "Invalid source '%s'",
    "args" : [ {
        "value" : "invalid"
    } ]
    } ]
},
"terms-and-conditions" : {
    "type" : "locator",
    "href" : "http://www.ripe.net/db/support/db-terms-conditions.pdf"
}
}

# Data Types

  • Inverse Attribute
  • One of: abuse-c, abuse-mailbox, admin-c, auth, author, ds-rdata, fingerprint, form, ifaddr, irt-nfy, local-as, mbrs-by-ref, member-of, mnt-by, mnt-domains, mnt-irt, mnt-lower, mnt-nfy, mnt-ref, mnt-routes, notify, nserver, org, origin, person, ping-hdl, ref-nfy, tech-c, upd-to, zone-c.
  • Object Type
  • One of: as-block, as-set, aut-num, domain, filter-set, inet6num, inetnum, inet-rtr, irt, key-cert, mntner, organisation, peering-set, person, poem, poetic-form, role, route, route6, route-set, rtr-set.
  • Severity
  • One of: Error, Warning, Info.
  • Source
  • One of: RIPE, TEST, or a GRS source (AFRINIC-GRS, APNIC-GRS, ARIN-GRS, JPIRR-GRS, LACNIC-GRS, RADB-GRS, RIPE-GRS).

# Template Resources

# Description

RPSL templates object type.

# XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template-resources xmlns:xlink="http://www.w3.org/1999/xlink">
<link xlink:type="locator" xlink:href="http://rest.db.ripe.net/metadata/templates/person"/>
<service name="getObjectTemplate"/>
<templates>
    <template type="person">
        <source id="ripe"/>
        <attributes>
            <attribute name="person" requirement="MANDATORY" cardinality="SINGLE" keys="LOOKUP_KEY"/>
            <attribute name="address" requirement="MANDATORY" cardinality="MULTIPLE" keys=""/>
            <attribute name="phone" requirement="MANDATORY" cardinality="MULTIPLE" keys=""/>
            <attribute name="fax-no" requirement="OPTIONAL" cardinality="MULTIPLE" keys=""/>
            <attribute name="e-mail" requirement="OPTIONAL" cardinality="MULTIPLE" keys="LOOKUP_KEY"/>
            <attribute name="org" requirement="OPTIONAL" cardinality="MULTIPLE" keys="INVERSE_KEY"/>
            <attribute name="nic-hdl" requirement="MANDATORY" cardinality="SINGLE" keys="PRIMARY_KEY LOOKUP_KEY"/>
            <attribute name="remarks" requirement="OPTIONAL" cardinality="MULTIPLE" keys=""/>
            <attribute name="notify" requirement="OPTIONAL" cardinality="MULTIPLE" keys="INVERSE_KEY"/>
            <attribute name="abuse-mailbox" requirement="OPTIONAL" cardinality="MULTIPLE" keys="INVERSE_KEY"/>
            <attribute name="mnt-by" requirement="MANDATORY" cardinality="MULTIPLE" keys="INVERSE_KEY"/>
            <attribute name="source" requirement="MANDATORY" cardinality="SINGLE" keys=""/>
        </attributes>
    </template>
</templates>
</template-resources>

# JSON

{
    "service": "getObjectTemplate",
    "link": {
    "xlink:type": "locator",
    "xlink:href": "http://rest.db.ripe.net/metadata/templates/peering-set"
    },
    "service" : {
    "name" : "getObjectTemplate"
    },
    "templates": {
    "template": [
        {
        "type": "peering-set",
        "source": {
            "id": "ripe"
        },
        "attributes": {
            "attribute": [
            {
                "name": "peering-set",
                "requirement": "MANDATORY",
                "cardinality": "SINGLE",
                "keys": ["PRIMARY_KEY","LOOKUP_KEY"]
            },
            {
                "name": "descr",
                "requirement": "MANDATORY",
                "cardinality": "MULTIPLE",
                "keys": []
            },
            {
                "name": "peering",
                "requirement": "OPTIONAL",
                "cardinality": "MULTIPLE",
                "keys": []
            },
            {
                "name": "mp-peering",
                "requirement": "OPTIONAL",
                "cardinality": "MULTIPLE",
                "keys": []
            },
            {
                "name": "remarks",
                "requirement": "OPTIONAL",
                "cardinality": "MULTIPLE",
                "keys": []
            },
            {
                "name": "org",
                "requirement": "OPTIONAL",
                "cardinality": "MULTIPLE",
                "keys": ["INVERSE_KEY"]
            },
            {
                "name": "tech-c",
                "requirement": "MANDATORY",
                "cardinality": "MULTIPLE",
                "keys": ["INVERSE_KEY"]
            },
            {
                "name": "admin-c",
                "requirement": "MANDATORY",
                "cardinality": "MULTIPLE",
                "keys": ["INVERSE_KEY"]
            },
            {
                "name": "notify",
                "requirement": "OPTIONAL",
                "cardinality": "MULTIPLE",
                "keys": ["INVERSE_KEY"]
            },
            {
                "name": "mnt-by",
                "requirement": "MANDATORY",
                "cardinality": "MULTIPLE",
                "keys": ["INVERSE_KEY"]
            },
            {
                "name": "mnt-lower",
                "requirement": "OPTIONAL",
                "cardinality": "MULTIPLE",
                "keys": ["INVERSE_KEY"]
            },
            {
                "name": "source",
                "requirement": "MANDATORY",
                "cardinality": "SINGLE",
                "keys": []
            }
            ]
        }
        }
    ]
    }
}