d.openwhisk.client.0.3.source-code.apiv1swagger.json Maven / Gradle / Ivy
{
"swagger": "2.0",
"info": {
"title": "OpenWhisk REST API",
"description": "API for OpenWhisk",
"version": "0.1.0"
},
"produces": [
"application/json"
],
"basePath": "/api/v1",
"tags": [
{
"name": "Actions"
},
{
"name": "Rules"
},
{
"name": "Triggers"
},
{
"name": "Activations"
},
{
"name": "Packages"
},
{
"name": "Namespaces"
}
],
"paths": {
"/namespaces": {
"get": {
"tags": [
"Namespaces"
],
"description": "Get all namespaces for authenticated user",
"summary": "Get all namespaces for authenticated user",
"operationId": "getAllNamespaces",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Array of namespaces",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/actions": {
"get": {
"tags": [
"Actions"
],
"description": "Get all actions",
"summary": "Get all actions",
"operationId": "getAllActions",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to include in the result (0-200). The default limit is 30. A value of 0 sets the limit to the maximum.",
"required": false,
"type": "integer"
},
{
"name": "skip",
"in": "query",
"description": "Number of entities to skip in the result.",
"required": false,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Actions response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityBrief"
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/actions/{actionName}": {
"get": {
"tags": [
"Actions"
],
"summary": "Get action information",
"description": "Get action information.",
"operationId": "getActionByName",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "actionName",
"in": "path",
"description": "Name of action to fetch",
"required": true,
"type": "string"
},
{
"name": "code",
"in": "query",
"description": "Include action code in the result",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned action",
"schema": {
"$ref": "#/definitions/Action"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"put": {
"tags": [
"Actions"
],
"description": "Create or update an action",
"summary": "Create or update an action",
"operationId": "updateAction",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "actionName",
"in": "path",
"description": "Name of action",
"required": true,
"type": "string"
},
{
"name": "overwrite",
"in": "query",
"description": "Overwrite item if it exists. Default is false.",
"required": false,
"type": "boolean"
},
{
"name": "action",
"in": "body",
"description": "The action being updated",
"required": true,
"schema": {
"$ref": "#/definitions/ActionPut"
}
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"$ref": "#/responses/UpdatedItem"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"409": {
"$ref": "#/responses/Conflict"
},
"413": {
"$ref": "#/responses/RequestEntityTooLarge"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"delete": {
"tags": [
"Actions"
],
"description": "Delete an action",
"summary": "Delete an action",
"operationId": "deleteAction",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "actionName",
"in": "path",
"description": "Name of action",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"$ref": "#/responses/DeletedItem"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"post": {
"tags": [
"Actions"
],
"description": "Invoke an action",
"summary": "Invoke an action",
"operationId": "invokeAction",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "actionName",
"in": "path",
"description": "Name of action",
"required": true,
"type": "string"
},
{
"name": "blocking",
"in": "query",
"description": "Blocking or non-blocking invocation. Default is non-blocking.",
"required": false,
"type": "boolean"
},
{
"name": "result",
"in": "query",
"description": "Return only the result of a blocking activation. Default is false.",
"required": false,
"type": "boolean"
},
{
"name": "timeout",
"in": "query",
"description": "Wait no more than specified duration in milliseconds for a blocking response. Default value and max allowed timeout are 60000.",
"required": false,
"type": "integer"
},
{
"name": "payload",
"in": "body",
"description": "The parameters for the action being invoked",
"required": true,
"schema": {
"$ref": "#/definitions/KeyValue"
}
}
],
"responses": {
"200": {
"description": "Successful activation",
"schema": {
"$ref": "#/definitions/Activation"
}
},
"202": {
"$ref": "#/responses/AcceptedActivation"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"408": {
"$ref": "#/responses/Timeout"
},
"500": {
"$ref": "#/responses/ServerError"
},
"502": {
"description": "Activation produced an application error",
"schema": {
"$ref": "#/definitions/Activation"
}
}
}
}
},
"/namespaces/{namespace}/rules": {
"get": {
"tags": [
"Rules"
],
"description": "Get all rules",
"summary": "Get all rules",
"operationId": "getAllRules",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to include in the result (0-200). The default limit is 30. A value of 0 sets the limit to the maximum.",
"required": false,
"type": "integer"
},
{
"name": "skip",
"in": "query",
"description": "Number of entities to skip in the result.",
"required": false,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Rules response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityBrief"
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/rules/{ruleName}": {
"get": {
"tags": [
"Rules"
],
"description": "Get rule information",
"summary": "Get rule information",
"operationId": "getRuleByName",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "ruleName",
"in": "path",
"description": "Name of rule to fetch",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned rule",
"schema": {
"$ref": "#/definitions/Rule"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"put": {
"tags": [
"Rules"
],
"description": "Update a rule",
"summary": "Update a rule",
"operationId": "updateRule",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "ruleName",
"in": "path",
"description": "Name of rule to update",
"required": true,
"type": "string"
},
{
"name": "overwrite",
"in": "query",
"description": "Overwrite item if it exists. Default is false.",
"required": false,
"type": "boolean"
},
{
"name": "rule",
"in": "body",
"description": "The rule being updated",
"required": true,
"schema": {
"$ref": "#/definitions/RulePut"
}
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"$ref": "#/responses/UpdatedItem"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"409": {
"$ref": "#/responses/Conflict"
},
"413": {
"$ref": "#/responses/RequestEntityTooLarge"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"delete": {
"tags": [
"Rules"
],
"description": "Delete a rule",
"summary": "Delete a rule",
"operationId": "deleteRule",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "ruleName",
"in": "path",
"description": "Name of rule to delete",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"$ref": "#/responses/DeletedItem"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"post": {
"tags": [
"Rules"
],
"description": "Enable or disable a rule",
"summary": "Enable or disable a rule",
"operationId": "setState",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "ruleName",
"in": "path",
"description": "Name of rule to update",
"required": true,
"type": "string"
},
{
"name": "state",
"in": "query",
"type": "string",
"description": "Set state to enable or disable",
"required": true,
"enum": [
"disabled",
"enabled"
]
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"$ref": "#/responses/UpdatedItem"
},
"202": {
"$ref": "#/responses/AcceptedRuleStateChange"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/triggers": {
"get": {
"tags": [
"Triggers"
],
"description": "Get all triggers",
"summary": "Get all triggers",
"operationId": "getAllTriggers",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to include in the result (0-200). The default limit is 30. A value of 0 sets the limit to the maximum.",
"required": false,
"type": "integer"
},
{
"name": "skip",
"in": "query",
"description": "Number of entities to skip in the result.",
"required": false,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Triggers response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityBrief"
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/triggers/{triggerName}": {
"get": {
"tags": [
"Triggers"
],
"description": "Get trigger information",
"summary": "Get trigger information",
"operationId": "getTriggerByName",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "triggerName",
"in": "path",
"description": "Name of trigger to fetch",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned trigger",
"schema": {
"$ref": "#/definitions/Trigger"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"put": {
"tags": [
"Triggers"
],
"description": "Update a trigger",
"summary": "Update a trigger",
"operationId": "updateTrigger",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "triggerName",
"in": "path",
"description": "Name of trigger to update",
"required": true,
"type": "string"
},
{
"name": "overwrite",
"in": "query",
"description": "Overwrite item if it exists. Default is false.",
"required": false,
"type": "boolean"
},
{
"name": "trigger",
"in": "body",
"description": "The trigger being updated",
"required": true,
"schema": {
"$ref": "#/definitions/TriggerPut"
}
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"$ref": "#/responses/UpdatedItem"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"409": {
"$ref": "#/responses/Conflict"
},
"413": {
"$ref": "#/responses/RequestEntityTooLarge"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"delete": {
"tags": [
"Triggers"
],
"description": "Delete a trigger",
"summary": "Delete a trigger",
"operationId": "deleteTrigger",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "triggerName",
"in": "path",
"description": "Name of trigger to delete",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"$ref": "#/responses/DeletedItem"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"post": {
"tags": [
"Triggers"
],
"description": "Fire a trigger",
"summary": "Fire a trigger",
"operationId": "fireTrigger",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "triggerName",
"in": "path",
"description": "Name of trigger being fired",
"required": true,
"type": "string"
},
{
"name": "payload",
"in": "body",
"description": "The trigger payload",
"required": true,
"schema": {
"$ref": "#/definitions/KeyValue"
}
}
],
"responses": {
"202": {
"description": "Activation id",
"schema": {
"$ref": "#/definitions/ItemId"
}
},
"204": {
"$ref": "#/responses/NoActiveRules"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"408": {
"$ref": "#/responses/Timeout"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/packages": {
"get": {
"tags": [
"Packages"
],
"description": "Get all packages",
"summary": "Get all packages",
"operationId": "getAlPackages",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "public",
"in": "query",
"description": "Include publicly shared entitles in the result.",
"required": false,
"type": "boolean"
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to include in the result (0-200). The default limit is 30. A value of 0 sets the limit to the maximum.",
"required": false,
"type": "integer"
},
{
"name": "skip",
"in": "query",
"description": "Number of entities to skip in the result.",
"required": false,
"type": "integer"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Packages response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityBrief"
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/packages/{packageName}": {
"get": {
"tags": [
"Packages"
],
"summary": "Get package information",
"description": "Get package information.",
"operationId": "getPackageByName",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "packageName",
"in": "path",
"description": "Name of package to fetch",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Returned package",
"schema": {
"$ref": "#/definitions/Package"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"put": {
"tags": [
"Packages"
],
"description": "Create or update a package",
"summary": "Create or update a package",
"operationId": "updatePackage",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "packageName",
"in": "path",
"description": "Name of package",
"required": true,
"type": "string"
},
{
"name": "overwrite",
"in": "query",
"description": "Overwrite item if it exists. Default is false.",
"required": false,
"type": "boolean"
},
{
"name": "package",
"in": "body",
"description": "The package being updated",
"required": true,
"schema": {
"$ref": "#/definitions/PackagePut"
}
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"$ref": "#/responses/UpdatedItem"
},
"400": {
"$ref": "#/responses/BadRequest"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"409": {
"$ref": "#/responses/Conflict"
},
"413": {
"$ref": "#/responses/RequestEntityTooLarge"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
},
"delete": {
"tags": [
"Packages"
],
"description": "Delete a package",
"summary": "Delete a package",
"operationId": "deletePackage",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "packageName",
"in": "path",
"description": "Name of package",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"$ref": "#/responses/DeletedItem"
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/activations": {
"get": {
"tags": [
"Activations"
],
"summary": "Get activation ids",
"description": "Get activation ids.",
"operationId": "getActivations",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "query",
"description": "Name of item",
"required": false,
"type": "string"
},
{
"name": "limit",
"in": "query",
"description": "Number of entities to include in the result (0-200). The default limit is 30. A value of 0 sets the limit to the maximum.",
"required": false,
"type": "integer"
},
{
"name": "skip",
"in": "query",
"description": "Number of entities to skip in the result.",
"required": false,
"type": "integer"
},
{
"name": "since",
"in": "query",
"description": "Only include entities later than this timestamp (measured in milliseconds since Thu, 01 Jan 1970)",
"required": false,
"type": "integer"
},
{
"name": "upto",
"in": "query",
"description": "Only include entities earlier than this timestamp (measured in milliseconds since Thu, 01 Jan 1970)",
"required": false,
"type": "integer"
},
{
"name": "docs",
"in": "query",
"description": "Whether to include full entity description.",
"required": false,
"type": "boolean"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Activations response",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityBrief"
}
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/activations/{activationid}": {
"get": {
"tags": [
"Activations"
],
"summary": "Get activation information",
"description": "Get activation information.",
"operationId": "getActivationById",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "activationid",
"in": "path",
"description": "Name of activation to fetch",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Return output",
"schema": {
"$ref": "#/definitions/Activation"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/activations/{activationid}/logs": {
"get": {
"tags": [
"Activations"
],
"summary": "Get the logs for an activation",
"description": "Get activation logs information.",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "activationid",
"in": "path",
"description": "Name of activation to fetch",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Return output",
"schema": {
"$ref": "#/definitions/ActivationLogs"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
},
"/namespaces/{namespace}/activations/{activationid}/result": {
"get": {
"tags": [
"Activations"
],
"summary": "Get the result of an activation",
"description": "Get activation result.",
"parameters": [
{
"name": "namespace",
"in": "path",
"description": "The entity namespace",
"required": true,
"type": "string"
},
{
"name": "activationid",
"in": "path",
"description": "Name of activation to fetch",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Return output",
"schema": {
"$ref": "#/definitions/ActivationResponse"
}
},
"401": {
"$ref": "#/responses/UnauthorizedRequest"
},
"404": {
"$ref": "#/responses/ItemNotFound"
},
"500": {
"$ref": "#/responses/ServerError"
}
}
}
}
},
"definitions": {
"KeyValue": {
"additionalProperties": {
"type": "string"
}
},
"ItemId": {
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
},
"ErrorMessage": {
"required": [
"error"
],
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer"
}
}
},
"ActionLimits": {
"description": "Limits on a specific action",
"properties": {
"timeout": {
"type": "integer",
"format": "int32",
"default": 30000
},
"memory": {
"type": "integer",
"format": "int32",
"default": 256
}
}
},
"EntityBrief": {
"required": [
"namespace",
"name",
"version",
"publish"
],
"properties": {
"namespace": {
"type": "string",
"description": "Namespace of the item",
"minLength": 1
},
"name": {
"type": "string",
"description": "Name of the item",
"minLength": 1
},
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
}
}
},
"Action": {
"required": [
"namespace",
"name",
"version",
"publish",
"exec",
"parameters",
"limits"
],
"properties": {
"namespace": {
"type": "string",
"description": "Namespace of the item",
"minLength": 1
},
"name": {
"type": "string",
"description": "Name of the item",
"minLength": 1
},
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"exec": {
"$ref": "#/definitions/ActionExec"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "annotations on the item"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter bindings included in the context passed to the action"
},
"limits": {
"$ref": "#/definitions/ActionLimits"
}
}
},
"ActionPut": {
"description": "A restricted Action view that elides properties that are auto-assigned or derived from the URI (i.e., the namespace and name).",
"properties": {
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"exec": {
"$ref": "#/definitions/ActionExec"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "annotations on the item"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter bindings included in the context passed to the action"
},
"limits": {
"$ref": "#/definitions/ActionLimits"
}
}
},
"ActionExec": {
"required": [
"kind"
],
"properties": {
"kind": {
"type": "string",
"enum": [
"nodejs:6",
"nodejs:8",
"python:2",
"python:3",
"swift:3.1.1",
"java",
"blackbox"
],
"description": "the type of action"
},
"code": {
"type": "string",
"description": "The code to execute when kind is not 'blackbox'. For kinds like 'java', this is the path to the file to upload"
},
"image": {
"type": "string",
"description": "container image name when kind is 'blackbox'"
},
"init": {
"type": "string",
"description": "optional zipfile reference when code kind is 'nodejs'"
},
"main": {
"type": "string",
"description": "optional main class when code kind is 'java'"
}
},
"description": "definition of the action, such as javascript code or the name of a container"
},
"ActionPayload": {
"required": [
"payload"
],
"properties": {
"payload": {
"type": "string",
"description": "The payload to pass to the action."
}
}
},
"Rule": {
"required": [
"namespace",
"name",
"version",
"publish",
"status",
"trigger",
"action"
],
"properties": {
"namespace": {
"type": "string",
"description": "Namespace of the item",
"minLength": 1
},
"name": {
"type": "string",
"description": "Name of the item",
"minLength": 1
},
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"status": {
"type": "string",
"description": "Status of a rule",
"enum": [
"active",
"inactive",
"activating",
"deactivating"
]
},
"trigger": {
"type": "string",
"description": "Name of the trigger",
"minLength": 1
},
"action": {
"type": "string",
"description": "Name of the action",
"minLength": 1
}
}
},
"RulePut": {
"description": "A restricted Rule view that elides properties that are auto-assigned or derived from the URI (i.e., the namespace and name).",
"properties": {
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"trigger": {
"type": "string",
"description": "Name of the trigger",
"minLength": 1
},
"action": {
"type": "string",
"description": "Name of the action",
"minLength": 1
}
}
},
"Trigger": {
"required": [
"namespace",
"name",
"version",
"publish",
"parameters",
"limits"
],
"properties": {
"namespace": {
"type": "string",
"description": "Namespace of the item",
"minLength": 1
},
"name": {
"type": "string",
"description": "Name of the item",
"minLength": 1
},
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "annotations on the item"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter bindings for the trigger"
},
"limits": {
"$ref": "#/definitions/TriggerLimits"
},
"rules": {
"type": "object",
"description": "rules associated with the trigger"
}
}
},
"TriggerPut": {
"description": "A restricted Trigger view that elides properties that are auto-assigned or derived from the URI (i.e., the namespace and name).",
"properties": {
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "annotations on the item"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter bindings included in the context passed to the trigger"
},
"limits": {
"$ref": "#/definitions/TriggerLimits"
}
}
},
"TriggerPayload": {
"required": [
"payload"
],
"properties": {
"payload": {
"type": "string",
"description": "The payload of the trigger event."
}
}
},
"TriggerLimits": {
"description": "Limits on a specific trigger",
"type": "object"
},
"Package": {
"required": [
"namespace",
"name",
"version",
"publish",
"parameters"
],
"properties": {
"namespace": {
"type": "string",
"description": "Namespace of the item",
"minLength": 1
},
"name": {
"type": "string",
"description": "Name of the item",
"minLength": 1
},
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "annotations on the item"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter for the package"
},
"binding": {
"$ref": "#/definitions/PackageBinding"
}
}
},
"PackagePut": {
"description": "A restricted Package view that elides properties that are auto-assigned or derived from the URI (i.e., the namespace and name).",
"properties": {
"version": {
"type": "string",
"description": "Semantic version of the item",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "annotations on the item"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter for the package"
},
"binding": {
"$ref": "#/definitions/PackageBinding"
}
}
},
"PackageBinding": {
"required": [
"namespace",
"name"
],
"properties": {
"namespace": {
"type": "string",
"description": "Namespace of the item"
},
"name": {
"type": "string",
"description": "Name of the item"
}
}
},
"Activation": {
"required": [
"namespace",
"name",
"version",
"publish",
"subject",
"activationId",
"start",
"end",
"response",
"logs"
],
"properties": {
"duration": {
"type": "integer",
"description": "Duration of the item"
},
"namespace": {
"type": "string",
"description": "Namespace of the associated item"
},
"name": {
"type": "string",
"description": "Name of the item"
},
"version": {
"type": "string",
"description": "Semantic version of the item"
},
"publish": {
"type": "boolean",
"description": "Whether to publish the item or not"
},
"subject": {
"type": "string",
"description": "The subject that activated the item"
},
"activationId": {
"type": "string",
"description": "Id of the activation"
},
"start": {
"type": "string",
"description": "Time when the activation began"
},
"end": {
"type": "string",
"description": "Time when the activation completed"
},
"response": {
"$ref": "#/definitions/ActivationResponse"
},
"logs": {
"type": "array",
"description": "Logs generated by the activation",
"items": {
"type": "string"
}
}
}
},
"ActivationIds": {
"properties": {
"ids": {
"type": "array",
"description": "Array of activation ids",
"items": {
"type": "string"
}
}
}
},
"ActivationInfo": {
"properties": {
"id": {
"type": "string",
"description": "Activation id",
"minLength": 1
},
"result": {
"type": "object",
"description": "Activation result",
"required": [
"status"
],
"properties": {
"status": {
"type": "string"
}
}
},
"stdout": {
"type": "string",
"description": "Standard output from activation"
},
"stderr": {
"type": "string",
"description": "Standard error from activation"
}
}
},
"ActivationLogs": {
"properties": {
"logs": {
"type": "string",
"description": "Interleaved standard output and error of an activation"
}
}
},
"ActivationStderr": {
"properties": {
"stderr": {
"type": "string",
"description": "Standard error of an activation"
}
}
},
"ActivationResponse": {
"properties": {
"status": {
"type": "string",
"description": "Exit status of the activation"
},
"result": {
"description": "The return value from the activation",
"type": "object"
},
"success": {
"description": "Overwrite item if it exists. Default is false.",
"type": "boolean"
}
}
},
"ProviderTrigger": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the trigger",
"minLength": 1
}
}
},
"ProviderAction": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the action",
"minLength": 1
}
}
},
"ProviderBinding": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the binding",
"minLength": 1
}
}
},
"Provider": {
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the provider",
"minLength": 1
},
"publish": {
"type": "boolean",
"description": "Whether to publish the provider or not"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/KeyValue"
},
"description": "parameter bindings included in the context passed to the provider"
}
}
}
},
"responses": {
"BadRequest": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/ErrorMessage"
}
},
"UnauthorizedRequest": {
"description": "Unauthorized request",
"schema": {
"$ref": "#/definitions/ErrorMessage"
}
},
"ServerError": {
"description": "Server error",
"schema": {
"$ref": "#/definitions/ErrorMessage"
}
},
"AddedItem": {
"description": "Added Item",
"schema": {
"$ref": "#/definitions/ItemId"
}
},
"UpdatedItem": {
"description": "Updated Item",
"schema": {
"$ref": "#/definitions/ActionPut"
}
},
"DeletedItem": {
"description": "Deleted Item"
},
"ItemNotFound": {
"description": "Item not found",
"schema": {
"$ref": "#/definitions/ErrorMessage"
}
},
"Timeout": {
"description": "Request timed out"
},
"Conflict": {
"description": "Conflicting item already exists",
"schema": {
"$ref": "#/definitions/ErrorMessage"
}
},
"AcceptedActivation": {
"description": "Accepted activation request",
"schema": {
"$ref": "#/definitions/ItemId"
}
},
"AcceptedRuleStateChange": {
"description": "Rule has been enabled or disabled"
},
"RequestEntityTooLarge": {
"description": "Request entity too large",
"schema": {
"$ref": "#/definitions/ErrorMessage"
}
},
"NoActiveRules": {
"description": "Trigger has no active rules"
}
}
}