Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Web APIs to access ontologies in WebProtege #380

Open
tudorache opened this issue Mar 10, 2017 · 23 comments
Open

Provide Web APIs to access ontologies in WebProtege #380

tudorache opened this issue Mar 10, 2017 · 23 comments
Labels
Type: Enhancement A request for a change that is an enhancement

Comments

@tudorache
Copy link
Member

Provide Web APIs (REST, ideally) to:

  • download an ontology
  • get the list of available ontologies
  • upload an ontology
  • replace an ontology
@tudorache tudorache added the Type: Enhancement A request for a change that is an enhancement label Mar 10, 2017
@ejwinter
Copy link

A rich API would be so powerful. I don't see any indication that there is one.

This has been a great tool for play but an API will make it a truly useful backbone.

Thank you!

A way to get autocompletion suggestions
GET /api/#projects/GUID/suggest?query=Prostate

A way to get info about a term including HATEOES to parents and children, synonyms, related terms.
GET /api/#projects/GUID/{term/synoym}

@rodriguesk
Copy link

is this ever going to be in the works?

@matuskalas
Copy link

We from https://github.com/edamontology rely heavily on WebProtégé. An API to

  • create an ontology
  • update an ontology (returning list of changes)

would be extreeemely useful. Otherwise our life is made very difficult, with no CI and CD possible (Continuous Integration and Deployment).

The WebProtégé web frontend has to somehow communicate with the backend. Could that channel be used by 3rd-party applications as some kind of an API?

@BreeAnn7
Copy link

I can see that WebProtege 3.0.0 tag was removed. Does this mean there is still no API access?? We'd really like to see this happen!! If it did happen is there developer documentation on how to access available?

@ronniebrito
Copy link

looks like there is an API in current code version, but couldnt find any documentation about it
an API, or another method to download and ontology would be very usefull

@matuskalas
Copy link

I can see that WebProtege 3.0.0 tag was removed. Does this mean there is still no API access?? We'd really like to see this happen!! If it did happen is there developer documentation on how to access available?

We really need it too! WebProtégé is so amazing and important for us, we just need an API in addition to what it provides (even a very simple API would help)

@joakimsod
Copy link

Any progress on this?

@boris-horner
Copy link

Just being able to export / import an ontology throughh an API would be extremely helpful (and I think for others in this thread, too). Wouldn't it be possible to expose that as a first step, and add more functionality later? I am working on a better integration to convert an existing ontology to graphml to visualize it in yEd...

@matthewhorridge
Copy link
Contributor

This is in the works now. We have a project that is funded by BASF to provide a proper Web API and to make WebProtege more extensible.

@boris-horner
Copy link

Great to hear, thanks for the quick reply. I'll keep an eye on new WebProtégé versions then.

@matuskalas
Copy link

Just being able to export / import an ontology throughh an API would be extremely helpful (and I think for others in this thread, too). Wouldn't it be possible to expose that as a first step, and add more functionality later?

Exactly that! 👆🏽 Pretty please 😊

@matthewhorridge
Copy link
Contributor

@matuskalas are you using your own installation of WebProtege?

@matuskalas
Copy link

This is in the works now. We have a project that is funded by BASF to provide a proper Web API and to make WebProtege more extensible.

Really awesome to hear! 🎉🎆

If you would like to have more folks to test or help shape or specifiy the needs, we the EDAM ontology maintainers would be very happy to help. 🙌🏽

@matuskalas
Copy link

@matuskalas are you using your own installation of WebProtege?

Nope, the public server. Which is important for us, as we don't have the capacity to maintain our own.

@etiennecl
Copy link

This is in the works now. We have a project that is funded by BASF to provide a proper Web API and to make WebProtege more extensible.

I will second @matuskalas! I would be happy to help on shaping out the needs or writing some features of the API.

@Gorogora
Copy link

happy to hear that a Web API. @matthewhorridge is there a planned release date?

@matthewhorridge
Copy link
Contributor

Some time early next year for deployment on webprotege.stanford.edu @Gorogora

@Komposten
Copy link

Any update on this?

@rodriguesk
Copy link

rodriguesk commented Jul 7, 2022

@matthewhorridge is the API available in any capacity? If not, is there any idea of an updated timeline? Thanks!

@volodymyrss
Copy link

We also have the same use case: need to use CI/CD to generate ontology doc and publish the validation reference.

By looking in the code I found that it would should be possible to make a key and then use it to download. Then I also found this discussion https://mailman.stanford.edu/pipermail/protege-dev/2020-May/001873.html which seems to confirm this usage.

In my case the key could not be recognized, not sure why. It should be possible to understand - the code is all there.

More importantly, I found that by letting the guest account read a particular project (also done with webprotege-cli), I can download the ontology with a simple GET request and integrate it as I need to. In our case the server is in private network and I do not mind this being unrestricted. Could be some hidden security implications of course due to increased attack surface.

Anyway, the use case is largely solved for us, maybe this approach helps other people too!

@asideras
Copy link

asideras commented Apr 21, 2023

"Are there any updates on this?
Following @volodymyrss's suggestion, I generated an API key using the CLI and associated it with a user. Then, I used this API key to retrieve the project using the code snippet below:

session = requests.Session()
headers = {'Authorization': f'ApiKey {API_KEY}'}
project_url = f"{BASE_URL}/download?project={PROJECT_ID}&format=ttl"
response = session.get(project_url, headers=headers)

However, I got a 403 response and in the WebProtege logs I see the following message:

INFO Received download request from UserId{**guest**} at X for project ProjectId{Y}
INFO Denied download request as the user does not have permission to download this project.

Notice that it says "guest" and not the username that I created the API key for.

Thanks in advance.

@volodymyrss
Copy link

Notice that it says "guest" and not the username that I created the API key for.

Yes, well, I had to let guest account read a particular project (see I explained in my message).
It's not completely ideal, for good for our purposes at least.

@aweissen1
Copy link

Any news concerning the API? I am wondering if there is a description of the API - how to use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement A request for a change that is an enhancement
Projects
None yet
Development

No branches or pull requests