That should be because the ScopeId parameter must be entered as Base64 encoded (e.g. AQ instead of 1); or leave it as “_” that means “Current Scope”.
The semantic of that 404 should be “Scope not found” actually.
As username and password you can use kapua-sys / kapua-paassword as usual. Just pass them to the authenticate/user method under the Authentication
resource, then copy the value of the resulting tokenId field to the input field on the top bar, next to the swagger.json url. Now you should be able to execute authenticated calls.
By the way, did you get my notice on PR #396? Have you had the chance to test it?
Claudio Mezzasalma | Eurotech
Da:
<kapua-dev-bounces@xxxxxxxxxxx> per conto di Henryk Konsek <hekonsek@xxxxxxxxx>
Risposta: kapua developer discussions <kapua-dev@xxxxxxxxxxx>
Data: martedì 21 marzo 2017 15:12
A: kapua developer discussions <kapua-dev@xxxxxxxxxxx>
Oggetto: Re: [kapua-dev] REST API vs Web UI
Hmmm, also apparently operation URL generated by Swagger returns 404:
What operation URL do you use Claudio?
What is default username/password pair for REST API?
BTW I have provided some basic documentation for Swagger [1] based on my experiences so far.
Let me give it a try, Claudio!
It should be on the REST API servlet root (although it’s not an actual file, but it’s served
dynamically by the servlet itself). So I’d remove the /api from the JSON URI and click Explore to make Swagger UI load it again.
Claudio Mezzasalma | Eurotech
Data:
lunedì 20 marzo 2017 12:34
I can open Swagger UI, many thanks! But apparently Swagger can't locate swagger.json file (see screenshot). Any idea where swagger.json can be?
Errore. Il nome file non è specificato.
Data:
lunedì 20 marzo 2017 10:08
Oggetto:
Re: [kapua-dev] REST API vs Web UI
Thank you Claudio.
What is the proper URL to get access to REST API docs then?
Yes, it’s totally correct.
The GWT console uses its own RPC calls and not our REST APIs; the Patternfly console, in the other hand, uses only REST calls, but unfortunately it only covers
a few calls about Devices and Users currently. However, by opening
http://<kapua_server_address>/api/doc you can see the updated Swagger documentation for all the methods currently available (maybe some of the new datastore REST APIs are missing, I can’t recall whether they have been already merged or not).
Hope this helps!
Claudio Mezzasalma | Eurotech
Hi,
I wanted to play a bit with our REST API and document it. To be exact I'd like to list events associated with a given device. I attempted to reverse engineer communication used
by web UI to see what REST calls it performs. But I see that apparently our UI uses some GWT-specific calls, not our REST API - is that correct? (see attachments)
Errore. Il nome file non è specificato.
_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kapua-dev
_______________________________________________
kapua-dev mailing list
kapua-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kapua-dev
|