Commit 6d141a3b authored by Matija Obreza's avatar Matija Obreza

Execution API uses name, not id

parent cdc5a8d6
......@@ -388,24 +388,24 @@ public class GenesysClient {
return query("/kpi/execution/list");
}
public String getExecution(long id) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query("/kpi/execution/" + id);
public String getExecution(String name) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query("/kpi/execution/" + name);
}
public String putExecution(ObjectNode node) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/kpi/execution", null, node.toString());
}
public String kpiExecute(long id) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/kpi/execution/" + id + "/execute", null, null);
public String kpiExecute(String name) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/kpi/execution/" + name + "/execute", null, null);
}
public String deleteDimension(long id) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.DELETE, "/kpi/dimension/" + id, null, null);
}
public String deleteExecution(long id) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.DELETE, "/kpi/execution/" + id, null, null);
public String deleteExecution(String name) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.DELETE, "/kpi/execution/" + name, null, null);
}
public String deleteParameter(String name) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
......@@ -465,14 +465,15 @@ public class GenesysClient {
public String getOrganizationBlurp(String slug, String language) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query("/org/" + slug + "/blurp/" + language);
}
public String updateOrganizationBlurp(String slug, ObjectNode blurp) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.PUT, "/org/"+ slug+"/blurp", null, blurp.toString());
return query(Verb.PUT, "/org/" + slug + "/blurp", null, blurp.toString());
}
public String listObservations(String parameterName, String dimensionFilter, int page) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
public String listObservations(String executionName, String dimensionFilter, int page) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
Map<String, String> qs = new HashMap<String, String>();
qs.put("page", String.valueOf(page));
return query(Verb.POST, "/kpi/observation/"+ parameterName+"/", qs, StringUtils.defaultIfBlank(dimensionFilter, ""));
return query(Verb.POST, "/kpi/observation/" + executionName + "/", qs, StringUtils.defaultIfBlank(dimensionFilter, ""));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment