Skip to content

Latest commit

 

History

History
672 lines (437 loc) · 25.4 KB

ProjectApi.md

File metadata and controls

672 lines (437 loc) · 25.4 KB

theblockchainapi.ProjectApi

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

Method HTTP request Description
createProject POST /project Create a project
createProjectVersion POST /project/{project_id}/{version} Create a new project version
deleteProject DELETE /project/{project_id} Delete a project
deleteProjectVersion DELETE /project/{project_id}/{version} Delete a project version
getProject GET /project/{project_id} Get a project's metadata
getProjectDeploymentStatus POST /project/{project_id}/deploy/status Get deployment status
getProjectDeploymentURL POST /project/{project_id}/deploy/url Get the deployment URL
getProjectStats GET /project/{project_id}/stats Get a project's stats
listProjects GET /project/list List projects
updateProject POST /project/{project_id} Update a project
updateProjectDocumentation POST /project/{project_id}/{version}/documentation Update the project's documentation

createProject

Project createProject()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. A project is an entire mini-API. When you create a project, this initializes the project in our database and the API documentation for the project. After initialization, you can <a href="#operation/createEndpoint">add endpoints to the documentation and deploy the project's mini-API to our servers. Learn more <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiCreateProjectRequest = {
  // ProjectCreateRequest (optional)
  projectCreateRequest: {
    projectName: "projectName_example",
    projectDescription: "projectDescription_example",
    contactEmail: "contactEmail_example",
    groups: [
      null,
    ],
  },
};

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

Parameters

Name Type Description Notes
projectCreateRequest ProjectCreateRequest

Return type

Project

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]

createProjectVersion

Project createProjectVersion()

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 a new version for the project. The version must be higher than all existing versions. This will duplicate the existing project's latest version and auto-deploy it. To update these endpoints, simply redeploy on this project's versions. When a project is first created, it uses the default "0.0.1" version. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiCreateProjectVersionRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
  // string | The version of the project.
  version: "2",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined
version [string] The version of the project. defaults to undefined

Return type

Project

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]

deleteProject

void deleteProject()

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 a project. This will remove the mini-API entirely from our system. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiDeleteProjectRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined

Return type

void

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: Not defined
  • 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]

deleteProjectVersion

Project deleteProjectVersion()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. Delete a version for the project. There must always be at least one version deployed, so you cannot delete the last remaining version of the project. This will auto-deploy the project and update its documentation, if necessary. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiDeleteProjectVersionRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
  // string | The version of the project.
  version: "2",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined
version [string] The version of the project. defaults to undefined

Return type

Project

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]

getProject

Project getProject()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. Update your project's metadata. None of these parameters are required. Just provide the parameters that you would like to update. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiGetProjectRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined

Return type

Project

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]

getProjectDeploymentStatus

any getProjectDeploymentStatus()

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 the deployment status for the project after uploading the binary. Will be: DEPLOYED or NOT DEPLOYED. After it is DEPLOYED, you can then make requests to your API. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiGetProjectDeploymentStatusRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined

Return type

any

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]

getProjectDeploymentURL

ProjectDeploymentURL getProjectDeploymentURL()

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 the deployment URL for 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiGetProjectDeploymentURLRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
  // InlineObject (optional)
  inlineObject: {
    platform: "Darwin",
  },
};

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

Parameters

Name Type Description Notes
inlineObject InlineObject
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined

Return type

ProjectDeploymentURL

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]

getProjectStats

Array getProjectStats()

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 the usage stats for your mini-API. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiGetProjectStatsRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined

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]

listProjects

Array listProjects()

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 projects associated with 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.ProjectApi(configuration);

let body:any = {};

apiInstance.listProjects(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]

updateProject

Project updateProject()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. Update your project's metadata. None of these parameters are required. Just provide the parameters that you would like to update. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiUpdateProjectRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
  // ProjectCreateRequest (optional)
  projectCreateRequest: {
    projectName: "projectName_example",
    projectDescription: "projectDescription_example",
    contactEmail: "contactEmail_example",
    groups: [
      null,
    ],
  },
};

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

Parameters

Name Type Description Notes
projectCreateRequest ProjectCreateRequest
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined

Return type

Project

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]

updateProjectDocumentation

Project updateProjectDocumentation()

A complete example and walkthrough of the program can be found <a href="https://github.com/BL0CK-X/api-developer-program\" target="_blank">here. Update your project's documentation. Your project's documentation can only represent one version of your API. Thus, when you call this, the current_documentation_version attribute of your project is set to the version supplied in the call. 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.ProjectApi(configuration);

let body:theblockchainapi.ProjectApiUpdateProjectDocumentationRequest = {
  // string | The ID of the project. Created and returned when a project is created.
  projectId: "L3cPm0cJlf5MeDXzGLQJJ4vlzndJCC",
  // string | The version of the project.
  version: "2",
};

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

Parameters

Name Type Description Notes
projectId [string] The ID of the project. Created and returned when a project is created. defaults to undefined
version [string] The version of the project. defaults to undefined

Return type

Project

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]