Skip to content

Error when post one xml file with multiple objects in  #524

@mkhachfeh

Description

@mkhachfeh

Hello All,

Kindly I am using RIPE REST API to communicate with RIPE DB via Python Script, I can read from without a problem, but have a problem while POST multiple objects within whois-resources (1 XML file).

Example of XML file I am posting to RIPE TEST DB:
<whois-resources> <objects> <object type="route"> <attributes> <attribute name="route" value="62.62.100.0/24" /> <attribute name="descr" value="TEST1" /> <attribute name="origin" value="AS102" /> <attribute name="mnt-by" value="TEST-DBM-MNT" /> <attribute name="source" value="TEST" /> </attributes> </object> <object type="route"> <attributes> <attribute name="route" value="92.92.100.0/24" /> <attribute name="descr" value="TEST2" /> <attribute name="origin" value="AS102" /> <attribute name="mnt-by" value="TEST-DBM-MNT" /> <attribute name="source" value="TEST" /> </attributes> </object> </objects> </whois-resources>

And error I am receiving is:
<?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-test.db.ripe.net/TEST/route"/><errormessages><errormessage severity="Error" text="Single object expected in WhoisResources (found %d)"><args value="2"/></errormessage></errormessages><terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/></whois-resources>
Any advice why I have this problem? for me it is not logic.

And in case within whois-resources I can create only one object, how can I create multiple objects within 1 XML file?

Thanks in advance,
Mou

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions