/** * Resource for working with patient independent features of {@link org.phenotips.data.permissions.Visibility}. * * @version $Id: 8ad903420649e549629b012eccb942add63a0eaf $ * @since 1.3M2 */ @Path("/permissions/visibility") @Relation("https://phenotips.org/rel/visibilityOptions") @ParentResource(RootResource.class) public interface VisibilityOptionsResource { /** * The system has several predefined options of visibility levels. * * @return all the enabled visibility levels present in the system */ @GET @Produces(MediaType.APPLICATION_JSON) VisibilityOptionsRepresentation getVisibilityOptions(); }
/** * Resource for working with patient independent features of {@link org.phenotips.data.permissions.Visibility}. * * @version $Id: 8ad903420649e549629b012eccb942add63a0eaf $ * @since 1.3M2 */ @Path("/permissions/visibility") @Relation("https://phenotips.org/rel/visibilityOptions") @ParentResource(RootResource.class) public interface VisibilityOptionsResource { /** * The system has several predefined options of visibility levels. * * @return all the enabled visibility levels present in the system */ @GET @Produces(MediaType.APPLICATION_JSON) VisibilityOptionsRepresentation getVisibilityOptions(); }
/** * Resource for working with multiple patient records, identified by their given "external" or "internal" identifiers. * * @version $Id: ccdab503b8f003c5ee0d6bf4cb203c207947e204 $ * @since 1.3M5 */ @Path("/patients/fetch") @Relation("https://phenotips.org/rel/patientRecords") @ParentResource(PatientsResource.class) public interface PatientsFetchResource { /** * Retrieve multiple patient records, identified by their given "external" or "internal" identifiers, in their JSON * representation. If any of the indicated patient records don't exist, or if the user sending the request doesn't * have the right to view any of the target patient records, they are excluded from the search results. * * @return JSON representations of the requested patients, or a status message in case of error */ @GET @Produces(MediaType.APPLICATION_JSON) Response fetchPatients(); }
/** * Resource for resolving multiple vocabulary terms from any valid vocabulary, given a list of their identifiers. Each * identifier must have a valid vocabulary prefix of format {@code <vocabulary prefix>:<term id>} (e.g. HP:0000526). * * @version $Id: add3f33cdcd5490f33a74ea94dc1a57cd452ee0f $ * @since 1.4 */ @Path("/vocabularies/terms/fetch") @Relation("https://phenotips.org/rel/vocabularyTerm") @ParentResource(VocabulariesResource.class) public interface VocabularyTermsResolveResource { /** * Retrieves a JSON representation of the {@link org.phenotips.vocabulary.VocabularyTerm} objects by resolving the * term identifiers using their prefix. The terms that cannot be resolved are ignored. The following request * parameters are used: * * <dl> * <dt>term-id</dt> * <dd>a list of term IDs that should be resolved</dd> * </dl> * * @return the requested terms that were resolved successfully */ @GET @Produces(MediaType.APPLICATION_JSON) Response resolveTerms(); }
/** * Resource for searching in a category for terms matching an input (vocabulary suggest). * * @version $Id: 4fb33572a148793ec311d9ad0385ee423e34ed23 $ * @since 1.4 */ @Path("/vocabularies/categories/{category}/suggest") @ParentResource(CategoryResource.class) @Relation("https://phenotips.org/rel/categoryTermSuggest") public interface CategoryTermSuggestionsResource { /** * Provides term suggestions for the specified vocabulary category as a {@link Response}. Request can optionally * specify the maximum number of results to return. If no suggestions are found, {@link Response} will not contain * any terms. * * @param category The name of the vocabulary category to be used for suggestions. If no matching category is found, * an error is returned to the user * @param input The string which will be used to generate suggestions * @param maxResults The maximum number of results to be returned; default is 10 * @return A {@link Response} object representing a list of {@link VocabularyTerm term} suggestions. */ @GET @Produces(MediaType.APPLICATION_JSON) Response suggest( @PathParam("category") String category, @QueryParam("input") String input, @QueryParam("maxResults") @DefaultValue("10") int maxResults); }
@Relation("https://phenotips.org/rel/suggest") public interface VocabularyTermSuggestionsResource
/** * Root resource for working with vocabularies, listing all the available vocabularies. * * @version $Id: 2b17918bfdefb172e1434c11c9fdaaf2f9a52ff0 $ * @since 1.3M1 */ @Unstable("New API introduced in 1.3") @Path("/vocabularies") @ParentResource(RootResource.class) @Relation("https://phenotips.org/rel/vocabularies") public interface VocabulariesResource { /** * Entry resource for the Vocabularies RESTful API, provides a list of available vocabulary resources. * * @return a {@link Vocabularies} resource representing all the vocabularies that are currently available */ @GET @Produces(MediaType.APPLICATION_JSON) Vocabularies getAllVocabularies(); }
/** * Root resource for working with vocabularies, listing all the available vocabularies. * * @version $Id: 2b17918bfdefb172e1434c11c9fdaaf2f9a52ff0 $ * @since 1.3M1 */ @Unstable("New API introduced in 1.3") @Path("/vocabularies") @ParentResource(RootResource.class) @Relation("https://phenotips.org/rel/vocabularies") public interface VocabulariesResource { /** * Entry resource for the Vocabularies RESTful API, provides a list of available vocabulary resources. * * @return a {@link Vocabularies} resource representing all the vocabularies that are currently available */ @GET @Produces(MediaType.APPLICATION_JSON) Vocabularies getAllVocabularies(); }
/** * Resource for working with vocabulary categories, listing all the available categories. * * @version $Id: d1b1dcf54d44457aac1d18774f48880f4c691dca $ * @since 1.4 */ @Unstable("New API introduced in 1.4") @Path("/vocabularies/categories") @ParentResource(VocabulariesResource.class) @Relation("https://phenotips.org/rel/categories") public interface CategoriesResource { /** * Provides a list of all available vocabulary categories. * * @return a {@link Categories} resource representing all the vocabulary categories that are currently available */ @GET @Produces(MediaType.APPLICATION_JSON) Categories getAllCategories(); }
/** * Root resource for working with users and groups of users. * * @version $Id: 5dc8764417fab526415213a72c123a5c3d0acfc4 $ * @since 1.4 */ @Unstable("New API introduced in 1.4") @Path("/principals") @ParentResource(RootResource.class) @Relation("https://phenotips.org/rel/principals") public interface PrincipalsResource { /** * Entry resource for the principals RESTful API, provides a list of available principals (users or groups) as JSON. * If no suggestions are found, an empty list is returned. * * @return a JSON object containing all results found */ @GET @Produces(MediaType.APPLICATION_JSON) Response getAllUsersAndGroups(); }
/** * Resource for working with individual {@link org.phenotips.vocabulary.VocabularyTerm} when the containing vocabulary * is not known. * * @version $Id: 9e20e412397f820d66b0cad76eee6cb182565732 $ * @since 1.3M2 */ @Unstable("New API introduced in 1.3") @Path("/vocabularies/terms/{term-id}") @ParentResource(VocabularyResource.class) @Relation("https://phenotips.org/rel/vocabularyTerm") public interface VocabularyTermResolveResource { /** * Retrieves a JSON representation of the {@link org.phenotips.vocabulary.VocabularyTerm} by resolving the term * using its prefix. * * @param termId the term identifier, in the format {@code <vocabulary prefix>:<term id>}, for example * {@code HP:0002066} * @return the requested term, or an error if the term could not be resolved */ @GET @Produces(MediaType.APPLICATION_JSON) Response resolveTerm(@PathParam("term-id") String termId); }
/** * A resource for working with an individual category that contains one or more * {@link org.phenotips.vocabulary.Vocabulary} objects. * * @version $Id: e8a66e8396071aa9d09445c1320eefabc75dd5d5 $ * @since 1.4 */ @Unstable("New API introduced in 1.4") @Path("/vocabularies/categories/{category}") @ParentResource(CategoriesResource.class) @Relation("https://phenotips.org/rel/category") public interface CategoryResource { /** * Retrieves the resource used for working with the specified category. * * @param categoryName the vocabulary category name, for example {@code phenotype} * @return a {@link Category} representation */ @GET @Produces(MediaType.APPLICATION_JSON) Category getCategory(@PathParam("category") String categoryName); }
/** * Resource for retrieving information about principals that have access to the entity record, in bulk, where entity is * identified by entity record's internal PhenoTips identifier. * * @version $Id: d091512065e1dd8f6423997b92b5cc2d30d97142 $ * @since 1.4 */ @Unstable("New API introduced in 1.4") @Role @Path("/{entity-type}/{entity-id}/permissions/principals") @Relation("https://phenotips.org/rel/principals") @ParentResource(PermissionsResource.class) public interface PrincipalsResource { /** * Retrieve information about users or groups that have any access to the entity record. If the indicated entity * record doesn't exist, or if the user sending the request doesn't have the right to view the target entity record, * an error is returned. * * @param entityType the type of entity (either "patients" or "families") * @param entityId internal identifier of a entity record * @return REST representation of a collection of principals */ @GET @Produces(MediaType.APPLICATION_JSON) @RequiredAccess("view") PrincipalsRepresentation getPrincipals(@PathParam("entity-type") String entityType, @PathParam("entity-id") String entityId); }
/** * Resource for working with individual {@link org.phenotips.vocabulary.VocabularyTerm} when the containing vocabulary * is not known. * * @version $Id: 9e20e412397f820d66b0cad76eee6cb182565732 $ * @since 1.3M2 */ @Unstable("New API introduced in 1.3") @Path("/vocabularies/terms/{term-id}") @ParentResource(VocabularyResource.class) @Relation("https://phenotips.org/rel/vocabularyTerm") public interface VocabularyTermResolveResource { /** * Retrieves a JSON representation of the {@link org.phenotips.vocabulary.VocabularyTerm} by resolving the term * using its prefix. * * @param termId the term identifier, in the format {@code <vocabulary prefix>:<term id>}, for example * {@code HP:0002066} * @return the requested term, or an error if the term could not be resolved */ @GET @Produces(MediaType.APPLICATION_JSON) Response resolveTerm(@PathParam("term-id") String termId); }
/** * Resource for working with individual {@link org.phenotips.vocabulary.VocabularyTerm}. * * @version $Id: ed35f6162061d709a710fb7546cd471787a0e633 $ * @since 1.3M1 */ @Unstable("New API introduced in 1.3") @Path("/vocabularies/{vocabulary-id}/{term-id}") @ParentResource(VocabularyResource.class) @Relation("https://phenotips.org/rel/vocabularyTerm") public interface VocabularyTermResource { /** * Retrieves a JSON representation of the {@link org.phenotips.vocabulary.VocabularyTerm} by searching the specified * vocabulary. * * @param vocabularyId the vocabulary identifier, which is also used as a prefix in every term identifier from that * vocabulary, for example {@code HP} or {@code MIM} * @param termId the term identifier, in the format {@code <vocabulary prefix>:<term id>}, for example * {@code HP:0002066} * @return the requested term, or an error if the term doesn't exist in this vocabulary */ @GET @Produces(MediaType.APPLICATION_JSON) Response getTerm(@PathParam("vocabulary-id") String vocabularyId, @PathParam("term-id") String termId); }
/** * Resource for working with individual {@link org.phenotips.vocabulary.VocabularyTerm}. * * @version $Id: ed35f6162061d709a710fb7546cd471787a0e633 $ * @since 1.3M1 */ @Unstable("New API introduced in 1.3") @Path("/vocabularies/{vocabulary-id}/{term-id}") @ParentResource(VocabularyResource.class) @Relation("https://phenotips.org/rel/vocabularyTerm") public interface VocabularyTermResource { /** * Retrieves a JSON representation of the {@link org.phenotips.vocabulary.VocabularyTerm} by searching the specified * vocabulary. * * @param vocabularyId the vocabulary identifier, which is also used as a prefix in every term identifier from that * vocabulary, for example {@code HP} or {@code MIM} * @param termId the term identifier, in the format {@code <vocabulary prefix>:<term id>}, for example * {@code HP:0002066} * @return the requested term, or an error if the term doesn't exist in this vocabulary */ @GET @Produces(MediaType.APPLICATION_JSON) Response getTerm(@PathParam("vocabulary-id") String vocabularyId, @PathParam("term-id") String termId); }
/** * Resource for for fetching multiple vocabulary terms from a specified vocabulary, given a list of identifiers. * * @version $Id: 01352b5c82ab8b6e460eac1ff68275e73342af4f $ * @since 1.4 */ @Unstable("New API introduced in 1.4") @Path("/vocabularies/{vocabulary-id}/fetch") @ParentResource(VocabularyResource.class) @Relation("https://phenotips.org/rel/vocabularyTerm") public interface VocabularyTermsResource { /** * Retrieves a JSON representation of the {@link org.phenotips.vocabulary.VocabularyTerm} objects by searching the * specified vocabulary. The following request parameters are used: * * <dl> * <dt>term-id</dt> * <dd>a list of term IDs that should be retrieved</dd> * </dl> * * @param vocabularyId the vocabulary identifier, which is also used as a prefix in every term identifier from that * vocabulary, for example {@code HP} or {@code MIM} * @return the requested terms, excepting those that do not exist in the specified vocabulary */ @GET @Produces(MediaType.APPLICATION_JSON) Response getTerms(@Nonnull @PathParam("vocabulary-id") String vocabularyId); }
@Relation("https://phenotips.org/rel/genePanelsPatient") @ParentResource(PatientResource.class) public interface GenePanelsPatientResource
@Path("/vocabularies/{vocabulary-id}") @ParentResource(VocabulariesResource.class) @Relation("https://phenotips.org/rel/vocabulary") public interface VocabularyResource
@Path("/vocabularies/{vocabulary-id}") @ParentResource(VocabulariesResource.class) @Relation("https://phenotips.org/rel/vocabulary") public interface VocabularyResource