@@ -235,24 +235,30 @@ public ApiResponse transformations(Map options) throws Exception {
235235
236236 public ApiResponse transformation (String transformation , Map options ) throws Exception {
237237 if (options == null ) options = ObjectUtils .emptyMap ();
238- return callApi (HttpMethod .GET , Arrays .asList ("transformations" , transformation ), ObjectUtils .only (options , "next_cursor" , "max_results" ), options );
238+ Map map = ObjectUtils .only (options , "next_cursor" , "max_results" );
239+ map .put ("transformation" , transformation );
240+ return callApi (HttpMethod .GET , Arrays .asList ("transformations" ), map , options );
239241 }
240242
241243 public ApiResponse deleteTransformation (String transformation , Map options ) throws Exception {
242244 if (options == null ) options = ObjectUtils .emptyMap ();
243- return callApi (HttpMethod .DELETE , Arrays .asList ("transformations" , transformation ), ObjectUtils .emptyMap (), options );
245+ Map updates = ObjectUtils .asMap ("transformation" , transformation );
246+ return callApi (HttpMethod .DELETE , Arrays .asList ("transformations" ), updates , options );
244247 }
245248
246249 // updates - currently only supported update are:
247250 // "allowed_for_strict": boolean flag
248251 // "unsafe_update": transformation string
249252 public ApiResponse updateTransformation (String transformation , Map updates , Map options ) throws Exception {
250253 if (options == null ) options = ObjectUtils .emptyMap ();
251- return callApi (HttpMethod .PUT , Arrays .asList ("transformations" , transformation ), updates , options );
254+ updates .put ("transformation" , transformation );
255+ return callApi (HttpMethod .PUT , Arrays .asList ("transformations" ), updates , options );
252256 }
253257
254258 public ApiResponse createTransformation (String name , String definition , Map options ) throws Exception {
255- return callApi (HttpMethod .POST , Arrays .asList ("transformations" , name ), ObjectUtils .asMap ("transformation" , definition ), options );
259+ return callApi (HttpMethod .POST ,
260+ Arrays .asList ("transformations" ),
261+ ObjectUtils .asMap ("transformation" , definition , "name" , name ), options );
256262 }
257263
258264 public ApiResponse uploadPresets (Map options ) throws Exception {
0 commit comments