Skip to content

Latest commit

 

History

History
698 lines (441 loc) · 17.1 KB

JStackTemplateApi.md

File metadata and controls

698 lines (441 loc) · 17.1 KB

KodingApi.JStackTemplateApi

All URIs are relative to https://koding.com/remote.api

Method HTTP request Description
build POST /JStackTemplate.build/{id}
callDelete POST /JStackTemplate.delete/{id}
clone POST /JStackTemplate.clone/{id}
create POST /JStackTemplate.create
forceStacksToReinit POST /JStackTemplate.forceStacksToReinit/{id}
generateStack POST /JStackTemplate.generateStack/{id}
hasStacks POST /JStackTemplate.hasStacks/{id}
one POST /JStackTemplate.one
samples POST /JStackTemplate.samples
setAccess POST /JStackTemplate.setAccess/{id}
some POST /JStackTemplate.some
update POST /JStackTemplate.update/{id}
verify POST /JStackTemplate.verify/{id}

build

DefaultResponse build(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.build(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

callDelete

DefaultResponse callDelete(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.callDelete(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

clone

DefaultResponse clone(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.clone(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

create

JStackTemplate create(body)

creates a JStackTemplate with requested content

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var body = new KodingApi.Body2(); // Body2 | body of the request

apiInstance.create(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
body Body2 body of the request

Return type

JStackTemplate

Authorization

Bearer

HTTP request headers

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

forceStacksToReinit

DefaultResponse forceStacksToReinit(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.forceStacksToReinit(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

generateStack

DefaultResponse generateStack(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.generateStack(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

hasStacks

DefaultResponse hasStacks(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.hasStacks(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

one

DefaultResponse one(body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.one(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

samples

InlineResponse200 samples(body)

returns sample stack template for given provider

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var body = new KodingApi.Body3(); // Body3 | body of the request

apiInstance.samples(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
body Body3 body of the request

Return type

InlineResponse200

Authorization

Bearer

HTTP request headers

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

setAccess

DefaultResponse setAccess(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.setAccess(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

some

DefaultResponse some(body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.some(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

update

DefaultResponse update(id, body)

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.update(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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

verify

DefaultResponse verify(id, body)

Method JStackTemplate.verify

Example

var KodingApi = require('koding-api');
var defaultClient = KodingApi.ApiClient.default;

// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

var apiInstance = new KodingApi.JStackTemplateApi();

var id = "id_example"; // String | Mongo ID of target instance

var body = new KodingApi.DefaultSelector(); // DefaultSelector | body of the request

apiInstance.verify(id, body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Mongo ID of target instance
body DefaultSelector body of the request

Return type

DefaultResponse

Authorization

Bearer

HTTP request headers

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