@Multipart @POST("/files") Observable<File> postFile(@Part("file") TypedFile file);
/** * Extract content from a CSV file into a JSON format using HP Haven on Demand using a token proxy * @param token The authentication token * @param file The bytes of a file containing the data to be extracted. * @return {@link List} of JSON objects stored as a {@link LinkedHashMap} with column names as keys and cell values as values. */ @POST(URL) @Multipart Response extractFromFile(@Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file) throws HodErrorException;
/** * Acquire an unbound token for use with HP Haven OnDemand. This must be combined with user authentication in a * user's browser. * @param apiKey The application API key * @return A response containing an unbound application token * @throws HodErrorException */ @POST("/2/authenticate/unbound") @Multipart Response authenticateUnbound( @Header("apiKey") ApiKey apiKey, @Part(TOKEN_TYPE_PARAMETER) String tokenType ) throws HodErrorException;
@Multipart @PUT("/v1/devices/{deviceID}") Response flashFile(@Path("deviceID") String deviceID, @Part("file") TypedOutput file);
@Multipart @POST(FCConstants.API_ENDPOINT_CARDREADER) public void uploadCardForm(@Header(FCConstants.HEADER_AUTH_ACCESS_TOKEN) String accessToken, @QueryMap Map<String, String> opts, @Part("front") TypedOutput frontFile, Callback<CardReaderUploadConfirmResponse> callback);
@POST("/2/authenticate/developer") @Multipart Response authenticateDeveloper( @Header("apiKey") ApiKey apiKey, @Part("tenant") String tenant, @Part("email") String email ) throws HodErrorException;
@POST("/2/developer/{" + DEVELOPER_UUID_VARIABLE + "}/authentication") @Multipart AddDeveloperAuthenticationResponse addAuthentication( @Header("token") String signature, @Path(DEVELOPER_UUID_VARIABLE) UUID developerUuid, @Part(AUTH_MODE_PART) String mode ) throws HodErrorException;
/** * Query HP Haven OnDemand for documents using query text in a file using the given token * @param token The token to use to authenticate the request * @param file A file containing the query text * @param params Additional parameters to be sent as part of the request * @return A list of documents that match the query text */ @Multipart @POST(URL) Response findRelatedConceptsWithFile( @Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file, @PartMap Map<String, Object> params ) throws HodErrorException; }
/** * Query HP Haven OnDemand for documents using query text in a file using the given token * @param token The token to use to authenticate the request * @param file A file containing the query text * @param params Additional parameters to be sent as part of the request * @return A list of documents that match the query text */ @Multipart @POST(URL) Response queryTextIndexWithFile( @Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file, @PartMap Map<String, Object> params ) throws HodErrorException;
/** * Analyze the sentiment of the given file using the given token * @param token The token to use to authenticate the request * @param file The file containing the text to analyze * @param language The language of the text * @return The sentiment of the response */ @POST(URL) @Multipart Response analyzeSentimentForFile( @Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file, @Part("language") SentimentAnalysisLanguage language ) throws HodErrorException;
/** * Finds similar documents to the text in a file using the given token * @param token The token to use to authenticate the request * @param file A file containing the query text * @param params Additional parameters to be sent as part of the request * @return A list of documents that are similar to the query text */ @Multipart @POST(URL) Response findSimilarDocumentsToFile( @Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file, @PartMap Map<String, Object> params ) throws HodErrorException; }
@POST(URL + V2) @Multipart Response createQueryProfile( @Header(TOKEN_HEADER) AuthenticationToken<?, ?> token, @Path(PROFILE_VARIABLE) String name, @Part(INDEX_PART) String queryManipulationIndex, @PartMap Map<String, Object> params ) throws HodErrorException;
@POST(BASE_PATH + "/{group}/user" + V1) @Multipart Response assignUser( @Header(TOKEN_HEADER) AuthenticationToken<?, ?> token, @Path(USER_STORE_VARIABLE) ResourceIdentifier userStore, @Path("group") String group, @Part("user_uuid") String userUuid ) throws HodErrorException;
@PATCH(METADATA_BASE_PATH + V1) @Multipart Response addUserMetadata( @Header(TOKEN_HEADER) AuthenticationToken<?, ?> token, @Path(USER_STORE_VARIABLE) ResourceIdentifier userStore, @Path(USER_UUID_VARIABLE) UUID userUuid, @Part("metadata") List<Metadata<?>> metadata ) throws HodErrorException;
@POST(BASE_PATH + V1) @Multipart Response create( @Header(TOKEN_HEADER) AuthenticationToken<?, ?> token, @Path(USER_STORE_VARIABLE) ResourceIdentifier userStore, @Part("group_name") String name, @PartMap Map<String, Object> hierarchyParameters ) throws HodErrorException;
@PUT(URL + V1) @Multipart Response updateQueryProfile( @Header(TOKEN_HEADER) AuthenticationToken<?, ?> token, @Path(PROFILE_VARIABLE) ResourceIdentifier queryProfile, @Part(INDEX_PART) String queryManipulationIndex, @PartMap Map<String, Object> params ) throws HodErrorException;
@POST("/2/api/sync/domain/{domain_name}/application/v1") @Multipart StatusResponse create( @Header("token") String signature, @Path("domain_name") String domain, @Part("application_name") String name, @Part("description") String description ) throws HodErrorException;
@PATCH("/2/api/sync/domain/{domain_name}/application/{application_name}/v1") @Multipart StatusResponse update( @Header("token") String signature, @Path("domain_name") String domain, @Path("application_name") String name, @PartMap Map<String, String> parts ) throws HodErrorException;
@POST(BASE_PATH + "/link" + V1) @Multipart Response link( @Header(TOKEN_HEADER) AuthenticationToken<?, ?> token, @Path(USER_STORE_VARIABLE) ResourceIdentifier userStore, @Part("parent_group_name") String parent, @Part("child_group_name") String child ) throws HodErrorException;
@Multipart @POST(FCConstants.API_ENDPOINT_CARDREADER) public void uploadCardForm(@Header(FCConstants.HEADER_AUTH_ACCESS_TOKEN) String accessToken, @QueryMap Map<String, String> opts, @Part("front") TypedOutput frontFile, @Part("back") TypedOutput backFile, Callback<CardReaderUploadConfirmResponse> callback);