# POST request returns 415

**URL:** <https://community.stardog.com/t/post-request-returns-415/3035>\
**Category:** Support\
**Created:** [May 9, 2021, 2:16pm UTC](https://community.stardog.com/t/post-request-returns-415/3035 "2021-05-09T14:16:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyTheArtchitect](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/andytheartchitect/32/979_2.png) [@andyTheArtchitect](https://community.stardog.com/u/andyTheArtchitect)\
**Post date:** [May 9, 2021, 2:16pm UTC](https://community.stardog.com/t/post-request-returns-415/3035/1 "2021-05-09T14:16:57Z")

</div>

I am using an application we developed to load data in .ttl format into a Stardog DB on localhost. The application ends up building the following POST request:  
POST [http://usr:pwd@localhost:5820/myDB/update?graph=https%3A%2F%2Fapp.test.io%2Fgraphs%2Fontologies](http://usr:pwd@localhost:5820/myDB/update?graph=https%3A%2F%2Fapp.test.io%2Fgraphs%2Fontologies)

I get response 415 (unsupported media type).  
I have no issue running the same (adjusting the endpoints, of course) on Apache Jena or Anzograph.

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pavel/32/18_2.png) [@pavel](https://community.stardog.com/u/pavel)\
**Post date:** [May 10, 2021, 4:37pm UTC](https://community.stardog.com/t/post-request-returns-415/3035/2 "2021-05-10T16:37:09Z")

</div>

Hi Andy,

It's probably not very apparent from our HTTP API docs but there're different endpoints for SPARQL Update queries (`/{db}/update`) and SPARQL Graph Store Protocol (`/{db}`). You're using the former and it expects a query, not data. It looks like you need [PUT Graph](https://stardog-union.github.io/http-docs/#operation/setGraph) or [Post Graph](https://stardog-union.github.io/http-docs/#operation/setGraph) instead. There the payload is data in some RDF serialisation, like Turtle.

Cheers,  
Pavel

---

<div class="post-metadata">

**Author:** ![andyTheArtchitect](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/andytheartchitect/32/979_2.png) [@andyTheArtchitect](https://community.stardog.com/u/andyTheArtchitect)\
**Post date:** [May 15, 2021, 2:12pm UTC](https://community.stardog.com/t/post-request-returns-415/3035/3 "2021-05-15T14:12:04Z")

</div>

Hi Pavel,

That helped, thank you!  
Just for completeness purposes, if you have authentication enabled, you need to use:  
[http://usr:pwd@localhost:5820/dbname/](http://usr:pwd@localhost:5820/dbname/)

Regards,  
Andreas

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 29, 2021, 2:12pm UTC](https://community.stardog.com/t/post-request-returns-415/3035/4 "2021-05-29T14:12:50Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
