Skip to content

Latest commit

 

History

History
319 lines (248 loc) · 13.3 KB

EndpointApi.md

File metadata and controls

319 lines (248 loc) · 13.3 KB

EndpointApi

All URIs are relative to https://api.blockchainapi.com/v1

Method HTTP request Description
deleteEndpoint POST /endpoint/delete Delete an endpoint
getEndpoint POST /endpoint/metadata Get an endpoint's metadata
listEndpoints GET /endpoint/list List all endpoints
setEndpoint POST /endpoint Create / update an endpoint

deleteEndpoint

deleteEndpoint(endpointReference)

Delete an endpoint

A complete example and walkthrough of the program can be found <a href=&quot;https://github.com/BL0CK-X/api-developer-program\" target=&quot;_blank&quot;>here</a>. Deletes an endpoint from a project. This endpoint removes the endpoint from the project's documentation. However, this does un-deploy the endpoint. To do so, you must <a href=&quot;#operation/deployProject&quot;>deploy the project</a>. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EndpointApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    EndpointApi apiInstance = new EndpointApi(defaultClient);
    EndpointReference endpointReference = new EndpointReference(); // EndpointReference | 
    try {
      apiInstance.deleteEndpoint(endpointReference);
    } catch (ApiException e) {
      System.err.println("Exception when calling EndpointApi#deleteEndpoint");
      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
endpointReference EndpointReference [optional]

Return type

null (empty response body)

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response. -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -

getEndpoint

Endpoint getEndpoint(endpointReference)

Get an endpoint's metadata

A complete example and walkthrough of the program can be found <a href=&quot;https://github.com/BL0CK-X/api-developer-program\" target=&quot;_blank&quot;>here</a>. Get an endpoint's metadata from a project. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EndpointApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    EndpointApi apiInstance = new EndpointApi(defaultClient);
    EndpointReference endpointReference = new EndpointReference(); // EndpointReference | 
    try {
      Endpoint result = apiInstance.getEndpoint(endpointReference);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling EndpointApi#getEndpoint");
      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
endpointReference EndpointReference [optional]

Return type

Endpoint

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response. -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -

listEndpoints

List<Endpoint> listEndpoints()

List all endpoints

A complete example and walkthrough of the program can be found <a href=&quot;https://github.com/BL0CK-X/api-developer-program\" target=&quot;_blank&quot;>here</a>. List all endpoints that you have added under your account. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EndpointApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    EndpointApi apiInstance = new EndpointApi(defaultClient);
    try {
      List<Endpoint> result = apiInstance.listEndpoints();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling EndpointApi#listEndpoints");
      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<Endpoint>

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response. -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -

setEndpoint

Endpoint setEndpoint(endpoint)

Create / update an endpoint

A complete example and walkthrough of the program can be found <a href=&quot;https://github.com/BL0CK-X/api-developer-program\" target=&quot;_blank&quot;>here</a>. Create or update an `endpoint` for a `project`. An `endpoint` is a function that is a part of a mini-API `project`. This endpoint adds the `endpoint` to the `project`'s documentation. However, this does not deploy the `endpoint`. To do so, you must <a href=&quot;#operation/deployProject&quot;>deploy the project</a>. All attributes except `group_name` are required if creating an `endpoint`. Only `path`, `project_id`, and `version` are required if updating an `endpoint`. `Cost: 0 Credit` (Free) (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EndpointApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    EndpointApi apiInstance = new EndpointApi(defaultClient);
    Endpoint endpoint = new Endpoint(); // Endpoint | 
    try {
      Endpoint result = apiInstance.setEndpoint(endpoint);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling EndpointApi#setEndpoint");
      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
endpoint Endpoint [optional]

Return type

Endpoint

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response. -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -