@ -0,0 +1,265 @@ | |||
.. -*- rst -*- | |||
======== | |||
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 an alias | |||
=============== | |||
.. rest_method:: POST /v1/aliases | |||
Create ana alias. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 201 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: function_id | |||
- version: alias_version | |||
- description: alias_description | |||
Request Example | |||
--------------- | |||
.. literalinclude:: samples/aliases/create-alias-request.json | |||
:language: javascript | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: alias_name | |||
- description: alias_description | |||
- function_id: function_id | |||
- version_number: alias_version | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/aliases/create-alias-response.json | |||
:language: javascript | |||
List aliases | |||
============ | |||
.. rest_method:: GET /v1/aliases | |||
List aliases. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: alias_name | |||
- description: alias_description | |||
- function_id: function_id | |||
- version_number: alias_version | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/aliases/list-aliases-response.json | |||
:language: javascript | |||
Show an alias | |||
============= | |||
.. rest_method:: GET /v1/aliases/{name} | |||
Show an alias. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- name: path_alias_name | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: alias_name | |||
- description: alias_description | |||
- function_id: function_id | |||
- version_number: alias_version | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/aliases/show-alias-response.json | |||
:language: javascript | |||
Update an alias | |||
=============== | |||
.. rest_method:: PUT /v1/aliases/{name} | |||
Update an alias. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 202 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- name: path_alias_name | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: alias_name | |||
- description: alias_description | |||
- function_id: function_id | |||
- version_number: alias_version | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Request Example | |||
--------------- | |||
.. literalinclude:: samples/aliases/update-alias-request.json | |||
:language: javascript | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/aliases/update-alias-response.json | |||
:language: text | |||
Delete an alias | |||
=============== | |||
.. rest_method:: DELETE /v1/aliases/{name} | |||
Delete an alias. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 204 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- name: path_alias_name | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/aliases/delete-alias-response.text | |||
:language: text |
@ -0,0 +1,31 @@ | |||
============ | |||
API Versions | |||
============ | |||
Show all enabled API versions | |||
List all API versions | |||
===================== | |||
.. rest_method:: GET / | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
No parameters needed | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/api-versions/get-versions-response.json | |||
:language: javascript |
@ -0,0 +1,223 @@ | |||
# -*- coding: utf-8 -*- | |||
# | |||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |||
# not use this file except in compliance with the License. You may obtain | |||
# a copy of the License at | |||
# | |||
# http://www.apache.org/licenses/LICENSE-2.0 | |||
# | |||
# Unless required by applicable law or agreed to in writing, software | |||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | |||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |||
# License for the specific language governing permissions and limitations | |||
# under the License. | |||
# | |||
# Qinling documentation build configuration file | |||
# | |||
# This file is execfile()d with the current directory set to | |||
# its containing dir. | |||
# | |||
# Note that not all possible configuration values are present in this | |||
# autogenerated file. | |||
# | |||
# All configuration values have a default; values that are commented out | |||
# serve to show the default. | |||
import os | |||
import sys | |||
extensions = [ | |||
'os_api_ref', | |||
'openstackdocstheme', | |||
] | |||
html_theme = 'openstackdocs' | |||
html_theme_options = { | |||
"sidebar_mode": "toc", | |||
} | |||
# If extensions (or modules to document with autodoc) are in another directory, | |||
# add these directories to sys.path here. If the directory is relative to the | |||
# documentation root, use os.path.abspath to make it absolute, like shown here. | |||
sys.path.insert(0, os.path.abspath('../../')) | |||
sys.path.insert(0, os.path.abspath('../')) | |||
sys.path.insert(0, os.path.abspath('./')) | |||
# -- General configuration ---------------------------------------------------- | |||
# Add any Sphinx extension module names here, as strings. They can be | |||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | |||
# The suffix of source filenames. | |||
source_suffix = '.rst' | |||
# The encoding of source files. | |||
# | |||
# source_encoding = 'utf-8' | |||
# The master toctree document. | |||
master_doc = 'index' | |||
# General information about the project. | |||
project = u'Function Engine API Reference' | |||
copyright = u'2010-present, OpenStack Foundation' | |||
# The version info for the project you're documenting, acts as replacement for | |||
# |version| and |release|, also used in various other places throughout the | |||
# built documents. | |||
# | |||
from qinling.version import version_info | |||
# The full version, including alpha/beta/rc tags. | |||
release = version_info.release_string() | |||
# The short X.Y version. | |||
version = version_info.version_string() | |||
# The language for content autogenerated by Sphinx. Refer to documentation | |||
# for a list of supported languages. | |||
# | |||
# language = None | |||
# There are two options for replacing |today|: either, you set today to some | |||
# non-false value, then it is used: | |||
# today = '' | |||
# Else, today_fmt is used as the format for a strftime call. | |||
# today_fmt = '%B %d, %Y' | |||
# The reST default role (used for this markup: `text`) to use | |||
# for all documents. | |||
# default_role = None | |||
# If true, '()' will be appended to :func: etc. cross-reference text. | |||
# add_function_parentheses = True | |||
# If true, the current module name will be prepended to all description | |||
# unit titles (such as .. function::). | |||
add_module_names = False | |||
# If true, sectionauthor and moduleauthor directives will be shown in the | |||
# output. They are ignored by default. | |||
show_authors = False | |||
# The name of the Pygments (syntax highlighting) style to use. | |||
pygments_style = 'sphinx' | |||
# openstackdocstheme options | |||
repository_name = 'openstack/qinling' | |||
bug_project = 'qinling' | |||
bug_tag = 'api-ref' | |||
# -- Options for man page output ---------------------------------------------- | |||
# Grouping the document tree for man pages. | |||
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual' | |||
# -- Options for HTML output -------------------------------------------------- | |||
# The theme to use for HTML and HTML Help pages. Major themes that come with | |||
# Sphinx are currently 'default' and 'sphinxdoc'. | |||
# html_theme_path = ["."] | |||
# html_theme = '_theme' | |||
# Theme options are theme-specific and customize the look and feel of a theme | |||
# further. For a list of options available for each theme, see the | |||
# documentation. | |||
# html_theme_options = {} | |||
# Add any paths that contain custom themes here, relative to this directory. | |||
# html_theme_path = [] | |||
# The name for this set of Sphinx documents. If None, it defaults to | |||
# "<project> v<release> documentation". | |||
# html_title = None | |||
# A shorter title for the navigation bar. Default is the same as html_title. | |||
# html_short_title = None | |||
# The name of an image file (relative to this directory) to place at the top | |||
# of the sidebar. | |||
# html_logo = None | |||
# The name of an image file (within the static path) to use as favicon of the | |||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | |||
# pixels large. | |||
# html_favicon = None | |||
# Add any paths that contain custom static files (such as style sheets) here, | |||
# relative to this directory. They are copied after the builtin static files, | |||
# so a file named "default.css" will overwrite the builtin "default.css". | |||
# html_static_path = ['_static'] | |||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | |||
# using the given strftime format. | |||
# html_last_updated_fmt = '%b %d, %Y' | |||
html_last_updated_fmt = '%Y-%m-%d %H:%M' | |||
# If true, SmartyPants will be used to convert quotes and dashes to | |||
# typographically correct entities. | |||
# html_use_smartypants = True | |||
# Custom sidebar templates, maps document names to template names. | |||
# html_sidebars = {} | |||
# Additional templates that should be rendered to pages, maps page names to | |||
# template names. | |||
# html_additional_pages = {} | |||
# If false, no module index is generated. | |||
# html_use_modindex = True | |||
# If false, no index is generated. | |||
# html_use_index = True | |||
# If true, the index is split into individual pages for each letter. | |||
# html_split_index = False | |||
# If true, links to the reST sources are added to the pages. | |||
# html_show_sourcelink = True | |||
# If true, an OpenSearch description file will be output, and all pages will | |||
# contain a <link> tag referring to it. The value of this option must be the | |||
# base URL from which the finished HTML is served. | |||
# html_use_opensearch = '' | |||
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). | |||
# html_file_suffix = '' | |||
# Output file base name for HTML help builder. | |||
htmlhelp_basename = 'qinlingdoc' | |||
# -- Options for LaTeX output ------------------------------------------------- | |||
# The paper size ('letter' or 'a4'). | |||
# latex_paper_size = 'letter' | |||
# The font size ('10pt', '11pt' or '12pt'). | |||
# latex_font_size = '10pt' | |||
# Grouping the document tree into LaTeX files. List of tuples | |||
# (source start file, target name, title, author, documentclass | |||
# [howto/manual]). | |||
latex_documents = [ | |||
('index', 'Qinling.tex', | |||
u'OpenStack Function Engine API Documentation', | |||
u'OpenStack Foundation', 'manual'), | |||
] | |||
# The name of an image file (relative to this directory) to place at the top of | |||
# the title page. | |||
# latex_logo = None | |||
# For "manual" documents, if this is true, then toplevel headings are parts, | |||
# not chapters. | |||
# latex_use_parts = False | |||
# Additional stuff for the LaTeX preamble. | |||
# latex_preamble = '' | |||
# Documents to append as an appendix to all manuals. | |||
# latex_appendices = [] | |||
# If false, no module index is generated. | |||
# latex_use_modindex = True |
@ -0,0 +1,304 @@ | |||
.. -*- rst -*- | |||
=========== | |||
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 | |||
==================== | |||
.. rest_method:: POST /v1/executions | |||
Create an execution. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 201 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: function_id | |||
- input: execution_input | |||
- description: execution_description | |||
- function_version: execution_version | |||
- sync: execution_sync | |||
Request Example | |||
--------------- | |||
.. literalinclude:: samples/executions/create-execution-request.json | |||
:language: javascript | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- function_id: function_id | |||
- input: execution_input | |||
- description: execution_description | |||
- function_version: execution_version | |||
- sync: execution_sync | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/executions/create-execution-response.json | |||
:language: javascript | |||
List executions | |||
=============== | |||
.. rest_method:: GET /v1/executions | |||
List executions. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- function_id: function_id | |||
- input: execution_input | |||
- description: execution_description | |||
- function_version: execution_version | |||
- sync: execution_sync | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/executions/list-executions-response.json | |||
:language: javascript | |||
List executions by filters | |||
========================== | |||
.. rest_method:: GET /v1/executions?{filter}={function_id} | |||
List executions by filters.. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- filter: path_execution_filter | |||
- function_id: path_function_id | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- function_id: function_id | |||
- input: execution_input | |||
- description: execution_description | |||
- function_version: execution_version | |||
- sync: execution_sync | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/executions/list-executions-filters-response.json | |||
:language: javascript | |||
Show an execution | |||
================= | |||
.. rest_method:: GET /v1/executions/{execution_id} | |||
Show an execution. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- execution_id: path_execution_id | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- function_id: function_id | |||
- input: execution_input | |||
- description: execution_description | |||
- function_version: execution_version | |||
- sync: execution_sync | |||
- project_id: project_id | |||
- status: status | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/executions/show-execution-response.json | |||
:language: javascript | |||
Show an execution log | |||
===================== | |||
.. rest_method:: GET /v1/executions/{execution_id}/log | |||
Show an execution log. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- execution_id: path_execution_id | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/executions/show-execution-log-response.json | |||
:language: javascript | |||
Delete an execution | |||
=================== | |||
.. rest_method:: DELETE /v1/executions/{execution_id} | |||
Delete an execution. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 204 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- execution_id: path_execution_id | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/executions/delete-execution-response.text | |||
:language: text |
@ -0,0 +1,524 @@ | |||
.. -*- rst -*- | |||
========== | |||
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 | |||
================= | |||
.. rest_method:: POST /v1/functions | |||
Create a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 201 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- name: function_name | |||
- description: function_description | |||
- runtime_id: function_runtime_id | |||
- code: function_code | |||
- entry: function_entry | |||
- cpu: function_cpu | |||
- memory: function_memory | |||
- timeout: function_timeout | |||
- package: function_package | |||
Request Example | |||
--------------- | |||
Package | |||
####### | |||
.. literalinclude:: samples/functions/create-function-package-request.json | |||
:language: javascript | |||
.. literalinclude:: samples/functions/create-function-package-curl-request.text | |||
:language: text | |||
Swift | |||
##### | |||
.. literalinclude:: samples/functions/create-function-swift-request.json | |||
:language: javascript | |||
Image | |||
##### | |||
.. literalinclude:: samples/functions/create-function-image-request.json | |||
:language: javascript | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: function_name | |||
- description: function_description | |||
- runtime_id: function_runtime_id | |||
- code: function_code | |||
- entry: function_entry | |||
- cpu: function_cpu | |||
- memory: function_memory | |||
- timeout: function_timeout | |||
- package: function_package | |||
- latest_version: function_latest_version | |||
- count: function_count | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
Package | |||
####### | |||
.. literalinclude:: samples/functions/create-function-package-response.json | |||
:language: javascript | |||
Swift | |||
##### | |||
.. literalinclude:: samples/functions/create-function-swift-response.json | |||
:language: javascript | |||
Image | |||
##### | |||
.. literalinclude:: samples/functions/create-function-image-response.json | |||
:language: javascript | |||
List functions | |||
============== | |||
.. rest_method:: GET /v1/functions | |||
List functions. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: function_name | |||
- description: function_description | |||
- runtime_id: function_runtime_id | |||
- code: function_code | |||
- count: function_count | |||
- cpu: function_cpu | |||
- memory: function_memory | |||
- entry: function_entry | |||
- timeout: function_timeout | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/list-functions-response.json | |||
:language: javascript | |||
Show a function | |||
=============== | |||
.. rest_method:: GET /v1/functions/{function_id} | |||
Show a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: function_name | |||
- description: function_description | |||
- runtime_id: function_runtime_id | |||
- code: function_code | |||
- count: function_count | |||
- cpu: function_cpu | |||
- memory: function_memory | |||
- entry: function_entry | |||
- timeout: function_timeout | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/show-function-response.json | |||
:language: javascript | |||
Update a function | |||
================= | |||
.. rest_method:: PUT /v1/functions/{function_id} | |||
Update a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
- name: function_name_update | |||
- description: function_description | |||
- runtime_id: function_runtime_id_update | |||
- code: function_code_update | |||
- entry: function_entry_update | |||
- cpu: function_cpu | |||
- memory: function_memory | |||
- timeout: function_timeout | |||
- package: function_package | |||
- count: function_count | |||
Request Example | |||
--------------- | |||
Package | |||
####### | |||
.. literalinclude:: samples/functions/update-function-package-request.json | |||
:language: javascript | |||
.. literalinclude:: samples/functions/update-function-package-curl-request.text | |||
:language: text | |||
Swift | |||
##### | |||
.. literalinclude:: samples/functions/update-function-swift-request.json | |||
:language: javascript | |||
Image | |||
##### | |||
It is not possible to update an ``image`` function. | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: function_name | |||
- description: function_description | |||
- runtime_id: function_runtime_id | |||
- code: function_code | |||
- count: function_count | |||
- cpu: function_cpu | |||
- memory: function_memory | |||
- entry: function_entry | |||
- timeout: function_timeout | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
Package | |||
####### | |||
.. literalinclude:: samples/functions/update-function-package-response.json | |||
:language: javascript | |||
Swift | |||
##### | |||
.. literalinclude:: samples/functions/update-function-swift-response.json | |||
:language: javascript | |||
Image | |||
##### | |||
None | |||
Download a function | |||
=================== | |||
.. rest_method:: GET /v1/functions/{function_id}?download=true | |||
Download a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/download-function-response.text | |||
:language: text | |||
Detach a function from a worker | |||
=============================== | |||
.. rest_method:: POST /v1/functions/{function_id}/detach | |||
Detach a function from a worker. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 202 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/detach-function-response.text | |||
:language: text | |||
Scale up a function | |||
=================== | |||
.. rest_method:: POST /v1/functions/{function_id}/scale_up | |||
Scale up a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 202 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
- count: function_scale_count_up | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/scaleup-function-response.text | |||
:language: text | |||
Scale down a function | |||
===================== | |||
.. rest_method:: POST /v1/functions/{function_id}/scale_down | |||
Scale down a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 202 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
- count: function_scale_count_down | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/scaledown-function-response.text | |||
:language: text | |||
Delete a function | |||
================= | |||
.. rest_method:: DELETE /v1/functions/{function_id} | |||
Delete a function. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 204 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- function_id: path_function_id | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/functions/delete-function-response.text | |||
:language: text |
@ -0,0 +1,17 @@ | |||
:tocdepth: 2 | |||
==================== | |||
Function Engine API | |||
==================== | |||
.. rest_expand_all:: | |||
.. include:: urls.inc | |||
.. include:: api-versions.inc | |||
.. include:: runtimes.inc | |||
.. include:: functions.inc | |||
.. include:: executions.inc | |||
.. include:: versions.inc | |||
.. include:: aliases.inc | |||
.. include:: webhooks.inc | |||
.. include:: jobs.inc |
@ -0,0 +1,275 @@ | |||
.. -*- rst -*- | |||
===== | |||
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 | |||
============ | |||
.. rest_method:: POST /v1/jobs | |||
Create a job. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 201 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- name: job_name | |||
- function_id: function_id | |||
- function_version: job_version | |||
- function_input: job_input | |||
- pattern: job_pattern | |||
- count: job_count | |||
Request Example | |||
--------------- | |||
.. literalinclude:: samples/jobs/create-job-request.json | |||
:language: javascript | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: job_name | |||
- function_id: function_id | |||
- function_version: job_version | |||
- function_input: job_input | |||
- pattern: job_pattern | |||
- count: job_count | |||
- first_execution_time: job_first_execution | |||
- next_execution_time: job_next_execution | |||
- status: status | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/jobs/create-job-response.json | |||
:language: javascript | |||
List jobs | |||
========= | |||
.. rest_method:: GET /v1/jobs | |||
List jobs. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: job_name | |||
- function_id: function_id | |||
- function_version: job_version | |||
- function_input: job_input | |||
- pattern: job_pattern | |||
- count: job_count | |||
- first_execution_time: job_first_execution | |||
- next_execution_time: job_next_execution | |||
- status: status | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/jobs/list-jobs-response.json | |||
:language: javascript | |||
Show a job | |||
========== | |||
.. rest_method:: GET /v1/jobs/{job_id} | |||
Show a job. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 200 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- job_id: path_job_id | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: job_name | |||
- function_id: function_id | |||
- function_version: job_version | |||
- function_input: job_input | |||
- pattern: job_pattern | |||
- count: job_count | |||
- first_execution_time: job_first_execution | |||
- next_execution_time: job_next_execution | |||
- status: status | |||
- project_id: project_id | |||
- created_at: created_at | |||
- updated_at: updated_at | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/jobs/show-job-response.json | |||
:language: javascript | |||
Update a job | |||
============ | |||
.. rest_method:: PUT /v1/jobs/{job_id} | |||
Update a job. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 202 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- job_id: path_job_id | |||
Response Parameters | |||
------------------- | |||
.. rest_parameters:: parameters.yaml | |||
- id: id | |||
- name: job_name | |||
- function_input: job_input | |||
- pattern: job_pattern_update | |||
- next_execution_time: job_next_execution_update | |||
- status: job_status_update | |||
Request Example | |||
--------------- | |||
.. literalinclude:: samples/jobs/update-job-request.json | |||
:language: javascript | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/jobs/update-job-response.json | |||
:language: javascript | |||
Delete a job | |||
============ | |||
.. rest_method:: DELETE /v1/jobs/{job_id} | |||
Delete a job. | |||
Response Codes | |||
-------------- | |||
.. rest_status_code:: success status.yaml | |||
- 204 | |||
.. rest_status_code:: error status.yaml | |||
- 400 | |||
- 401 | |||
- 403 | |||
Request | |||
------- | |||
.. rest_parameters:: parameters.yaml | |||
- x-auth-token: x-auth-token | |||
- job_id: path_job_id | |||
Response Parameters | |||
------------------- | |||
None | |||
Response Example | |||
---------------- | |||
.. literalinclude:: samples/jobs/delete-job-response.text | |||
:language: text |
@ -0,0 +1,472 @@ | |||
#################### | |||
# Header Variables # | |||
#################### | |||
x-auth-token: | |||
description: | | |||
Token used to identify the user from Keystone | |||
in: header | |||
required: false | |||
type: string | |||
#################### | |||
# Path Variables # | |||
#################### | |||
path_alias_name: | |||
description: | | |||
Name of the alias | |||
in: path | |||
required: true | |||
type: string | |||
path_execution_filter: | |||
description: | | |||
Execution filter, e.g. "``function_id``, ``function_version``, etc..." | |||
in: path | |||
required: true | |||
type: string | |||
path_execution_id: | |||
description: | | |||
ID for the execution | |||
in: path | |||
required: true | |||
type: uuid | |||
path_function_id: | |||
description: | | |||
ID for the function | |||
in: path | |||
required: true | |||
type: uuid | |||
path_job_id: | |||
description: | | |||
ID for the job | |||
in: path | |||
required: true | |||
type: uuid | |||
path_runtime_id: | |||
description: | | |||
ID for the runtime | |||
in: path | |||
required: true | |||
type: uuid | |||
path_version_number: | |||