IBM Bluemix OpenWhisk

Introduction

IBM Bluemix OpenWhisk is a distributed compute service that executes application logic in response to requests from web or mobile apps. You can set up specific actions to occur based on HTTP-based API requests from web apps or mobile apps, and from event-based requests from services like Cloudant. Bluemix OpenWhisk runs your code snippets on demand or automatically in response to events.

Base URL
https://openwhisk.ng.bluemix.net/api/v1

Reference

Get all namespaces for authenticated user

Get all namespaces for authenticated user

GET
/namespaces
Request

No Request Parameters

This endpoint does not accept any request parameters.

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

No Response Details

This endpoint does not specify any response properties.

Status 200

"OBJECT"

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get all entites in a namespace

Get all entites in a namespace

GET
/namespaces/{namespace}
Request

Path Parameters

  • The namespace

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • All entites

  • All entites

  • All entites

  • All entites

Status 200

{
  "packages": "ARRAY",
  "triggers": "ARRAY",
  "actions": "ARRAY",
  "rules": "ARRAY"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get all actions

Get all actions

GET
/namespaces/{namespace}/actions
Request

Path Parameters

  • The entity namespace

Query Parameters

  • Number of entities to include in the result.

  • Number of entities to skip in the result.

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/actions?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/actions?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the item

  • Whether to publish the item or not

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "name": "STRING",
  "publish": "BOOLEAN",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Delete an action

Delete an action

DELETE
/namespaces/{namespace}/actions/{actionName}
Request

Path Parameters

  • Name of action

  • The entity namespace

Example Request

HttpResponse<String> response = Unirest.delete("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D",
  "method": "DELETE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("DELETE", "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request DELETE \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

No Response Details

This endpoint does not specify any response properties.

Status 200

"OBJECT"

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get action information

Get action information.

GET
/namespaces/{namespace}/actions/{actionName}
Request

Path Parameters

  • Name of action to fetch

  • The entity namespace

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Returned action

    • Returned action

    • Returned action

  • Name of the item

  • Returned action

    • container image name when kind is 'blackbox'

    • optional zipfile reference when code kind is 'nodejs'

    • Javascript or Swift code to execute when kind is 'nodejs' or 'swift'

    • the type of action

      Possible values: nodejs, blackbox, swift

  • Whether to publish the item or not

  • annotations on the item

    • Any JSON value

    • annotations on the item

  • parameter bindings included in the context passed to the action

    • Any JSON value

    • parameter bindings included in the context passed to the action

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "limits": {
    "timeout": "INTEGER",
    "memory": "INTEGER"
  },
  "name": "STRING",
  "exec": {
    "image": "STRING",
    "init": "STRING",
    "code": "STRING",
    "kind": "STRING"
  },
  "publish": "BOOLEAN",
  "annotations": {
    "value": "OBJECT",
    "key": "STRING"
  },
  "parameters": {
    "value": "OBJECT",
    "key": "STRING"
  },
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Invoke an action

Invoke an action

POST
/namespaces/{namespace}/actions/{actionName}
Request

Path Parameters

  • Name of action

  • The entity namespace

Query Parameters

  • Blocking or non-blocking invocation. Default is non-blocking.

    Possible values: true, false

Request Body

  • The parameters for the action being invoked

Example Request

HttpResponse<String> response = Unirest.post("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?blocking=SOME_STRING_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?blocking=SOME_STRING_VALUE",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?blocking=SOME_STRING_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("POST", "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?blocking=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request POST \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?blocking=SOME_STRING_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Activation

    • Exit status of the activation

    • The return value from the activation

  • Time when the activation began

  • Logs generated by the activation

  • The subject that activated the item

  • Name of the item

  • Whether to publish the item or not

  • Id of the activation

  • Time when the activation completed

  • Namespace of the associated item

  • Semantic version of the item

Status 200

{
  "result": {
    "status": "STRING",
    "value": "OBJECT"
  },
  "start": "STRING",
  "logs": "STRING",
  "subject": "STRING",
  "name": "STRING",
  "publish": "BOOLEAN",
  "activationId": "STRING",
  "end": "STRING",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 408

"OBJECT"

Status 500

{
  "error": "STRING"
}

Create or update an action

Create or update an action

PUT
/namespaces/{namespace}/actions/{actionName}
Request

Path Parameters

  • Name of action

  • The entity namespace

Query Parameters

  • Overwrite item if it exists. Default is false.

    Possible values: true, false

Request Body

  • The action being updated

    • The action being updated

    • The action being updated

  • The action being updated

    • container image name when kind is 'blackbox'

    • optional zipfile reference when code kind is 'nodejs'

    • Javascript or Swift code to execute when kind is 'nodejs' or 'swift'

    • the type of action

      Possible values: nodejs, blackbox, swift

  • Whether to publish the item or not

  • annotations on the item

    • Any JSON value

    • annotations on the item

  • parameter bindings included in the context passed to the action

    • Any JSON value

    • parameter bindings included in the context passed to the action

  • Semantic version of the item

Example Request

HttpResponse<String> response = Unirest.put("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?overwrite=SOME_STRING_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?overwrite=SOME_STRING_VALUE",
  "method": "PUT",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?overwrite=SOME_STRING_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("PUT", "/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?overwrite=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request PUT \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/actions/%7BactionName%7D?overwrite=SOME_STRING_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Updated Item

Status 200

{
  "id": "STRING"
}

Status 400

{
  "error": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 409

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get activation ids

Get activation ids.

GET
/namespaces/{namespace}/activations
Request

Path Parameters

  • The entity namespace

Query Parameters

  • Whether to include full entity description.

  • Number of entities to include in the result.

  • Name of item

  • Only include entities later than this timestamp (measured in milliseconds since Thu, 01 Jan 1970)

  • Number of entities to skip in the result.

  • Only include entities earlier than this timestamp (measured in milliseconds since Thu, 01 Jan 1970)

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations?docs=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&upto=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&since=SOME_INTEGER_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations?docs=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&upto=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&since=SOME_INTEGER_VALUE",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/activations?docs=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&upto=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&since=SOME_INTEGER_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/activations?docs=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&upto=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&since=SOME_INTEGER_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations?docs=SOME_BOOLEAN_VALUE&name=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE&upto=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&since=SOME_INTEGER_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the item

  • Whether to publish the item or not

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "name": "STRING",
  "publish": "BOOLEAN",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get activation information

Get activation information.

GET
/namespaces/{namespace}/activations/{activationid}
Request

Path Parameters

  • Name of activation to fetch

  • The entity namespace

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Return output

    • Exit status of the activation

    • The return value from the activation

  • Time when the activation began

  • Logs generated by the activation

  • The subject that activated the item

  • Name of the item

  • Whether to publish the item or not

  • Id of the activation

  • Time when the activation completed

  • Namespace of the associated item

  • Semantic version of the item

Status 200

{
  "result": {
    "status": "STRING",
    "value": "OBJECT"
  },
  "start": "STRING",
  "logs": "STRING",
  "subject": "STRING",
  "name": "STRING",
  "publish": "BOOLEAN",
  "activationId": "STRING",
  "end": "STRING",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get the logs for an activation

Get activation logs information.

GET
/namespaces/{namespace}/activations/{activationid}/logs
Request

Path Parameters

  • Name of activation to fetch

  • The entity namespace

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/logs")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/logs",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/logs",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/logs", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/logs \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Interleaved standard output and error of an activation

Status 200

{
  "logs": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get the result of an activation

Get activation result.

GET
/namespaces/{namespace}/activations/{activationid}/result
Request

Path Parameters

  • Name of activation to fetch

  • The entity namespace

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/result")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/result",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/result",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/result", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/activations/%7Bactivationid%7D/result \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Exit status of the activation

Status 200

{
  "status": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get all packages

Get all packages

GET
/namespaces/{namespace}/packages
Request

Path Parameters

  • The entity namespace

Query Parameters

  • Number of entities to include in the result.

  • Include publicly shared entitles in the result.

  • Number of entities to skip in the result.

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&public=SOME_BOOLEAN_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&public=SOME_BOOLEAN_VALUE",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/packages?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&public=SOME_BOOLEAN_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/packages?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&public=SOME_BOOLEAN_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE&public=SOME_BOOLEAN_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the item

  • Whether to publish the item or not

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "name": "STRING",
  "publish": "BOOLEAN",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Delete a package

Delete a package

DELETE
/namespaces/{namespace}/packages/{packageName}
Request

Path Parameters

  • The entity namespace

  • Name of package

Example Request

HttpResponse<String> response = Unirest.delete("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D",
  "method": "DELETE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("DELETE", "/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request DELETE \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

No Response Details

This endpoint does not specify any response properties.

Status 200

"OBJECT"

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get package information

Get package information.

GET
/namespaces/{namespace}/packages/{packageName}
Request

Path Parameters

  • The entity namespace

  • Name of package to fetch

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the item

  • Returned package

    • Name of the item

    • Namespace of the item

  • Whether to publish the item or not

  • annotations on the item

    • Any JSON value

    • annotations on the item

  • parameter for the package

    • Any JSON value

    • parameter for the package

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "name": "STRING",
  "binding": {
    "name": "STRING",
    "namespace": "STRING"
  },
  "publish": "BOOLEAN",
  "annotations": {
    "value": "OBJECT",
    "key": "STRING"
  },
  "parameters": {
    "value": "OBJECT",
    "key": "STRING"
  },
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Create or update a package

Create or update a package

PUT
/namespaces/{namespace}/packages/{packageName}
Request

Path Parameters

  • The entity namespace

  • Name of package

Query Parameters

  • Overwrite item if it exists. Default is false.

    Possible values: true, false

Request Body

  • The package being updated

    • Name of the item

    • Namespace of the item

  • Whether to publish the item or not

  • annotations on the item

    • Any JSON value

    • annotations on the item

  • parameter for the package

    • Any JSON value

    • parameter for the package

  • Semantic version of the item

Example Request

HttpResponse<String> response = Unirest.put("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D?overwrite=SOME_STRING_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D?overwrite=SOME_STRING_VALUE",
  "method": "PUT",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D?overwrite=SOME_STRING_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("PUT", "/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D?overwrite=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request PUT \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/packages/%7BpackageName%7D?overwrite=SOME_STRING_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Updated Item

Status 200

{
  "id": "STRING"
}

Status 400

{
  "error": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 409

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get all rules

Get all rules

GET
/namespaces/{namespace}/rules
Request

Path Parameters

  • The entity namespace

Query Parameters

  • Number of entities to include in the result.

  • Number of entities to skip in the result.

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/rules?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/rules?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the item

  • Whether to publish the item or not

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "name": "STRING",
  "publish": "BOOLEAN",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Delete a rule

Delete a rule

DELETE
/namespaces/{namespace}/rules/{ruleName}
Request

Path Parameters

  • The entity namespace

  • Name of rule to delete

Example Request

HttpResponse<String> response = Unirest.delete("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D",
  "method": "DELETE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("DELETE", "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request DELETE \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

No Response Details

This endpoint does not specify any response properties.

Status 200

"OBJECT"

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get rule information

Get rule information

GET
/namespaces/{namespace}/rules/{ruleName}
Request

Path Parameters

  • The entity namespace

  • Name of rule to fetch

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the trigger

  • Status of a rule

    Possible values: active, inactive, activating, deactivating

  • Name of the item

  • Name of the action

  • Whether to publish the item or not

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "trigger": "STRING",
  "status": "STRING",
  "name": "STRING",
  "action": "STRING",
  "publish": "BOOLEAN",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Enable or disable a rule

Enable or disable a rule

POST
/namespaces/{namespace}/rules/{ruleName}
Request

Path Parameters

  • The entity namespace

  • Name of rule to update

Query Parameters

  • Set state to enable or disable

    Possible values: disabled, enabled

Example Request

HttpResponse<String> response = Unirest.post("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?state=SOME_STRING_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?state=SOME_STRING_VALUE",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?state=SOME_STRING_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("POST", "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?state=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request POST \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?state=SOME_STRING_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Updated Item

Status 200

{
  "id": "STRING"
}

Status 202

"OBJECT"

Status 400

{
  "error": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Update a rule

Update a rule

PUT
/namespaces/{namespace}/rules/{ruleName}
Request

Path Parameters

  • The entity namespace

  • Name of rule to update

Query Parameters

  • Overwrite item if it exists. Default is false.

    Possible values: true, false

Request Body

  • Name of the trigger

  • Name of the action

  • Whether to publish the item or not

  • Semantic version of the item

Example Request

HttpResponse<String> response = Unirest.put("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?overwrite=SOME_STRING_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?overwrite=SOME_STRING_VALUE",
  "method": "PUT",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?overwrite=SOME_STRING_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("PUT", "/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?overwrite=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request PUT \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/rules/%7BruleName%7D?overwrite=SOME_STRING_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Updated Item

Status 200

{
  "id": "STRING"
}

Status 400

{
  "error": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 409

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get all triggers

Get all triggers

GET
/namespaces/{namespace}/triggers
Request

Path Parameters

  • The entity namespace

Query Parameters

  • Number of entities to include in the result.

  • Number of entities to skip in the result.

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/triggers?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/triggers?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers?limit=SOME_INTEGER_VALUE&skip=SOME_INTEGER_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Name of the item

  • Whether to publish the item or not

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "name": "STRING",
  "publish": "BOOLEAN",
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Delete a trigger

Delete a trigger

DELETE
/namespaces/{namespace}/triggers/{triggerName}
Request

Path Parameters

  • The entity namespace

  • Name of trigger to delete

Example Request

HttpResponse<String> response = Unirest.delete("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D",
  "method": "DELETE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("DELETE", "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request DELETE \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

No Response Details

This endpoint does not specify any response properties.

Status 200

"OBJECT"

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Get trigger information

Get trigger information

GET
/namespaces/{namespace}/triggers/{triggerName}
Request

Path Parameters

  • The entity namespace

  • Name of trigger to fetch

Example Request

HttpResponse<String> response = Unirest.get("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D",
  "method": "GET",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("GET", "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request GET \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Returned trigger

  • Name of the item

  • Whether to publish the item or not

  • annotations on the item

    • Any JSON value

    • annotations on the item

  • parameter bindings for the trigger

    • Any JSON value

    • parameter bindings for the trigger

  • Namespace of the item

  • Semantic version of the item

Status 200

{
  "limits": "undefined",
  "name": "STRING",
  "publish": "BOOLEAN",
  "annotations": {
    "value": "OBJECT",
    "key": "STRING"
  },
  "parameters": {
    "value": "OBJECT",
    "key": "STRING"
  },
  "namespace": "STRING",
  "version": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}

Fire a trigger

Fire a trigger

POST
/namespaces/{namespace}/triggers/{triggerName}
Request

Path Parameters

  • The entity namespace

  • Name of trigger being fired

Request Body

  • The trigger payload

Example Request

HttpResponse<String> response = Unirest.post("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D",
  "method": "POST",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("POST", "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request POST \
  --url https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Activation id

Status 200

{
  "id": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 404

{
  "error": "STRING"
}

Status 408

"OBJECT"

Status 500

{
  "error": "STRING"
}

Update a trigger

Update a trigger

PUT
/namespaces/{namespace}/triggers/{triggerName}
Request

Path Parameters

  • The entity namespace

  • Name of trigger to update

Query Parameters

  • Overwrite item if it exists. Default is false.

    Possible values: true, false

Request Body

  • The trigger being updated

  • Whether to publish the item or not

  • annotations on the item

    • Any JSON value

    • annotations on the item

  • parameter bindings included in the context passed to the trigger

    • Any JSON value

    • parameter bindings included in the context passed to the trigger

  • Semantic version of the item

Example Request

HttpResponse<String> response = Unirest.put("https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D?overwrite=SOME_STRING_VALUE")
  .header("accept", "application/json")
  .header("content-type", "application/json")
  .asString();
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D?overwrite=SOME_STRING_VALUE",
  "method": "PUT",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
}

$.ajax(settings).done(function (response) {
  console.log(response);
});
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.ibm.com",
  "port": null,
  "path": "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D?overwrite=SOME_STRING_VALUE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.ibm.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("PUT", "/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D?overwrite=SOME_STRING_VALUE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
curl --request PUT \
  --url 'https://api.ibm.com/api/v1/namespaces/%7Bnamespace%7D/triggers/%7BtriggerName%7D?overwrite=SOME_STRING_VALUE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'
Response

Response Body

  • Updated Item

Status 200

{
  "id": "STRING"
}

Status 400

{
  "error": "STRING"
}

Status 401

{
  "error": "STRING"
}

Status 409

{
  "error": "STRING"
}

Status 500

{
  "error": "STRING"
}