Giter Site home page Giter Site logo

cedar-resource-server's Introduction

cedar-resource-server

Build Status

Server to support handling of all CEDAR resources

Questions

If you have questions about this repository, please subscribe to the CEDAR Developer Support mailing list. After subscribing, send messages to cedar-developers at lists.stanford.edu.

cedar-resource-server's People

Contributors

egyedia avatar johardi avatar marcosmro avatar martinjoconnor avatar yancao77 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jheinnic

cedar-resource-server's Issues

Regenerate index

Implement endpoint to regenerate the Elasticsearch index if necessary. Zero downtime is required

Resource server throwing error if saving twice really quickly

Steps to reproduce:

  • Go to "Populate" page
  • Click the "Save" button twice with the speed of a double-click
  • The second save will fail, throwing the following error:

Status: 500, Internal Server Error
URL: https://resource.metadatacenter.orgx/templates/https%3A%2F%2Frepo.metadatacenter.orgx%2Ftemplates%2Fbe2146e2-b327-4f7f-bb5c-f9774f6ab78d
Method: PUT

Message: Failed to remove resource https://repo.metadatacenter.orgx/templates/be2146e2-b327-4f7f-bb5c-f9774f6ab78d from the index
Exception: java.io.IOException: Failed to remove resource https://repo.metadatacenter.orgx/templates/be2146e2-b327-4f7f-bb5c-f9774f6ab78d from the index

org.metadatacenter.cedar.resource.search.elasticsearch.ElasticsearchService.removeFromIndex(ElasticsearchService.java:125)
org.metadatacenter.cedar.resource.search.SearchService.removeResourceFromIndex(SearchService.java:67)
org.metadatacenter.cedar.resource.search.SearchService.updateIndexedResource(SearchService.java:84)
org.metadatacenter.cedar.resource.search.SearchService.updateIndexedResource(SearchService.java:92)
controllers.AbstractResourceServerController.executeResourcePutByProxy(AbstractResourceServerController.java:438)
controllers.TemplateServerController.updateTemplate(TemplateServerController.java:56)<br
...

Return n-quads from additional REST calls

Currently, only the template instance calls return n-quads as a possible response type.

Would be nice to support this serialization all other calls that returns template and elements instances (e.g., search).

Consistent use of Accept/ContentType headers

Ensure that we are consistently using the Accept and Content Type headers.

The templates, elements and field will be application/json and perhaps application/schema+json; the instances will be application/json and application/ld+json and application/n-quads.

Indicate artifact visibility for artifact info calls

Info calls for artifacts list a variety of related resources (e.g., version history, instances, derived from etc.) and give a brief summary of each resource.

Currently, the call does not indicate that a particular resource may not be accessible by the user that made the REST call. Need a consistent means to indicate this.

Bulk upload

Upload multiple resources in a single action, using a single file. This would be particularly useful to upload multiple instances of a template

Incorrect REST content type for n-quad response type

When calling the REST endpoints to get an RDF n-quad serialization of a resource we incorrectly use the application application/json content type instead of the application/n-quads type.

An example call that exhibits this behaviour:

GET /template-instances/{template_instance_id}

Internal server on invalid /validate body

Validate route returns 500 on bad POST body.

e.g.,

curl -X POST --data-binary @bad_file.json --header "Authorization: apiKey AKEY" --header 'Accept: application/json' 'https://resource.staging.metadatacenter.org/command/validate?resource_type=element'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.