FINERACT-1724: Preparation for versioned APIs
This commit is contained in:
committed by
Arnold Gálovics
parent
190d995628
commit
037f7f264f
+6
-6
@@ -53,7 +53,7 @@ public interface DocumentsApiFixed {
|
||||
* @return Call<PostEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("{entityType}/{entityId}/documents")
|
||||
@POST("v1/{entityType}/{entityId}/documents")
|
||||
Call<PostEntityTypeEntityIdDocumentsResponse> createDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Part okhttp3.MultipartBody.Part file,
|
||||
@retrofit2.http.Part("name") String name, @retrofit2.http.Part("description") String description);
|
||||
@@ -69,7 +69,7 @@ public interface DocumentsApiFixed {
|
||||
* documentId (required)
|
||||
* @return Call<DeleteEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@DELETE("{entityType}/{entityId}/documents/{documentId}")
|
||||
@DELETE("v1/{entityType}/{entityId}/documents/{documentId}")
|
||||
Call<DeleteEntityTypeEntityIdDocumentsResponse> deleteDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId);
|
||||
|
||||
@@ -85,7 +85,7 @@ public interface DocumentsApiFixed {
|
||||
* documentId (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@GET("{entityType}/{entityId}/documents/{documentId}/attachment")
|
||||
@GET("v1/{entityType}/{entityId}/documents/{documentId}/attachment")
|
||||
Call<ResponseBody> downloadFile(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Path("documentId") Long documentId);
|
||||
|
||||
@@ -101,7 +101,7 @@ public interface DocumentsApiFixed {
|
||||
* documentId (required)
|
||||
* @return Call<GetEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@GET("{entityType}/{entityId}/documents/{documentId}")
|
||||
@GET("v1/{entityType}/{entityId}/documents/{documentId}")
|
||||
Call<GetEntityTypeEntityIdDocumentsResponse> getDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId);
|
||||
|
||||
@@ -115,7 +115,7 @@ public interface DocumentsApiFixed {
|
||||
* entityId (required)
|
||||
* @return Call<List<GetEntityTypeEntityIdDocumentsResponse>>
|
||||
*/
|
||||
@GET("{entityType}/{entityId}/documents")
|
||||
@GET("v1/{entityType}/{entityId}/documents")
|
||||
Call<List<GetEntityTypeEntityIdDocumentsResponse>> retrieveAllDocuments(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId);
|
||||
|
||||
@@ -138,7 +138,7 @@ public interface DocumentsApiFixed {
|
||||
* @return Call<PutEntityTypeEntityIdDocumentsResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@PUT("{entityType}/{entityId}/documents/{documentId}")
|
||||
@PUT("v1/{entityType}/{entityId}/documents/{documentId}")
|
||||
Call<PutEntityTypeEntityIdDocumentsResponse> updateDocument(@retrofit2.http.Path("entityType") String entityType,
|
||||
@retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId,
|
||||
@retrofit2.http.Part okhttp3.MultipartBody.Part file, @retrofit2.http.Part("name") String name,
|
||||
|
||||
@@ -36,21 +36,21 @@ import retrofit2.http.PUT;
|
||||
*/
|
||||
public interface ImagesApi {
|
||||
|
||||
@POST("{entityType}/{entityId}/images")
|
||||
@POST("v1/{entityType}/{entityId}/images")
|
||||
@retrofit2.http.Multipart
|
||||
Call<Void> create(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Part okhttp3.MultipartBody.Part file);
|
||||
|
||||
@GET("{entityType}/{entityId}/images")
|
||||
@GET("v1/{entityType}/{entityId}/images")
|
||||
Call<ResponseBody> get(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Query("maxWidth") Integer maxWidth, @retrofit2.http.Query("maxHeight") Integer maxHeight,
|
||||
@retrofit2.http.Query("output") String output);
|
||||
|
||||
@PUT("{entityType}/{entityId}/images")
|
||||
@PUT("v1/{entityType}/{entityId}/images")
|
||||
@retrofit2.http.Multipart
|
||||
Call<Void> update(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId,
|
||||
@retrofit2.http.Part okhttp3.MultipartBody.Part file);
|
||||
|
||||
@DELETE("{entityType}/{entityId}/images")
|
||||
@DELETE("v1/{entityType}/{entityId}/images")
|
||||
Call<Void> delete(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId);
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,14 +51,14 @@ public interface RunReportsApi {
|
||||
* isSelfServiceUserReport (optional, default to false)
|
||||
* @return Call<GetReportNameResponse>
|
||||
*/
|
||||
@GET("runreports/{reportName}")
|
||||
@GET("v1/runreports/{reportName}")
|
||||
Call<RunReportsResponse> runReportGetData(@retrofit2.http.Path("reportName") String reportName,
|
||||
@QueryMap Map<String, String> parameters, @retrofit2.http.Query("isSelfServiceUserReport") Boolean isSelfServiceUserReport);
|
||||
|
||||
/**
|
||||
* Run Report which returns a response such as a PDF, CSV, XLS or XSLX file.
|
||||
*/
|
||||
@GET("runreports/{reportName}")
|
||||
@GET("v1/runreports/{reportName}")
|
||||
Call<ResponseBody> runReportGetFile(@retrofit2.http.Path("reportName") String reportName, @QueryMap Map<String, String> parameters,
|
||||
@retrofit2.http.Query("isSelfServiceUserReport") Boolean isSelfServiceUserReport);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user