Skip to content

Latest commit

 

History

History
235 lines (147 loc) · 8.35 KB

EndpointApi.md

File metadata and controls

235 lines (147 loc) · 8.35 KB

theblockchainapi.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

void deleteEndpoint()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. 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="#operation/deployProject">deploy the project. Cost: 0 Credit (Free) (<a href="#section/Pricing">See Pricing)

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.EndpointApi(configuration);

let body:theblockchainapi.EndpointApiDeleteEndpointRequest = {
  // EndpointReference (optional)
  endpointReference: null,
};

apiInstance.deleteEndpoint(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
endpointReference EndpointReference

Return type

void

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEndpoint

Endpoint getEndpoint()

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

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.EndpointApi(configuration);

let body:theblockchainapi.EndpointApiGetEndpointRequest = {
  // EndpointReference (optional)
  endpointReference: null,
};

apiInstance.getEndpoint(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
endpointReference EndpointReference

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listEndpoints

Array listEndpoints()

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

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.EndpointApi(configuration);

let body:any = {};

apiInstance.listEndpoints(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

Array

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setEndpoint

Endpoint setEndpoint()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. 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="#operation/deployProject">deploy the project. 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="#section/Pricing">See Pricing)

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.EndpointApi(configuration);

let body:theblockchainapi.EndpointApiSetEndpointRequest = {
  // Endpoint (optional)
  endpoint: null,
};

apiInstance.setEndpoint(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
endpoint Endpoint

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]