Qinling Base URLs
All API calls through the rest of this document require authentication
with the OpenStack Identity service. They also required a url that
is extracted from the Identity token of type
function-engine. This will be the root url that every call below will be
added to build a full path.
Note that if using OpenStack Identity service API v2, url can be
represented via adminURL, internalURL or publicURL in endpoint
catalog. In Identity service API v3, url is represented with field
interface including admin, internal and public.
For instance, if the url is
http://my-qinling-url.org/qinling/v1 then the full API call for
/functions is http://my-qinling-url.org/qinling/v1/functions.
Depending on the deployment the function engine url might be http or https, a custom port, a custom path, and include your project id. The only way to know the urls for your deployment is by using the service catalog. The containers service URL should never be hard coded in applications, even if they are only expected to work at a single site. It should always be discovered from the Identity token.
As such, for the rest of this document we will be using short hand
where GET /functions really means
GET {your_qinling_url}/functions.
API Versions
Show all enabled API versions
Runtimes
Lists, creates, updates, shows details and deletes runtimes.
The runtime is programming language support. Each runtime is encapsulated in a container image which is used for creating the runtime container. Qinling communicates with the container by sending HTTP requests and runs user function inside.
Create a runtime.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
name |
body |
string |
Runtime name |
image |
body |
string |
Docker image used to build the runtime, e.g. openstackqinling/python3-runtime |
description (Optional) |
body |
string |
Description for the runtime |
is_public (Optional) |
body |
bool |
Make the runtime public or not, if public then the runtime will be available for all the tenant. The runtime is public by default. |
trusted (Optional) |
body |
bool |
Define the runtime as trusted or not, depending the value Kubernetes
will apply some annotations like |
Request Example
{
"name": "python3",
"description": "Runtime Python3.7 ready for production.",
"image": "openstackqinling/python3-runtime",
"is_public:": true,
"trusted": true
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Runtime name |
image |
body |
string |
Docker image used to build the runtime, e.g. openstackqinling/python3-runtime |
description (Optional) |
body |
string |
Description for the runtime |
is_public (Optional) |
body |
bool |
Make the runtime public or not, if public then the runtime will be available for all the tenant. The runtime is public by default. |
trusted (Optional) |
body |
bool |
Define the runtime as trusted or not, depending the value Kubernetes
will apply some annotations like |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"status": "creating",
"created_at": "2019-06-06 15:33:23.178645",
"description": "Runtime Python3.7 ready for production.",
"image": "openstackqinling/python3-runtime",
"updated_at": null,
"is_public": true,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "b351d3b6-8ccb-4f5b-b70f-58c72298a2ac",
"trusted": true,
"name": "python3"
}
List runtimes.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Runtime name |
image |
body |
string |
Docker image used to build the runtime, e.g. openstackqinling/python3-runtime |
description (Optional) |
body |
string |
Description for the runtime |
is_public (Optional) |
body |
bool |
Make the runtime public or not, if public then the runtime will be available for all the tenant. The runtime is public by default. |
trusted (Optional) |
body |
bool |
Define the runtime as trusted or not, depending the value Kubernetes
will apply some annotations like |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"status": "available",
"description": "Runtime Python3.7 ready for production.",
"image": "openstackqinling/python3-runtime",
"updated_at": "2019-05-30 14:40:50",
"created_at": "2019-05-30 14:40:41",
"is_public": true,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"trusted": true,
"name": "python3"
},
{
"status": "available",
"description": "Runtime Python2.7 ready for production.",
"image": "openstackqinling/python2-runtime",
"updated_at": "2019-06-03 19:01:37",
"created_at": "2019-06-03 19:00:33",
"is_public": true,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "c4682a12-1a82-424d-b299-9b238fb6b694",
"trusted": true,
"name": "python2.7"
},
{
"status": "available",
"description": "Runtime Node.js 8.10 ready for production.",
"image": "openstackqinling/nodejs-runtime",
"updated_at": "2019-06-03 19:30:31",
"created_at": "2019-06-03 19:30:06",
"is_public": true,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "d3780197-d3a8-4961-8228-354ac7592e48",
"trusted": true,
"name": "nodejs8.10"
}
]
Show a runtime.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
runtime_id |
path |
uuid |
ID for the runtime |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Runtime name |
image |
body |
string |
Docker image used to build the runtime, e.g. openstackqinling/python3-runtime |
description (Optional) |
body |
string |
Description for the runtime |
is_public (Optional) |
body |
bool |
Make the runtime public or not, if public then the runtime will be available for all the tenant. The runtime is public by default. |
trusted (Optional) |
body |
bool |
Define the runtime as trusted or not, depending the value Kubernetes
will apply some annotations like |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"status": "available",
"description": "Runtime Python3.7 ready for production.",
"image": "openstackqinling/python3-runtime",
"updated_at": "2019-05-30 14:40:50",
"created_at": "2019-05-30 14:40:41",
"is_public": true,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"trusted": true,
"name": "python3"
}
Show a runtime pool.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
runtime_id |
body |
uuid |
ID for the runtime |
Update a runtime.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
runtime_id |
path |
uuid |
ID for the runtime |
name (Optional) |
body |
string |
Runtime name |
image (Optional) |
body |
string |
Docker image used to build the runtime, e.g. openstackqinling/python3-runtime |
description (Optional) |
body |
string |
Description for the runtime |
Request Example
{
"name": "python3",
"description": "Runtime Python3.7 ready for production.",
"image": "openstackqinling/python3-runtime"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Runtime name |
image |
body |
string |
Docker image used to build the runtime, e.g. openstackqinling/python3-runtime |
description (Optional) |
body |
string |
Description for the runtime |
is_public (Optional) |
body |
bool |
Make the runtime public or not, if public then the runtime will be available for all the tenant. The runtime is public by default. |
trusted (Optional) |
body |
bool |
Define the runtime as trusted or not, depending the value Kubernetes
will apply some annotations like |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"status": "available",
"description": "Runtime Python3.7 ready for production.",
"image": "openstackqinling/python3-runtime",
"updated_at": "2019-05-30 14:40:50",
"created_at": "2019-06-06 16:40:31",
"is_public": true,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"trusted": true,
"name": "python3"
}
Functions
Lists, creates, shows details for, downloads, detaches, updates, scales and deletes functions.
Function contains the source code that will be executed into the runtime. The source code langage within the function should match the runtime.
Create a function.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
name |
body |
string |
Function name |
description (Optional) |
body |
string |
Description for the function |
runtime_id |
body |
uuid |
Runtime ID used by the function |
code |
body |
JSON |
Source code type, e.g. |
entry |
body |
string |
Function entry point, e.g. Not required if the source is |
cpu (Optional) |
body |
integer |
Max CPU usage during the execution |
memory (Optional) |
body |
integer |
Max memory usage during the execution |
timeout (Optional) |
body |
integer |
Timeout in second before the execution fails |
package (Optional) |
body |
string |
Package to upload, e.g. Required only if |
Request Example
Package
{
"code": {
"source": "package"
},
"description": "Hello World function from local package archive",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
curl -X POST http://127.0.0.1:7070/v1/functions \
-H "X-Auth-Token: gAAAAAB..." \
-F name=hello_world \
-F runtime_id=cbd9e85f-a1b2-4120-a2c7-57c90809ce7d \
-F code='{"source": "package"}' \
-F entry=hello_world.main \
-F cpu=200 \
-F memory=33000000 \
-F description="Hello World function based on a package" \
-F timeout=15 \
-F package=@/home/dev/hello_world.zip
Swift
{
"code": {
"source": "swift",
"swift": {
"object": "hello_world.py",
"container": "functions"
}
},
"description": "Hello World function from Swift",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Function name |
description (Optional) |
body |
string |
Description for the function |
runtime_id |
body |
uuid |
Runtime ID used by the function |
code |
body |
JSON |
Source code type, e.g. |
entry |
body |
string |
Function entry point, e.g. Not required if the source is |
cpu (Optional) |
body |
integer |
Max CPU usage during the execution |
memory (Optional) |
body |
integer |
Max memory usage during the execution |
timeout (Optional) |
body |
integer |
Timeout in second before the execution fails |
package (Optional) |
body |
string |
Package to upload, e.g. Required only if |
latest_version (Optional) |
body |
integer |
Latest version created based on this function |
count |
body |
integer |
Total of time the function has been executed |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
Package
{
"count": 0,
"code": {
"source": "package",
"md5sum": "e439d00bab001d7ad7d1e0e451567699"
},
"description": "Hello World function from local package archive",
"created_at": "2019-06-10 01:15:02.108208",
"updated_at": null,
"latest_version": 0,
"id": "00f3b8ef-e794-4897-8a34-fa6a489d4ede",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
Swift
{
"count": 0,
"code": {
"source": "swift",
"swift": {
"object": "hello_world.py",
"container": "functions"
}
},
"description": "Hello World function from Swift",
"created_at": "2019-06-10 01:43:53.909146",
"updated_at": null,
"latest_version": 0,
"id": "1127cb1a-938e-4262-b22f-d88f182624f6",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
Image
{
"count": 0,
"code": {
"source": "image",
"image": "docker-registry/hello-world"
},
"description": "Hello World from Docker image",
"created_at": "2019-06-10 01:51:29.515424",
"updated_at": null,
"latest_version": 0,
"id": "28de9573-2397-4fa1-b627-60124395d1ff",
"memory_size": 33554432,
"timeout": 15,
"entry": null,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
List functions.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Function name |
description (Optional) |
body |
string |
Description for the function |
runtime_id |
body |
uuid |
Runtime ID used by the function |
code |
body |
JSON |
Source code type, e.g. |
count |
body |
integer |
Total of time the function has been executed |
cpu (Optional) |
body |
integer |
Max CPU usage during the execution |
memory (Optional) |
body |
integer |
Max memory usage during the execution |
entry |
body |
string |
Function entry point, e.g. Not required if the source is |
timeout (Optional) |
body |
integer |
Timeout in second before the execution fails |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"count": 7,
"code": "{\"source\": \"package\", \"md5sum\": \"648926b8a9705d3bd77cefdeca46a254\"}",
"description": "Function Hello World :)",
"created_at": "2019-06-06 18:59:02",
"timeout": 10,
"updated_at": null,
"cpu": 250,
"memory_size": 134217728,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"entry": "hello_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "22f62e09-e361-4481-b2da-22e3a4ed9a43",
"name": "hello_world"
},
{
"count": 0,
"code": "{\"source\": \"package\", \"md5sum\": \"e0309c12d355352cc92b5433bf293210\"}",
"description": "Function Goodbye World :(",
"created_at": "2019-06-06 19:04:30",
"timeout": 5,
"updated_at": "2019-06-06 19:04:30",
"cpu": 100,
"memory_size": 33554432,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"entry": "goodbye_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "2324a256-a249-4cec-968b-6ca7f99d805b",
"name": "goodbye_world"
}
]
Show a function.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
path |
uuid |
ID for the function |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Function name |
description (Optional) |
body |
string |
Description for the function |
runtime_id |
body |
uuid |
Runtime ID used by the function |
code |
body |
JSON |
Source code type, e.g. |
count |
body |
integer |
Total of time the function has been executed |
cpu (Optional) |
body |
integer |
Max CPU usage during the execution |
memory (Optional) |
body |
integer |
Max memory usage during the execution |
entry |
body |
string |
Function entry point, e.g. Not required if the source is |
timeout (Optional) |
body |
integer |
Timeout in second before the execution fails |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"count": 7,
"code": "{\"source\": \"package\", \"md5sum\": \"648926b8a9705d3bd77cefdeca46a254\"}",
"description": "Function Hello World :)",
"created_at": "2019-06-06 18:59:02",
"timeout": 10,
"updated_at": null,
"cpu": 250,
"memory_size": 134217728,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"entry": "hello_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "22f62e09-e361-4481-b2da-22e3a4ed9a43",
"name": "hello_world"
}
Update a function.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
path |
uuid |
ID for the function |
name (Optional) |
body |
string |
Function name |
description (Optional) |
body |
string |
Description for the function |
runtime_id (Optional) |
body |
uuid |
Runtime ID used by the function |
code (Optional) |
body |
JSON |
Source code type, e.g. Package function cant have this value updated. |
entry (Optional) |
body |
string |
Function entry point, e.g. |
cpu (Optional) |
body |
integer |
Max CPU usage during the execution |
memory (Optional) |
body |
integer |
Max memory usage during the execution |
timeout (Optional) |
body |
integer |
Timeout in second before the execution fails |
package (Optional) |
body |
string |
Package to upload, e.g. Required only if |
count |
body |
integer |
Total of time the function has been executed |
Request Example
Package
{
"description": "Hello World function from local package archive",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
curl -X PUT http://127.0.0.1:7070/v1/functions/{function_id} \
-H "X-Auth-Token: gAAAAAB..." \
-F name=hello_world \
-F runtime_id=cbd9e85f-a1b2-4120-a2c7-57c90809ce7d \
-F entry=hello_world.main \
-F cpu=200 \
-F memory=33000000 \
-F description="Hello World function based on a package" \
-F timeout=15 \
-F package=@/home/dev/hello_world.zip
Swift
{
"code": {
"source": "swift",
"swift": {
"object": "hello_world.py",
"container": "functions"
}
},
"description": "Hello World function from Swift",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Function name |
description (Optional) |
body |
string |
Description for the function |
runtime_id |
body |
uuid |
Runtime ID used by the function |
code |
body |
JSON |
Source code type, e.g. |
count |
body |
integer |
Total of time the function has been executed |
cpu (Optional) |
body |
integer |
Max CPU usage during the execution |
memory (Optional) |
body |
integer |
Max memory usage during the execution |
entry |
body |
string |
Function entry point, e.g. Not required if the source is |
timeout (Optional) |
body |
integer |
Timeout in second before the execution fails |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
Package
{
"count": 0,
"code": {
"source": "package",
"md5sum": "e439d00bab001d7ad7d1e0e451567699"
},
"description": "Hello World function from local package archive",
"created_at": "2019-06-10 01:15:02.108208",
"updated_at": "2019-06-10 01:15:02.115438",
"latest_version": 0,
"id": "00f3b8ef-e794-4897-8a34-fa6a489d4ede",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
Swift
{
"count": 0,
"code": {
"source": "swift",
"swift": {
"object": "hello_world.py",
"container": "functions"
}
},
"description": "Hello World function from Swift",
"created_at": "2019-06-10 01:28:38",
"updated_at": "2019-06-10 02:22:27.663257",
"latest_version": 0,
"id": "ecdf3b0c-ac37-4ba8-a02c-5d60cf86cc8b",
"memory_size": 33554432,
"timeout": 15,
"entry": "hello_world.main",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"cpu": 200,
"runtime_id": "cbd9e85f-a1b2-4120-a2c7-57c90809ce7d",
"name": "hello_world"
}
Download a function.
Detach a function from a worker.
Response Codes
Scale up a function.
Response Codes
Scale down a function.
Response Codes
Executions
Lists, creates, shows details for, and deletes function executions.
An execution runs the function and stores the return of the function. The execution gets the returns and the prints.
Create an execution.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_alias (Optional) |
body |
string |
Alias name of the function (if an alias has been created) |
input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
description (Optional) |
body |
string |
Description for the execution |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
sync (Optional) |
body |
bool |
Execution is sync or async, default is |
Request Example
{
"description": "The world should know Foo!",
"sync": true,
"function_version": 0,
"input": "{\"name\": \"foo\"}",
"function_id": "3e0e5bf8-ee7a-4fc8-9641-d1cbd9c60f46"
}
{
"description": "Execution of a function based on an alias",
"sync": true,
"input": "{\"name\": \"foo\"}",
"function_alias": "hq-production-function"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
description (Optional) |
body |
string |
Description for the execution |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
sync (Optional) |
body |
bool |
Execution is sync or async, default is |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"status": "success",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": "The world should know Foo!",
"updated_at": "2019-06-06 23:13:37",
"created_at": "2019-06-06 23:13:37",
"sync": true,
"function_version": 0,
"result": "{\"duration\": 0.044, \"output\": \"Hello, bar\"}",
"input": "{\"name\": \"foo\"}",
"function_id": "3e0e5bf8-ee7a-4fc8-9641-d1cbd9c60f46",
"id": "62033613-6f02-4a6d-b569-7ba7fd18f8f7"
}
List executions.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
description (Optional) |
body |
string |
Description for the execution |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
sync (Optional) |
body |
bool |
Execution is sync or async, default is |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"status": "success",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": null,
"created_at": "2019-06-06 21:05:39",
"sync": true,
"function_version": 0,
"result": "{\"duration\": 0.074, \"output\": \"Hello, World\"}",
"input": null,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"updated_at": "2019-06-06 21:05:41",
"id": "7dbb2ebc-9096-4e8e-9ded-0af8cd6cef60"
},
{
"status": "success",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": "The world should know Foo!",
"created_at": "2019-06-06 23:15:30",
"sync": true,
"function_version": 0,
"result": "{\"duration\": 0.032, \"output\": \"Hello, bar\"}",
"input": "{\"name\": \"bar\"}",
"function_id": "3e0e5bf8-ee7a-4fc8-9641-d1cbd9c60f46",
"updated_at": "2019-06-06 23:15:30",
"id": "347bb366-95c9-49ab-8179-424c7b707124"
}
]
List executions by filters..
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
filter |
path |
string |
Execution filter, e.g. |
function_id |
path |
uuid |
ID for the function |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
description (Optional) |
body |
string |
Description for the execution |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
sync (Optional) |
body |
bool |
Execution is sync or async, default is |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"status": "success",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": null,
"created_at": "2019-06-06 21:05:39",
"sync": true,
"function_version": 0,
"result": "{\"duration\": 0.074, \"output\": \"Hello, World\"}",
"input": null,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"updated_at": "2019-06-06 21:05:41",
"id": "7dbb2ebc-9096-4e8e-9ded-0af8cd6cef60"
},
{
"status": "success",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": null,
"created_at": "2019-06-06 23:50:41",
"sync": true,
"function_version": 0,
"result": "{\"duration\": 0.183, \"output\": \"Hello, bar\"}",
"input": "{\"name\": \"bar\"}",
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"updated_at": "2019-06-06 23:50:42",
"id": "9b6d0e80-7c4b-49d1-bf11-f16999433337"
}
]
Show an execution.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
execution_id |
path |
uuid |
ID for the execution |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
description (Optional) |
body |
string |
Description for the execution |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
sync (Optional) |
body |
bool |
Execution is sync or async, default is |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"status": "success",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": "The world should know Foo!",
"created_at": "2019-06-06 23:15:30",
"sync": true,
"function_version": 0,
"result": "{\"duration\": 0.032, \"output\": \"Hello, bar\"}",
"input": "{\"name\": \"bar\"}",
"function_id": "3e0e5bf8-ee7a-4fc8-9641-d1cbd9c60f46",
"updated_at": "2019-06-06 23:15:30",
"id": "347bb366-95c9-49ab-8179-424c7b707124"
}
Show an execution log.
Versions
Lists, creates, detaches, shows details and deletes versions.
Function versions are like git commits, theyre snapshots of your project history. Each version has a number that serves as its ID, starting with 1 and incrementing up, and never reused. The code for a published version of a function is immutable (i.e. cannot be changed). So, a version number corresponds to a specific set of function code with certainty.
Create a version.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
path |
uuid |
ID for the function |
description (Optional) |
body |
string |
Description for the version |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the version |
function_id |
body |
uuid |
ID for the function |
count (Optional) |
body |
integer |
Total of time the version has been executed |
version_number (Optional) |
body |
integer |
Version of the function |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"count": 0,
"version_number": 1,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "This version is ready for production",
"created_at": "2019-06-07 01:23:16.278205",
"updated_at": null,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "45ebdcbf-6e2f-46c9-bd58-7f6ae01ecfcc"
}
List versions.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
path |
uuid |
ID for the function |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the version |
function_id |
body |
uuid |
ID for the function |
count (Optional) |
body |
integer |
Total of time the version has been executed |
version_number (Optional) |
body |
integer |
Version of the function |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"count": 0,
"version_number": 1,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": "This version is ready for production",
"created_at": "2019-06-07 01:23:16",
"updated_at": null,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"id": "45ebdcbf-6e2f-46c9-bd58-7f6ae01ecfcc"
},
{
"count": 0,
"version_number": 2,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"description": "This version has not been tested yet",
"created_at": "2019-06-07 01:34:10",
"updated_at": null,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"id": "9490f863-020b-4746-8f30-9324cff31678"
}
]
Show a version.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
path |
uuid |
ID for the function |
version_number |
path |
integer |
Version number |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the version |
function_id |
body |
uuid |
ID for the function |
count (Optional) |
body |
integer |
Total of time the version has been executed |
version_number (Optional) |
body |
integer |
Version of the function |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"count": 0,
"version_number": 1,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "This version is ready for production",
"created_at": "2019-06-07 01:23:16",
"updated_at": null,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "45ebdcbf-6e2f-46c9-bd58-7f6ae01ecfcc"
}
Detach a version.
Response Codes
Aliases
Lists, creates, updates, shows details and deletes aliases.
Function aliases are like pointers to the specific function versions. By using aliases, you can access the specific version of a function an alias is pointing to without having to know the specific version the alias is pointing to.
Create ana alias.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
body |
uuid |
ID for the function |
version |
body |
integer |
Version of the function to point the alias |
description (Optional) |
body |
string |
Description for the alias |
Request Example
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"name": "hw-v2",
"function_version": 2,
"description": "Hello World, version 2"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the alias |
description (Optional) |
body |
string |
Description for the alias |
function_id |
body |
uuid |
ID for the function |
version_number |
body |
integer |
Version of the function to point the alias |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
List aliases.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the alias |
description (Optional) |
body |
string |
Description for the alias |
function_id |
body |
uuid |
ID for the function |
version_number |
body |
integer |
Version of the function to point the alias |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"name": "hw-v2",
"created_at": "2019-06-07 02:07:06",
"updated_at": null,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"function_version": 2,
"description": "Hello World, version 2"
},
{
"function_id": "ab003f7a-402a-4a2e-8f00-2f848bde800d",
"name": "hq-v1",
"created_at": "2019-06-07 02:15:16",
"updated_at": null,
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"function_version": 37,
"description": "Hello Qinling, version 37"
}
]
Show an alias.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
name |
path |
string |
Name of the alias |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the alias |
description (Optional) |
body |
string |
Description for the alias |
function_id |
body |
uuid |
ID for the function |
version_number |
body |
integer |
Version of the function to point the alias |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Update an alias.
Response Codes
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
name |
path |
string |
Name of the alias |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the alias |
description (Optional) |
body |
string |
Description for the alias |
function_id |
body |
uuid |
ID for the function |
version_number |
body |
integer |
Version of the function to point the alias |
project_id |
body |
uuid |
ID for the project that owns the resource |
status |
body |
enum |
Status of the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Webhooks
Lists, creates, updates, shows details and deletes webhooks.
Webhooks are a low-effort way to invoke the functions. They do not require a bot user or authentication to use.
Create a webhook.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_alias (Optional) |
body |
string |
Alias name of the function (if an alias has been created) |
function_version (Optional) |
body |
integer |
Version of the function |
description (Optional) |
body |
string |
Description for the webhook |
Request Example
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "Webhook triggered by Jenkins",
"function_version": 2
}
{
"function_alias": "hq-production-function",
"description": "Webhook based on function alias triggered by Jenkins"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the webhook |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
version_number (Optional) |
body |
integer |
Version of the function |
webhook_url |
body |
string |
Webhook URL |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "Webhook triggered by Jenkins",
"created_at": "2019-06-07 14:53:22.989283",
"updated_at": null,
"function_version": 2,
"webhook_url": "http://127.0.0.1:7070/v1/webhooks/2aac6d93-c4d3-4fc6-9d3b-8852be0c8c89/invoke",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "2aac6d93-c4d3-4fc6-9d3b-8852be0c8c89"
}
List webhooks.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the webhook |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
version_number (Optional) |
body |
integer |
Version of the function |
webhook_url |
body |
string |
Webhook URL |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"function_id": "e47ca07c-b0cc-4501-901f-1c2e3df46724",
"description": "Webhook Hello World",
"created_at": "2019-06-07 02:48:16",
"updated_at": null,
"function_version": 0,
"webhook_url": "http://127.0.0.1:7070/v1/webhooks/726779f2-227f-43af-a891-4de85e8dadd5/invoke",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "726779f2-227f-43af-a891-4de85e8dadd5"
},
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "Webhook triggered by Jenkins",
"created_at": "2019-06-07 14:52:19",
"updated_at": null,
"function_version": 2,
"webhook_url": "http://127.0.0.1:7070/v1/webhooks/e3f34707-8fea-4d36-b558-e39b00b99105/invoke",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "e3f34707-8fea-4d36-b558-e39b00b99105"
}
]
Show a webhook.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
webhook_id |
path |
uuid |
ID for the webhook |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the webhook |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
version_number (Optional) |
body |
integer |
Version of the function |
webhook_url |
body |
string |
Webhook URL |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "Webhook triggered by Jenkins",
"created_at": "2019-06-07 14:52:19",
"updated_at": null,
"function_version": 2,
"webhook_url": "http://127.0.0.1:7070/v1/webhooks/e3f34707-8fea-4d36-b558-e39b00b99105/invoke",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "e3f34707-8fea-4d36-b558-e39b00b99105"
}
Update a webhook.
Response Codes
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
webhook_id |
path |
uuid |
ID for the webhook |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_alias (Optional) |
body |
string |
Alias name of the function (if an alias has been created) |
function_version (Optional) |
body |
integer |
Version of the function |
description (Optional) |
body |
string |
Description for the webhook |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
description (Optional) |
body |
string |
Description for the webhook |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
version_number (Optional) |
body |
integer |
Version of the function |
webhook_url |
body |
string |
Webhook URL |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Request Example
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "Webhook triggered by Gitlab",
"function_version": 2
}
{
"description": "Webhook based on function alias triggered by Gitlab",
"function_alias": "hq-staging-function"
}
Response Example
{
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"description": "Webhook triggered by Gitlab",
"created_at": "2019-06-07 14:53:22",
"updated_at": "2019-06-07 18:06:42",
"function_version": 2,
"webhook_url": "http://127.0.0.1:7070/v1/webhooks/2aac6d93-c4d3-4fc6-9d3b-8852be0c8c89/invoke",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"id": "2aac6d93-c4d3-4fc6-9d3b-8852be0c8c89"
}
Jobs
Lists, creates, updates, shows details and deletes jobs.
Jobs allows to run periodically functions based on time period. Time period is based on cron syntax.
Create a job.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
name |
body |
string |
Name of the job |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_alias (Optional) |
body |
string |
Alias name of the function (if an alias has been created) |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
function_input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
pattern |
body |
string |
Cron pattern, e.g. |
count (Optional) |
body |
integer |
Number of time the function should be executed, default is |
Request Example
{
"count": 5,
"name": "every-minute",
"pattern": "* * * * *",
"function_version": 2,
"function_input": "{\"name\": \"Foo\"}",
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5"
}
{
"count": 5,
"name": "every-minute",
"pattern": "* * * * *",
"function_input": "{\"name\": \"Foo\"}",
"function_alias": "hq-production-function"
}
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the job |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
function_input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
pattern |
body |
string |
Cron pattern, e.g. |
count (Optional) |
body |
integer |
Number of time the function should be executed, default is |
first_execution_time |
body |
string |
First time the function will be executed |
next_execution_time |
body |
string |
Next time the function will be executed |
status |
body |
enum |
Status of the resource |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"count": 5,
"status": "running",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"name": "every-minute",
"pattern": "* * * * *",
"created_at": "2019-06-07 19:11:08.375646",
"updated_at": null,
"function_version": 2,
"first_execution_time": "2019-06-07 19:12:00",
"function_input": "{\"name\": \"Foo\"}",
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"id": "dc7ef571-1f8d-4dc8-a659-fc86f80dd44c",
"next_execution_time": "2019-06-07 19:12:00"
}
List jobs.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the job |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
function_input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
pattern |
body |
string |
Cron pattern, e.g. |
count (Optional) |
body |
integer |
Number of time the function should be executed, default is |
first_execution_time |
body |
string |
First time the function will be executed |
next_execution_time |
body |
string |
Next time the function will be executed |
status |
body |
enum |
Status of the resource |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
[
{
"count": null,
"status": "running",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"name": "every-minute",
"pattern": "0 0 * * SUN",
"created_at": "2019-06-07 19:18:50",
"updated_at": "2019-06-07 19:29:59",
"id": "697546a1-090c-48de-8ecd-ef4cdb9da7a9",
"first_execution_time": "2019-06-07 19:19:00",
"function_input": null,
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"function_version": 2,
"next_execution_time": "2019-06-07 19:31:00"
},
{
"count": 0,
"status": "done",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"name": "every-minute",
"pattern": "* * * * *",
"created_at": "2019-06-07 19:21:33",
"updated_at": "2019-06-07 19:25:59",
"id": "4e435c84-ab06-4ff5-8f05-b7ffe25c1224",
"first_execution_time": "2019-06-07 19:22:00",
"function_input": "{\"name\": \"Foo\"}",
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"function_version": 0,
"next_execution_time": "2019-06-07 19:26:00"
}
]
Show a job.
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
job_id |
path |
uuid |
ID for the job |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the job |
function_id |
body |
uuid |
ID for the function, if an alias is used then |
function_version (Optional) |
body |
integer |
Version of the function to execute, default is |
function_input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
pattern |
body |
string |
Cron pattern, e.g. |
count (Optional) |
body |
integer |
Number of time the function should be executed, default is |
first_execution_time |
body |
string |
First time the function will be executed |
next_execution_time |
body |
string |
Next time the function will be executed |
status |
body |
enum |
Status of the resource |
project_id |
body |
uuid |
ID for the project that owns the resource |
created_at (Optional) |
body |
datestamp |
Date / Time when resource was created |
updated_at (Optional) |
body |
datestamp |
Date / Time when resource last updated |
Response Example
{
"count": 0,
"status": "done",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"name": "every-minute",
"pattern": "* * * * *",
"created_at": "2019-06-07 19:21:33",
"updated_at": "2019-06-07 19:25:59",
"id": "4e435c84-ab06-4ff5-8f05-b7ffe25c1224",
"first_execution_time": "2019-06-07 19:22:00",
"function_input": "{\"name\": \"Foo\"}",
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"function_version": 0,
"next_execution_time": "2019-06-07 19:26:00"
}
Update a job.
Response Codes
Request
Name |
In |
Type |
Description |
|---|---|---|---|
x-auth-token (Optional) |
header |
string |
Token used to identify the user from Keystone |
job_id |
path |
uuid |
ID for the job |
Response Parameters
Name |
In |
Type |
Description |
|---|---|---|---|
id |
body |
uuid |
ID for the resource |
name |
body |
string |
Name of the job |
function_input (Optional) |
body |
JSON |
Input data to pass to the function, e.g. |
pattern (Optional) |
body |
string |
Cron pattern, e.g. |
next_execution_time |
body |
string |
Next time the function will be executed, e.g. |
status (Optional) |
body |
string |
Status of the job, e.g. |
Request Example
{
"status": "paused",
"name": "every-minute",
"pattern": "* * * * *",
"function_input": "{\"name\": \"Foo\"}",
"next_execution_time": "2019-06-07 22:41:00"
}
Response Example
{
"count": null,
"status": "paused",
"project_id": "5eeb5916ae4b43699f06ea422e581b83",
"name": "every-minute",
"pattern": "* * * * *",
"created_at": "2019-06-07 19:18:50",
"updated_at": "2019-06-07 19:41:20.108254",
"function_version": 2,
"first_execution_time": "2019-06-07 19:19:00",
"function_input": "{\"name\": \"Foo\"}",
"function_id": "f8e7357f-af4a-4448-87d8-6fed4c7db5b5",
"id": "697546a1-090c-48de-8ecd-ef4cdb9da7a9",
"next_execution_time": "2019-06-07 22:41:00"
}