AdminServiceGraphManagementApi

All URIs are relative to {INTERACTIVE_ENDPOINT}

Method

HTTP request

Description

createDataloadingJob

POST /v1/graph/{graph_id}/dataloading

createGraph

POST /v1/graph

deleteGraph

DELETE /v1/graph/{graph_id}

getGraph

GET /v1/graph/{graph_id}

getGraphStatistic

GET /v1/graph/{graph_id}/statistics

getSchema

GET /v1/graph/{graph_id}/schema

listGraphs

GET /v1/graph

createDataloadingJob

JobResponse createDataloadingJob(graphId, schemaMapping)

Create a dataloading job

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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    String graphId = "graphId_example"; // String | The name of graph to do bulk loading.
    SchemaMapping schemaMapping = new SchemaMapping(); // SchemaMapping | 
    try {
      JobResponse result = apiInstance.createDataloadingJob(graphId, schemaMapping);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#createDataloadingJob");
      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

The name of graph to do bulk loading.

schemaMapping

SchemaMapping

Return type

JobResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

successful operation

-

createGraph

CreateGraphResponse createGraph(createGraphRequest)

Create a new 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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    CreateGraphRequest createGraphRequest = new CreateGraphRequest(); // CreateGraphRequest | 
    try {
      CreateGraphResponse result = apiInstance.createGraph(createGraphRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#createGraph");
      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

createGraphRequest

CreateGraphRequest

Return type

CreateGraphResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

successful operation

-

400

BadRequest

-

500

Internal error

-

deleteGraph

String deleteGraph(graphId)

Delete a graph by name

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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    String graphId = "graphId_example"; // String | The name of graph to delete
    try {
      String result = apiInstance.deleteGraph(graphId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#deleteGraph");
      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

The name of graph to delete

Return type

String

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

Successful operation

-

404

Not Found

-

500

Internal Error

-

getGraph

GetGraphResponse getGraph(graphId)

Get a graph by name

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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    String graphId = "graphId_example"; // String | The name of graph to get
    try {
      GetGraphResponse result = apiInstance.getGraph(graphId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#getGraph");
      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

The name of graph to get

Return type

GetGraphResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

Successful operation

-

404

Not found

-

getGraphStatistic

GetGraphStatisticsResponse getGraphStatistic(graphId)

Get the statics info of a graph, including number of vertices for each label, number of edges for each label.

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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    String graphId = "graphId_example"; // String | The id of graph to get statistics
    try {
      GetGraphStatisticsResponse result = apiInstance.getGraphStatistic(graphId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#getGraphStatistic");
      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

The id of graph to get statistics

Return type

GetGraphStatisticsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

successful operation

-

500

Server Internal Error

-

404

Not Found

-

503

Service Unavailable

-

getSchema

GetGraphSchemaResponse getSchema(graphId)

Get schema by graph name

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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    String graphId = "graphId_example"; // String | The name of graph to delete
    try {
      GetGraphSchemaResponse result = apiInstance.getSchema(graphId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#getSchema");
      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

The name of graph to delete

Return type

GetGraphSchemaResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

successful operation

-

listGraphs

List<GetGraphResponse> listGraphs()

List all graphs

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.AdminServiceGraphManagementApi;

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

    AdminServiceGraphManagementApi apiInstance = new AdminServiceGraphManagementApi(defaultClient);
    try {
      List<GetGraphResponse> result = apiInstance.listGraphs();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminServiceGraphManagementApi#listGraphs");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

List<GetGraphResponse>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

Successful operation

-