public interface UploadsApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<UploadValidationStatus> |
completeUploadSession(String uploadId,
Boolean synchronous,
Boolean redrive)
Notify Bridge an upload is complete
Notify Bridge an upload is complete.
|
retrofit2.Call<Upload> |
getUploadById(String uploadId)
Get an upload by ID
|
retrofit2.Call<Upload> |
getUploadByRecordId(String recordId)
Get an upload record by the health data record ID
A superadmin or worker can retrieve any upload in any app.
|
retrofit2.Call<UploadViewEx3> |
getUploadEx3(String uploadId,
Boolean fetchTimeline)
API to get an upload for Exporter 3.0, optionally with timeline metadata.
|
retrofit2.Call<UploadViewEx3> |
getUploadEx3ForStudy(String studyId,
String uploadId,
Boolean fetchTimeline,
Boolean fetchAdherence)
API to get an upload in a study for Exporter 3.0, optionally with timeline metadata and adherence records.
|
retrofit2.Call<UploadViewEx3> |
getUploadEx3ForStudyForWorker(String appId,
String studyId,
String uploadId,
Boolean fetchTimeline,
Boolean fetchAdherence)
Worker API to get an upload in a study for Exporter 3.0, optionally with timeline metadata and adherence records.
|
retrofit2.Call<UploadViewEx3> |
getUploadEx3ForWorker(String appId,
String uploadId,
Boolean fetchTimeline)
Worker API to get an upload for Exporter 3.0, optionally with timeline metadata.
|
retrofit2.Call<UploadList> |
getUploads(DateTime startTime,
DateTime endTime,
Integer pageSize,
String offsetKey)
Get uploads for the app
|
retrofit2.Call<UploadValidationStatus> |
getUploadStatus(String uploadId)
Get status of a single upload attempt
Caller must either be a participant getting a status of one of the participant's own uploads, or a reearcher.
|
retrofit2.Call<UploadSession> |
requestUploadSession(UploadRequest uploadRequest)
Request an upload session
|
@Headers(value="Content-Type:application/json") @POST(value="v3/uploads/{uploadId}/complete") retrofit2.Call<UploadValidationStatus> completeUploadSession(@Path(value="uploadId") String uploadId, @Query(value="synchronous") Boolean synchronous, @Query(value="redrive") Boolean redrive)
uploadId
- Upload ID (required)synchronous
- True if this API call should wait for upload validation to finish before returning. (optional, default to false)redrive
- True if this API call should allow completing uploads that are already complete. This is to allow redrives and backfills. (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v3/uploads/{uploadId}") retrofit2.Call<Upload> getUploadById(@Path(value="uploadId") String uploadId)
uploadId
- Upload ID (required)@Headers(value="Content-Type:application/json") @GET(value="v3/uploads/recordId:{recordId}") retrofit2.Call<Upload> getUploadByRecordId(@Path(value="recordId") String recordId)
recordId
- Health data record ID (required)@Headers(value="Content-Type:application/json") @GET(value="v3/uploads/{uploadId}/exporter3") retrofit2.Call<UploadViewEx3> getUploadEx3(@Path(value="uploadId") String uploadId, @Query(value="fetchTimeline") Boolean fetchTimeline)
uploadId
- Upload ID (required)fetchTimeline
- True if this API should fetch timeline metadata corresponding to this upload (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v5/studies/{studyId}/uploads/{uploadId}/exporter3") retrofit2.Call<UploadViewEx3> getUploadEx3ForStudy(@Path(value="studyId") String studyId, @Path(value="uploadId") String uploadId, @Query(value="fetchTimeline") Boolean fetchTimeline, @Query(value="fetchAdherence") Boolean fetchAdherence)
studyId
- Study identifier (required)uploadId
- Upload ID (required)fetchTimeline
- True if this API should fetch timeline metadata corresponding to this upload (optional, default to false)fetchAdherence
- True if this API should fetch adherence records corresponding to this upload (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v1/apps/{appId}/studies/{studyId}/uploads/{uploadId}/exporter3") retrofit2.Call<UploadViewEx3> getUploadEx3ForStudyForWorker(@Path(value="appId") String appId, @Path(value="studyId") String studyId, @Path(value="uploadId") String uploadId, @Query(value="fetchTimeline") Boolean fetchTimeline, @Query(value="fetchAdherence") Boolean fetchAdherence)
appId
- App ID (required)studyId
- Study identifier (required)uploadId
- Upload ID (required)fetchTimeline
- True if this API should fetch timeline metadata corresponding to this upload (optional, default to false)fetchAdherence
- True if this API should fetch adherence records corresponding to this upload (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v1/apps/{appId}/uploads/{uploadId}/exporter3") retrofit2.Call<UploadViewEx3> getUploadEx3ForWorker(@Path(value="appId") String appId, @Path(value="uploadId") String uploadId, @Query(value="fetchTimeline") Boolean fetchTimeline)
appId
- App ID (required)uploadId
- Upload ID (required)fetchTimeline
- True if this API should fetch timeline metadata corresponding to this upload (optional, default to false)@Headers(value="Content-Type:application/json") @GET(value="v3/uploadstatuses/{uploadId}") retrofit2.Call<UploadValidationStatus> getUploadStatus(@Path(value="uploadId") String uploadId)
uploadId
- Upload ID (required)@Headers(value="Content-Type:application/json") @GET(value="v1/apps/self/uploads") retrofit2.Call<UploadList> getUploads(@Query(value="startTime") DateTime startTime, @Query(value="endTime") DateTime endTime, @Query(value="pageSize") Integer pageSize, @Query(value="offsetKey") String offsetKey)
startTime
- (required)endTime
- (required)pageSize
- maximum number of records in each returned page (optional, default to 50)offsetKey
- next page start key for pagination (optional)@Headers(value="Content-Type:application/json") @POST(value="v3/uploads") retrofit2.Call<UploadSession> requestUploadSession(@Body UploadRequest uploadRequest)
uploadRequest
- An upload request (required)Copyright © 2023 Sage Bionetworks. All rights reserved.