Ali,

Almost every doc about DSpace's REST API out there are wrong or outdated.
The following one is right, but it is incomplete. I'm trying to find
some time to fix it but i haven't managed to do it yet.
However, some time ago i've wrote some basic Shell-Scripts to test the
API's endpoints and to prepare myself to write the doc.

You can access the files here: https://github.com/BrunoNZ/dspace-rest-requests

If you're using Ubuntu, shell-script might be familiar to you, and so
it must be quite easy to use the scripts.

First of all you have to edit the file "rest.cfg" with your dspace's
url, user and password, or leave it how it is to use Dspace's demo
site (http://demo.dspace.org/).

Then, you get a token by executing:
$ ./login

And finally, execute:
$ ./send_request.sh <TOKEN> <REQUEST_FILE> <REQUEST_TYPE : (XML or JSON)>

The request's files are inside "requests" folder. Each file contains a
sample form of each endpoind on XML and JSON.

For instance, if you want to create a new community:
./send_request.sh "69bd9f3f-c78e-4319-bad3-793dea3bccbd"
requests/POST_0_new-communities.sh json

If you're using Ruby, we're developing a Ruby Gem to interact with
Dspace's rest api. If you're interested, the code is here:
https://gitlab.c3sl.ufpr.br/c3sl/dspace-rest-client

I hope it helps you!!


2015-05-09 6:08 GMT-03:00 ali esmaeili <a.esmaeili....@gmail.com>:
> hi.
> i want to add community from REST API to dspace.
> i have dspace 5.1 on ubuntu and install rest api properly on local host.
> based on
> https://jspace.atlassian.net/wiki/display/DSPACEAPI/POST_communities
>
> i should insert  POST http://path/to/rest/communities.json and then
> {
>     "communityId":"1"
>     "name":"A test community",
>     "shortDescription":"Community created with JSON"
> }
>
> but when i insert them in termina,no response get.
> please help me to post community truly.tnx
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



-- 
Bruno Nocera Zanette
+55 41 9992-2508

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to