actually we try to use Umbraco with Java, while using Umbracos REST API v1. After a few tries we could access some of the GET-Methods, but at the moment we aren't able to use PUT/DELETE or POST Calls.
Is their some piece of documentation which display a list of available REST-Callls? At the moment we use the documentation of the Content-Service to get an idea about the methods, (ContentService) but we aren't able to send requests to create or delete content...
We also checked the allowed verbs in the IIS-configuration.
Can anyone give me some hints? Here is an example call send over postman: .../umbraco/rest/v1/content/Delete?id=1111
With the DELETE Request we didn't receive an error but nothing is happening?
First of all i want to thank you for an outstanding evening @umboktoberfest 2015. I hope all umbraco people went home safely.
We talked together @umboktoberfest about the RestApi. We have already work through the documentation. The GET-Methods works fine. Now we need some hints about how to use PUT/DELETE or POST calls.
Can you give us some example? Maybee how to delete a tree in the Content-Section?
You can see there how DELETE should work when it's overridden, it's based on an ID. However, the content/media controller's don't have this implemented yet IIRC, though Members and Relations do.
POST = update, you just send the same json structure as you have for a single item. You can also look at the 'metadata' structure (i.e. GetMetadata method) to see how the json is formatted for saving if you felt the need to create this manually.
PUT = create, it's basically the same as POST without an Id.
The endpoints for both are the same as the GET endpoint just using a different http method.
There are tests you can review for their functionality.
We would be delighted for any help regarding the REST API, implementing DELETE methods would be super easy, you could basically follow the same principles as the Member controller.
We've got our PUT/POST/DELTE requests running! Also the document upload is working. I hope you guys are still working at your REST API and documentation in the future, i think this would be amazing for a lot of people out there ;).
At the moment it's quite hard to use umbraco (java) without sniffing the calls from the UI and some code analysis.
Umbraco RESTFUL API PUT, POST & DELETE
Hello everyone,
actually we try to use Umbraco with Java, while using Umbracos REST API v1. After a few tries we could access some of the GET-Methods, but at the moment we aren't able to use PUT/DELETE or POST Calls.
Is their some piece of documentation which display a list of available REST-Callls? At the moment we use the documentation of the Content-Service to get an idea about the methods, (ContentService) but we aren't able to send requests to create or delete content...
We also checked the allowed verbs in the IIS-configuration.
Can anyone give me some hints? Here is an example call send over postman: .../umbraco/rest/v1/content/Delete?id=1111
With the DELETE Request we didn't receive an error but nothing is happening?
Hi Antonios,
Have you seen the Rest Api documentation, if not then you can find it here https://our.umbraco.org/documentation/Implementation/Rest-Api/
Hope this can help you a step further.
/Dennis
First of all i want to thank you for an outstanding evening @umboktoberfest 2015. I hope all umbraco people went home safely.
We talked together @umboktoberfest about the RestApi. We have already work through the documentation. The GET-Methods works fine. Now we need some hints about how to use PUT/DELETE or POST calls.
Can you give us some example? Maybee how to delete a tree in the Content-Section?
Thanks in advance Alex
Since this is a 0.9 version, much of the functionality might not be implemented.
The easiest way right now to review how to do things is to look at the code:
https://github.com/umbraco/UmbracoRestApi
There's tests written for all Actions, for example:
https://github.com/umbraco/UmbracoRestApi/blob/master/src/Umbraco.RestApi.Tests/ContentControllerTests.cs
This is the base controller for all controllers:
https://github.com/umbraco/UmbracoRestApi/blob/master/src/Umbraco.RestApi/Controllers/UmbracoHalController.cs
You can see there how DELETE should work when it's overridden, it's based on an ID. However, the content/media controller's don't have this implemented yet IIRC, though Members and Relations do.
POST = update, you just send the same json structure as you have for a single item. You can also look at the 'metadata' structure (i.e. GetMetadata method) to see how the json is formatted for saving if you felt the need to create this manually.
PUT = create, it's basically the same as POST without an Id.
The endpoints for both are the same as the GET endpoint just using a different http method.
There are tests you can review for their functionality.
We would be delighted for any help regarding the REST API, implementing DELETE methods would be super easy, you could basically follow the same principles as the Member controller.
I've created an issue for this: https://github.com/umbraco/UmbracoRestApi/issues/11
Thank you very much for the quick Answer! I think that helps us further.
Hey pals,
thank's for your answers.
We've got our PUT/POST/DELTE requests running! Also the document upload is working. I hope you guys are still working at your REST API and documentation in the future, i think this would be amazing for a lot of people out there ;).
At the moment it's quite hard to use umbraco (java) without sniffing the calls from the UI and some code analysis.
Greetings Toni
Hey Toni,
that sounds good! Maybe you can share your findings with the community?
That would be awesome!
Greetings Alex
is working on a reply...