@Path(value="/samples") public class SampleResource extends RestResource
API_KEY_CLIENT_ID, API_KEY_TOKEN, API_KEY_USER, apiClientId, apiToken, apiUser, AUTHENTICATION_PARAM_NAME, hmacHeader, querySessionId, REMOTE_USER_ID, REMOTE_USER_TOKEN, remoteUserId, remoteUserToken, request, sessionId, WOR_PARTNER_TOKEN, worPartnerToken
Constructor and Description |
---|
SampleResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addRequest(SampleRequest request) |
javax.ws.rs.core.Response |
deleteSampleRequest(long requestId) |
javax.ws.rs.core.Response |
getRequestFile(String sid,
ArrayList<Long> requestIds) |
javax.ws.rs.core.Response |
getRequests(int offset,
int limit,
String sort,
boolean asc,
String filter,
SampleRequestStatus status) |
javax.ws.rs.core.Response |
getSampleByToken(String token) |
javax.ws.rs.core.Response |
getUserRequests(int offset,
int limit,
String sort,
boolean asc,
long uid,
SampleRequestStatus status) |
javax.ws.rs.core.Response |
setRequestStatus(SampleRequestStatus status,
ArrayList<Long> requestIds)
Sets the status of sample requests.
|
javax.ws.rs.core.Response |
updateSampleRequest(long requestId,
SampleRequestStatus status) |
addHeaders, getThisServer, getUserId, getUserId, getWebPartner, log, requireUserId, requireUserIdOrWebPartner, requireWebPartner, respond, respond, respond, respond
@GET @Produces(value="application/json") @Path(value="{token}") public javax.ws.rs.core.Response getSampleByToken(@PathParam(value="token") String token)
@GET @Produces(value="application/json") @Path(value="/requests") public javax.ws.rs.core.Response getRequests(@DefaultValue(value="0") @QueryParam(value="offset") int offset, @DefaultValue(value="15") @QueryParam(value="limit") int limit, @DefaultValue(value="requested") @QueryParam(value="sort") String sort, @DefaultValue(value="false") @QueryParam(value="asc") boolean asc, @QueryParam(value="filter") String filter, @QueryParam(value="status") SampleRequestStatus status)
@PUT @Path(value="/requests") public javax.ws.rs.core.Response setRequestStatus(@QueryParam(value="status") SampleRequestStatus status, ArrayList<Long> requestIds)
@POST @Path(value="/requests/file") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response getRequestFile(@QueryParam(value="sid") String sid, ArrayList<Long> requestIds)
@DELETE @Path(value="/requests/{id}") public javax.ws.rs.core.Response deleteSampleRequest(@PathParam(value="id") long requestId)
@PUT @Path(value="/requests/{id}") public javax.ws.rs.core.Response updateSampleRequest(@PathParam(value="id") long requestId, @QueryParam(value="status") SampleRequestStatus status)
@GET @Produces(value="application/json") @Path(value="/requests/{userId}") public javax.ws.rs.core.Response getUserRequests(@DefaultValue(value="0") @QueryParam(value="offset") int offset, @DefaultValue(value="15") @QueryParam(value="limit") int limit, @DefaultValue(value="requested") @QueryParam(value="sort") String sort, @DefaultValue(value="false") @QueryParam(value="asc") boolean asc, @PathParam(value="userId") long uid, @DefaultValue(value="IN_CART") @QueryParam(value="status") SampleRequestStatus status)
@POST @Produces(value="application/json") @Path(value="/requests") public javax.ws.rs.core.Response addRequest(SampleRequest request)
Copyright © 2017. All rights reserved.