Skip to content

Latest commit

History

History
488 lines (385 loc) · 15.5 KB

File metadata and controls

488 lines (385 loc) · 15.5 KB

QueryApi

All URIs are relative to http://localhost

MethodHTTP requestDescription
deleteQueryByProjectAndIdDELETE /projects/{projectId}/queries/{queryId}Delete query by project and ID
getQueriesByProjectGET /projects/{projectId}/queriesGet queries by project
getQueryByProjectAndIdGET /projects/{projectId}/queries/{queryId}Get query by project and ID
getQueryResultsByProjectIdQueryGET /projects/{projectId}/query-resultsGet query results by project and query definition
getQueryResultsByProjectIdQueryIdGET /projects/{projectId}/queries/{queryId}/resultsGet query results by project and query
getQueryResultsByProjectIdQueryPostPOST /projects/{projectId}/query-resultsGet query results by project and query definition via POST
postQueryByProjectPOST /projects/{projectId}/queriesCreate query by project

deleteQueryByProjectAndId

Query deleteQueryByProjectAndId(projectId, queryId)

Delete query by project and ID

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectUUIDqueryId = newUUID(); // UUID | ID of the querytry {
Queryresult = apiInstance.deleteQueryByProjectAndId(projectId, queryId);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#deleteQueryByProjectAndId");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
queryIdUUIDID of the query

Return type

Query

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Ok-
404Not found.-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-

getQueriesByProject

List<Query> getQueriesByProject(projectId, pageAfter, pageBefore, pageSize)

Get queries by project

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectStringpageAfter = "pageAfter_example"; // String | Page afterStringpageBefore = "pageBefore_example"; // String | Page beforeIntegerpageSize = 56; // Integer | Page sizetry {
List<Query> result = apiInstance.getQueriesByProject(projectId, pageAfter, pageBefore, pageSize);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#getQueriesByProject");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
pageAfterStringPage after[optional]
pageBeforeStringPage before[optional]
pageSizeIntegerPage size[optional]

Return type

List<Query>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Ok-
404Not found.-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-

getQueryByProjectAndId

Query getQueryByProjectAndId(projectId, queryId)

Get query by project and ID

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectUUIDqueryId = newUUID(); // UUID | ID of the querytry {
Queryresult = apiInstance.getQueryByProjectAndId(projectId, queryId);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#getQueryByProjectAndId");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
queryIdUUIDID of the query

Return type

Query

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Ok-
404Not found.-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-

getQueryResultsByProjectIdQuery

List<Element> getQueryResultsByProjectIdQuery(projectId, body, commitId)

Get query results by project and query definition

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectQuerybody = newQuery(); // Query | UUIDcommitId = newUUID(); // UUID | ID of the commit - defaults to head of projecttry {
List<Element> result = apiInstance.getQueryResultsByProjectIdQuery(projectId, body, commitId);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#getQueryResultsByProjectIdQuery");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
bodyQuery
commitIdUUIDID of the commit - defaults to head of project[optional]

Return type

List<Element>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/ld+json

HTTP response details

Status codeDescriptionResponse headers
200Ok-
404Not found.-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-

getQueryResultsByProjectIdQueryId

List<Element> getQueryResultsByProjectIdQueryId(projectId, queryId, commitId)

Get query results by project and query

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectUUIDqueryId = newUUID(); // UUID | ID of the queryUUIDcommitId = newUUID(); // UUID | ID of the commit - defaults to head of projecttry {
List<Element> result = apiInstance.getQueryResultsByProjectIdQueryId(projectId, queryId, commitId);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#getQueryResultsByProjectIdQueryId");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
queryIdUUIDID of the query
commitIdUUIDID of the commit - defaults to head of project[optional]

Return type

List<Element>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/ld+json

HTTP response details

Status codeDescriptionResponse headers
200Ok-
404Not found.-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-

getQueryResultsByProjectIdQueryPost

List<Element> getQueryResultsByProjectIdQueryPost(projectId, body, commitId)

Get query results by project and query definition via POST

For compatibility with clients that don't support GET requests with a body

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectQuerybody = newQuery(); // Query | UUIDcommitId = newUUID(); // UUID | ID of the commit - defaults to head of projecttry {
List<Element> result = apiInstance.getQueryResultsByProjectIdQueryPost(projectId, body, commitId);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#getQueryResultsByProjectIdQueryPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
bodyQuery
commitIdUUIDID of the commit - defaults to head of project[optional]

Return type

List<Element>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/ld+json

HTTP response details

Status codeDescriptionResponse headers
200Ok-
404Not found.-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-

postQueryByProject

Query postQueryByProject(projectId, body)

Create query by project

Example

// Import classes:importorg.omg.sysml.ApiClient;
importorg.omg.sysml.ApiException;
importorg.omg.sysml.Configuration;
importorg.omg.sysml.models.*;
importorg.omg.sysml.api.QueryApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");
QueryApiapiInstance = newQueryApi(defaultClient);
UUIDprojectId = newUUID(); // UUID | ID of the projectQuerybody = newQuery(); // Query | try {
Queryresult = apiInstance.postQueryByProject(projectId, body);
System.out.println(result);
} catch (ApiExceptione) {
System.err.println("Exception when calling QueryApi#postQueryByProject");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Parameters

NameTypeDescriptionNotes
projectIdUUIDID of the project
bodyQuery

Return type

Query

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
201Created-
415The requested content type is not acceptable.-
500Internal server error.-
0Unexpected response.-