package lu.circl.mispbump.interfaces; import java.util.List; import lu.circl.mispbump.models.restModels.MispOrganisation; import lu.circl.mispbump.models.restModels.MispRole; import lu.circl.mispbump.models.restModels.MispServer; import lu.circl.mispbump.models.restModels.MispUser; import lu.circl.mispbump.models.restModels.Organisation; import lu.circl.mispbump.models.restModels.Server; import lu.circl.mispbump.models.restModels.User; import lu.circl.mispbump.models.restModels.Version; import retrofit2.Call; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.POST; import retrofit2.http.Path; /** * RetroFit2 interface for communication with misp instances */ public interface MispService { // settings routes @GET("servers/getPyMISPVersion") Call pyMispVersion(); @GET("admin/roles") Call> getRoles(); // user routes @GET("users/view/me") Call getMyUserInformation(); @GET("users/view/{value}") Call getUser(@Path("value") int userId); @GET("admin/users") Call> getAllUsers(); @POST("admin/users/add") Call addUser(@Body User user); // organisation routes @GET("organisations/view/{value}") Call getOrganisation(@Path("value") int orgId); @GET("organisations") Call> getAllOrganisations(); @POST("admin/organisations/add") Call addOrganisation(@Body Organisation organisation); // server routes @GET("servers/index") Call> getAllServers(); @POST("servers/add") Call addServer(@Body Server server); }