Using Translation Memory Service REST API with swagger ui

Hello!

I am able to access GroupShare Rest API (example: http://[myserver]:41234/documentation/api/index#/)

as described by Romulus Crisan here:

https://romuluscrisan.com/explore-groupshare-2017-rest-apis-using-swagger/

but when i open the Translation Memory Service page (i.e. http://[myserver]:41235/docs/ui/index#/) I can't test any call that requires authentication, even If i copy and paste the authorization from the GroupShare Rest API page.

This means that these calls works: 

GET /api/tmservice/health
GET /api/tmservice/health/version

but THESE and all the others won't work:
- GET /api/tmservice/tasks
- GET /api/tmservice/containers
- GET /api/fieldservice/templates
- GET /api/language-resource-service/templates 

and return error 500:

{ "message": "You are not authorized to access this resource" }

I'm probably missing something obvious, would please someone help me explaining how to test Translation Memory Service with built-in swagger UI?

 

Thank You in advance!

Parents Reply
  • Thank you Romulus.
    There's probably something i do wrong because it doesn't works for me. I've used the same server you're working on (I have an account there).

    what I did:
    - went to "gs2017dev.sdl.com:41234/.../index
    - wrote username e password in the corresponding header fields
    - tried the login call and got the Authorization key (and copy-pasted it in the required field, no "bearer" needed here)
    - tried calling any call in this page and it worked (for example license info)
    - went to "gs2017dev.sdl.com:41235/.../index
    - wrote "Bearer " + pasted authorization key (no " )
    - Tried "get containers" (gets the list of all available containers)
    - got "service error" "you're not authorized to access this resource".

    Some caveats:
    - I tried either pressing or not pressing "explore"
    - I tried with or without "Bearer "
    - I tried with the aforementioned server, but also our server
    - I was able to successfully access the rest api from our PMS and perform a concordance search on a tm.

    So the service is working, this seems more something about the swagger UI or more probably I'm doing something stupid/wrong with it.
Children