loadRDF via the API

17 views
Skip to first unread message

Sotiris Karampatakis

unread,
May 18, 2018, 8:47:11 AM5/18/18
to semanticturkey-developer
Hello,

I am trying to upload some RDF into a project I have created on VocBench 3 by using the ST API through curl but I always get a 401 response.

I tried to give as input my credentials but it is still failing. 

How should I send the request?

Thank you for your time.

Best,
Sotiris

Armando Stellato

unread,
May 18, 2018, 10:43:23 AM5/18/18
to semanticturk...@googlegroups.com

Dear Sotiris,

 

Error 401 corresponds to an unauthenticated access.

 

You first need to login and then you can proceed with the other services

http://semanticturkey.uniroma2.it/doc/user/first_access.jsf

 

If you are using ST/VB 3.0.x, the page above is up-to-date. If you built VB from the GIT repository, there are a few changes that will be documented as soon as 4.0 is out.

In any case, if you have any doubt, it suffices to perform an action from VB and check the call that has been done from the browser where VB is acting.

 

Cheers,

 

Armando

 

 

 

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.
Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-dev...@googlegroups.com.
Per altre opzioni visita https://groups.google.com/d/optout.

Sotiris Karampatakis

unread,
May 18, 2018, 11:43:06 AM5/18/18
to semanticturk...@googlegroups.com
Dear Armando,

Thank you for your prompt response.

I followed your directions and now I get a 403 error.

I am trying to test with Postman, and I get again 403 "Authentication failed. Wrong username and password combination"

However I use a user I have created through VocBench. Should I create one through the API?

The same credentials from VB3 are working, ie I can login and upload the RDF to my vocab. 

I am using the release version of VB3, since I could not sucessfully built VB and ST from your git repo. Something about missing dependencies, IIRC. 

You can see the reques I am creating below.

POST /semanticturkey/it.uniroma2.art.semanticturkey/st-core-services/Auth/login? HTTP/1.1
Host: localhost:1979
password: secret
_spring_security_remember_me: false
Cache-Control: no-cache
Postman-Token: c8a7274a-b181-5716-1164-7eefdaaf9a04
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

Kind regards,
Sotiris




Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsub...@googlegroups.com.


Per altre opzioni visita https://groups.google.com/d/optout.

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.
Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsub...@googlegroups.com.

Per altre opzioni visita https://groups.google.com/d/optout.



--
Sotiris Karampatakis
Developer and Data Analyst
Open GLAM and Open Science Coordinator, OK Greece
M. Sc. Web Science
Faculty of Mathematics
Aristotle University of Thessaloniki
Greece

Armando Stellato

unread,
May 18, 2018, 12:07:17 PM5/18/18
to semanticturk...@googlegroups.com

Dear Sotiris,

 

I should check in detail the call and come back to you. However, a couple of things in the meanwhile:

 

  1. No need to do through the API. VB3 just invokes the API of ST, so the calls are the same ;-) indeed, as I suggested, you could check the call made by the browser when you access through VB and compare it with your own
  2. Just a quick guess: maybe you redefined your admin username/email, and in case ignore this comment. However the one you used looks pretty much like the standard one, except in that case, it is wrong: you wrote ad...@admin.com, while the default admin is ad...@vocbench.com
    Could this be the error?

 

Cheers,

 

Armando

 

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-dev...@googlegroups.com.

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-dev...@googlegroups.com.


Per altre opzioni visita https://groups.google.com/d/optout.



 

--

Sotiris Karampatakis

Developer and Data Analyst

Open GLAM and Open Science Coordinator, OK Greece

M. Sc. Web Science

Faculty of Mathematics

Aristotle University of Thessaloniki

Greece

--

Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-dev...@googlegroups.com.

Sotiris Karampatakis

unread,
May 18, 2018, 12:21:42 PM5/18/18
to semanticturk...@googlegroups.com
Dear Armando,

Thank you for your interest. The credentials are the same I use to connect through the VB3. 

I checked the calls from the browser and copied them to my client. But I still get the 403. 

I finally managed to connect through Postman. Not tested about the load procedure. I had misconfigured the key-value pairs as headers. I put them as params and now this part works. But I have still problem on my client. 

I am using LinkedPipes ETL to create a vocab and then I want to upload it to VB3 through the pipeline, but the last part fails.

So maybe it is not on your side, but on my client LP-ETL or some configuration there. 

I think I should check the requests received by Jetty, but I am not sure I know how. Not very familiar. If you have any hint I would be grateful.

Thank you again for your interest.

Best,
Sotiris

2018-05-18 19:07 GMT+03:00 Armando Stellato <stel...@uniroma2.it>:

Dear Sotiris,

 

I should check in detail the call and come back to you. However, a couple of things in the meanwhile:

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsub...@googlegroups.com.

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsub...@googlegroups.com.


Per altre opzioni visita https://groups.google.com/d/optout.



 

--

Sotiris Karampatakis

Developer and Data Analyst

Open GLAM and Open Science Coordinator, OK Greece

M. Sc. Web Science

Faculty of Mathematics

Aristotle University of Thessaloniki

Greece

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsub...@googlegroups.com.


Per altre opzioni visita https://groups.google.com/d/optout.

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.
Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsub...@googlegroups.com.

Per altre opzioni visita https://groups.google.com/d/optout.

Sotiris Karampatakis

unread,
May 19, 2018, 3:57:34 AM5/19/18
to semanticturk...@googlegroups.com
Dear Arnando,
It seems that I finally managed to achieve communication between the two services. 

At first I tested with http://requestcatcher.com/ the requests that LP-ETL was sending and seemed that it looked like the same that was sent through the VB3 forntend. 

However It could not create a succesfull login. The same happened through Postman. 

Then I passed the email and password parameters as URL query string parameters, and not as form-data content, and worked.This seems a bit strange because it is a POST request. 

To finally update the project with the triplets generated through LP-ETL I had to pass the Cookie header generated in the previous login step on the loadRDF request and it worked.

Thank you again for your support and your time hepling me out. 

Best,
Sotiris

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsubscr...@googlegroups.com.

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsubscr...@googlegroups.com.


Per altre opzioni visita https://groups.google.com/d/optout.



 

--

Sotiris Karampatakis

Developer and Data Analyst

Open GLAM and Open Science Coordinator, OK Greece

M. Sc. Web Science

Faculty of Mathematics

Aristotle University of Thessaloniki

Greece

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.

Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsubscr...@googlegroups.com.


Per altre opzioni visita https://groups.google.com/d/optout.

--
Hai ricevuto questo messaggio perché sei iscritto al gruppo "semanticturkey-developer" di Google Gruppi.
Per annullare l'iscrizione a questo gruppo e non ricevere più le sue email, invia un'email a semanticturkey-developer+unsubscr...@googlegroups.com.

Per altre opzioni visita https://groups.google.com/d/optout.



--
Sotiris Karampatakis
Developer and Data Analyst
Open GLAM and Open Science Coordinator, OK Greece
M. Sc. Web Science
Faculty of Mathematics
Aristotle University of Thessaloniki
Greece
Reply all
Reply to author
Forward
0 new messages