Thanks guys, problem solved the magic is in the syntax of the curl command:
curl --anyauth --user admin:admin -i -X PUT --data-binary *@./sample.xml* \ -H "Content-type: application/rdf+xml" \ http://localhost:8003/v1/graphs\?default I had missed the *'@./' *before the file name, noob's mistake with curl I guess. But it works now thanks again. On Mon, Feb 16, 2015 at 9:37 PM, Anthony Coates <anthony.coa...@db.com> wrote: > Classification: *Public* > > The MIME type “application/rdf+xml” will only work if your RDF is RDF/XML > (I suspect). Is it, or is it in one of the other RDF formats? You haven’t > posted an example so I don’t know. > > > > Cheers, Tony. > > > > *From:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *On Behalf Of *Basavaraj Kalloli > *Sent:* 16 February 2015 16:02 > > *To:* MarkLogic Developer Discussion > *Subject:* Re: [MarkLogic Dev General] Loading Skos triples using Rest > > > > Yeap so I used the MIME type as 'application/rdf+xml' and tried the above > curl request with PUT but it just fails with the below error: > > > > <rapi:error > xmlns:rapi="http://marklogic.com/rest-api"><rapi:status-code>400</rapi:status-code><rapi:status>Bad > Request</rapi:status><rapi:message-code>XDMP-DOCROOTTEXT</rapi:message-code><rapi:message>XDMP-DOCROOTTEXT: > xdmp:get-request-body("xml") -- Invalid root text > > > > On Mon, Feb 16, 2015 at 9:28 PM, Anthony Coates <anthony.coa...@db.com> > wrote: > > Classification: *Public* > > SKOS is just RDF, to the question is just around what RDF format has been > used (e.g. Turtle vs. RDF/XML). SKOS doesn’t have its own MIME type. Cheers, > Tony. > > > > *From:* general-boun...@developer.marklogic.com [mailto: > general-boun...@developer.marklogic.com] *On Behalf Of *David Ennis > *Sent:* 16 February 2015 15:56 > *To:* MarkLogic Developer Discussion > *Subject:* Re: [MarkLogic Dev General] Loading Skos triples using Rest > > > > HI. > > > > The supported formats of triples used with the REST api are listed here > with the corresponding mime-type needed for the post request to the server: > > > > http://docs.marklogic.com/guide/semantics/loading#id_70682 > > > > If you are using a format not listed here, then you will likely need to > transform it to one of the supported types. > > > > > > > Kind Regards, > > David Ennis > > > > > > *David Ennis* > *Content Engineer* > > [image: HintTech] <http://www.hinttech.com/> > Mastering the value of content > creative | technology | content > > Delftechpark 37i > 2628 XJ Delft > The Netherlands > T: +31 88 268 25 00 > M: +31 63 091 72 80 > > [image: http://www.hinttech.com] <http://www.hinttech.com/> [image: > http://www.hinttech.com/signature/Twitter_HintTech.png] > <https://twitter.com/HintTech> [image: > http://www.hinttech.com/signature/Facebook_HintTech.png] > <http://www.facebook.com/HintTech> [image: > http://www.hinttech.com/signature/Linkedin_HintTech.png] > <http://www.linkedin.com/company/HintTech> > > > > On 16 February 2015 at 16:40, Basavaraj Kalloli < > basavarajkall...@gmail.com> wrote: > > Hi MarkLogic Devs, > > > > I want to load triples using the Rest endpoint as documented here: > > > > http://docs.marklogic.com/guide/semantics/loading#id_97293 > > > > But I have a Skos format and I dont see a way to set the MimeType to Skos > for it to be loaded. Any ideas how to get this to work? > > > > The simplest thing to do is use mlcp to load this, but I cant use mlcp > because I am working on a stateless environment where I dont have access to > the File System. > > > > Cheers, > > Basu > > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general > > > > > > --- > This e-mail may contain confidential and/or privileged information. If you > are not the intended recipient (or have received this e-mail in error) > please notify the sender immediately and delete this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this > e-mail is strictly forbidden. > > Please refer to http://www.db.com/en/content/eu_disclosures.htm for > additional EU corporate and regulatory disclosures and to > http://www.db.com/unitedkingdom/content/privacy.htm for information about > privacy. > > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general > > > > > --- > This e-mail may contain confidential and/or privileged information. If you > are not the intended recipient (or have received this e-mail in error) > please notify the sender immediately and delete this e-mail. Any > unauthorized copying, disclosure or distribution of the material in this > e-mail is strictly forbidden. > > Please refer to http://www.db.com/en/content/eu_disclosures.htm for > additional EU corporate and regulatory disclosures and to > http://www.db.com/unitedkingdom/content/privacy.htm for information about > privacy. > > _______________________________________________ > General mailing list > General@developer.marklogic.com > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general