public interface HostedFilesApi
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<GuidVersionHolder> |
createFile(FileMetadata fileMetadata)
Create a new file resource
Create a new file resource (this is just the metadata, and will need to be followed by the creation and upload of a FileRevision object).
|
retrofit2.Call<FileRevision> |
createFileRevision(String guid,
FileRevision fileRevision)
Create a new file resource revision.
|
retrofit2.Call<Message> |
deleteFile(String guid,
Boolean physical)
Delete file resource (and all revisions)
Delete an existing file resource (and all its revisions, if the delete is physical).
|
retrofit2.Call<Message> |
finishFileRevision(String guid,
DateTime createdOn)
Indicate to the server that a file revision upload has been completed.
|
retrofit2.Call<FileMetadata> |
getFile(String guid)
Get a file resource
Get a file resource for this app.
|
retrofit2.Call<FileRevision> |
getFileRevision(String guid,
DateTime createdOn)
Get a single file revision of a file.
|
retrofit2.Call<FileRevisionList> |
getFileRevisions(String guid,
Integer offsetBy,
Integer pageSize)
Get the revision history of a file resource
Get the paginated revision history of a file resource.
|
retrofit2.Call<FileMetadataList> |
getFiles(Integer offsetBy,
Integer pageSize,
Boolean includeDeleted)
Get a list of static files
Get all the files of a specific type for this app.
|
retrofit2.Call<GuidVersionHolder> |
updateFile(String guid,
FileMetadata file)
Update an existing file resource
Update an existing file resource.
|
@Headers(value="Content-Type:application/json") @POST(value="v3/files") retrofit2.Call<GuidVersionHolder> createFile(@Body FileMetadata fileMetadata)
fileMetadata
- New file (required)@Headers(value="Content-Type:application/json") @POST(value="v3/files/{guid}/revisions") retrofit2.Call<FileRevision> createFileRevision(@Path(value="guid") String guid, @Body FileRevision fileRevision)
guid
- A guid (required)fileRevision
- New file revision (required)@Headers(value="Content-Type:application/json") @DELETE(value="v3/files/{guid}") retrofit2.Call<Message> deleteFile(@Path(value="guid") String guid, @Query(value="physical") Boolean physical)
guid
- A guid (required)physical
- Physically delete this resource? (administrators only; this is always false for developers) (optional, default to false)@Headers(value="Content-Type:application/json") @POST(value="v3/files/{guid}/revisions/{createdOn}") retrofit2.Call<Message> finishFileRevision(@Path(value="guid") String guid, @Path(value="createdOn") DateTime createdOn)
guid
- A guid (required)createdOn
- Created on timestamp (ISO 8601) (required)@Headers(value="Content-Type:application/json") @GET(value="v3/files/{guid}") retrofit2.Call<FileMetadata> getFile(@Path(value="guid") String guid)
guid
- A guid (required)@Headers(value="Content-Type:application/json") @GET(value="v3/files/{guid}/revisions/{createdOn}") retrofit2.Call<FileRevision> getFileRevision(@Path(value="guid") String guid, @Path(value="createdOn") DateTime createdOn)
guid
- A guid (required)createdOn
- Created on timestamp (ISO 8601) (required)@Headers(value="Content-Type:application/json") @GET(value="v3/files/{guid}/revisions") retrofit2.Call<FileRevisionList> getFileRevisions(@Path(value="guid") String guid, @Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize)
guid
- A guid (required)offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)@Headers(value="Content-Type:application/json") @GET(value="v3/files") retrofit2.Call<FileMetadataList> getFiles(@Query(value="offsetBy") Integer offsetBy, @Query(value="pageSize") Integer pageSize, @Query(value="includeDeleted") Boolean includeDeleted)
offsetBy
- next page start offset for pagination (optional, default to 0)pageSize
- maximum number of records in each returned page (optional, default to 50)includeDeleted
- Should deleted items be returned in results? (optional, default to false)@Headers(value="Content-Type:application/json") @POST(value="v3/files/{guid}") retrofit2.Call<GuidVersionHolder> updateFile(@Path(value="guid") String guid, @Body FileMetadata file)
guid
- A guid (required)file
- Updated file (required)Copyright © 2023 Sage Bionetworks. All rights reserved.