QueryServiceApi

All URIs are relative to {INTERACTIVE_ENDPOINT}

Method

HTTP request

Description

procCall

POST /v1/graph/{graph_id}/query

run queries on graph

procCallCurrent

POST /v1/graph/current/query

run queries on the running graph

procCall

byte[] procCall(graphId, xInteractiveRequestFormat, body)

run queries on graph

After the procedure is created, user can use this API to run the procedure. TODO: a full example cypher->plan->json. TODO: make sure typeinfo can be passed.

Example

// Import classes:
import com.alibaba.graphscope.interactive.ApiClient;
import com.alibaba.graphscope.interactive.ApiException;
import com.alibaba.graphscope.interactive.Configuration;
import com.alibaba.graphscope.interactive.models.*;
import com.alibaba.graphscope.interactive.api.QueryServiceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("{INTERACTIVE_ENDPOINT}");

    QueryServiceApi apiInstance = new QueryServiceApi(defaultClient);
    String graphId = "graphId_example"; // String | 
    String xInteractiveRequestFormat = "proto"; // String | 
    byte[] body = null; // byte[] | 
    try {
      byte[] result = apiInstance.procCall(graphId, xInteractiveRequestFormat, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling QueryServiceApi#procCall");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name

Type

Description

Notes

graphId

String

xInteractiveRequestFormat

String

[enum: proto, encoder, json]

body

byte[]

[optional]

Return type

byte[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: text/plain

  • Accept: text/plain

HTTP response details

Status code

Description

Response headers

200

Successfully runned. Empty if failed?

-

500

Server internal error

-

procCallCurrent

byte[] procCallCurrent(xInteractiveRequestFormat, body)

run queries on the running graph

Submit a query to the running graph.

Example

// Import classes:
import com.alibaba.graphscope.interactive.ApiClient;
import com.alibaba.graphscope.interactive.ApiException;
import com.alibaba.graphscope.interactive.Configuration;
import com.alibaba.graphscope.interactive.models.*;
import com.alibaba.graphscope.interactive.api.QueryServiceApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("{INTERACTIVE_ENDPOINT}");

    QueryServiceApi apiInstance = new QueryServiceApi(defaultClient);
    String xInteractiveRequestFormat = "proto"; // String | 
    byte[] body = null; // byte[] | 
    try {
      byte[] result = apiInstance.procCallCurrent(xInteractiveRequestFormat, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling QueryServiceApi#procCallCurrent");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name

Type

Description

Notes

xInteractiveRequestFormat

String

[enum: proto, encoder, json]

body

byte[]

[optional]

Return type

byte[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: text/plain

  • Accept: text/plain

HTTP response details

Status code

Description

Response headers

200

Successfully runned. Empty if failed?

-

500

Server internal error

-