All URIs are relative to https://api.waylay.io
Method | HTTP request | Description |
---|---|---|
create | POST /registry/v2/plugs/ | Create Plug |
delete_asset | DELETE /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Delete Plug Asset |
get_archive | GET /registry/v2/plugs/{name}/versions/{version}/content | Get Plug Archive |
get_asset | GET /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Get File From Plug Archive |
get_latest | GET /registry/v2/plugs/{name} | Get Latest Plug Version |
get | GET /registry/v2/plugs/{name}/versions/{version} | Get Plug Version |
jobs | GET /registry/v2/plugs/{name}/versions/{version}/jobs | List Plug Jobs |
list | GET /registry/v2/plugs/ | List Plugs |
list_versions | GET /registry/v2/plugs/{name}/versions | List Plug Versions |
patch_interface | PATCH /registry/v2/plugs/{name}/versions/{version}/interface | Patch Plug Interface |
patch_metadata | PATCH /registry/v2/plugs/{name}/versions/{version}/metadata | Patch Plug Metadata |
protect | POST /registry/v2/plugs/{name}/versions/{version}/protect | Protect Plug Version |
protect_versions | POST /registry/v2/plugs/{name}/protect | Protect Plug |
publish | POST /registry/v2/plugs/{name}/versions/{version}/publish | Publish Draft Plug |
rebuild | POST /registry/v2/plugs/{name}/versions/{version}/rebuild | Rebuild Plug |
remove_version | DELETE /registry/v2/plugs/{name}/versions/{version} | Remove Plug Version |
remove_versions | DELETE /registry/v2/plugs/{name} | Remove Plug |
update_asset | PUT /registry/v2/plugs/{name}/versions/{version}/content/{wildcard} | Update Plug Asset |
update_assets | PUT /registry/v2/plugs/{name}/versions/{version}/content | Update Plug Assets |
verify | POST /registry/v2/plugs/{name}/versions/{version}/verify | Verify Health Of Plug |
create( query: CreateQuery, files, headers ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2
Create Plug
Creates a new plug function by uploading its assets. The assets for a plug function can be provided as
- A single tar archive (optionally compressed), with one of the content types
application/octet-stream
,application/tar
,application/tar+gzip
,application/x-gzip
,application/x-tar
,application/gzip
- Separate files in a
multipart/form-data
request - A reference to the assets of another plug in the
copy
argument
plug.json
json file contains the function metadata, and must have a runtime
attribute that is one of the supported runtimes (see GET /registry/v2/runtimes?functionType=plugs
). For each runtime other files will be required or supported.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2
try:
# Create Plug
# calls `POST /registry/v2/plugs/`
api_response = await waylay_client.registry.plugs.create(
# query parameters:
query = {
'deploy': True
'scaleToZero': False
'deprecatePrevious': waylay.services.registry.DeprecatePreviousPolicy()
'dryRun': True
'async': True
'draft': False
},
# json data: use a generated model or a json-serializable python data structure (dict, list)
json = None # bytearray | The assets for a <em>plug</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>plug</em> in the <code>copy</code> argument</li> </ul> The required <code>plug.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=plugs</code>). For each <em>runtime</em> other files will be required or supported. (optional)
# non-json binary data: use a byte array or a generator of bytearray chuncks
content=b'my-binary-data',
# this operation supports multiple request content types: use `headers` to specify the one used
# alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data', 'application/json', '*/*+json',
headers = {
'content-type': 'application/octet-stream'
},
)
print("The response of registry.plugs.create:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.create: %s\n" % e)
POST /registry/v2/plugs/
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
json | bytearray | json request body | The assets for a <em>plug</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>plug</em> in the <code>copy</code> argument</li> </ul> The required <code>plug.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=plugs</code>). For each <em>runtime</em> other files will be required or supported. | [optional] |
content | ContentRequest | binary request body | The assets for a <em>plug</em> function can be provided as <ul> <li>A single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>Separate files in a <code>multipart/form-data</code> request</li> <li>A reference to the assets of another <em>plug</em> in the <code>copy</code> argument</li> </ul> The required <code>plug.json</code> json file contains the function metadata, and must have a <code>runtime</code> attribute that is one of the supported <em>runtime</em>s (see <code>GET /registry/v2/runtimes?functionType=plugs</code>). For each <em>runtime</em> other files will be required or supported. | [optional] |
files | FileTypes | request body files | ||
query | QueryParamTypes | None | URL query parameter | ||
query['deploy'] (dict) query.deploy (Query) |
bool | query parameter "deploy" |
Indicates that a function should be deployed when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an asset update or rebuild to initiate a build and deploy at a later stage. | [optional] [default True] |
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['scaleToZero'] (dict) query.scale_to_zero (Query) |
bool | query parameter "scaleToZero" |
If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] |
query['deprecatePrevious'] (dict) query.deprecate_previous (Query) |
DeprecatePreviousPolicy | query parameter "deprecatePrevious" |
Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] |
query['dryRun'] (dict) query.dry_run (Query) |
bool | query parameter "dryRun" |
If set to <code>true</code>, validates the deployment conditions, but does not change anything. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
query['version'] (dict) query.version (Query) |
SemanticVersionRange | query parameter "version" |
If set, the function version will be an increment of the latest existing version that satisfies the `version` range. Note that this increment always takes precedence over an explicit `version` in the function manifest. | [optional] |
query['name'] (dict) query.name (Query) |
str | query parameter "name" |
If set, the value will be used as the function name instead of the one specified in the manifest. | [optional] |
query['draft'] (dict) query.draft (Query) |
bool | query parameter "draft" |
If set, the created function will be a draft function and its assets are still mutable. A build and deploy is initiated only in the case when all necessary assets are present and valid. | [optional] [default False] |
query['runtime'] (dict) query.runtime (Query) |
str | query parameter "runtime" |
If set, the created function will use the indicated runtime (latest version within specified range). This takes precedence over the runtime specified in a function manifest (copied or from request body). | [optional] |
query['copy'] (dict) query.copy_from (Query) |
CreateWebscriptsCopyParameter | query parameter "copy" |
Indicates the source of initial assets for a new function. When using this query parameter, the request body does not need to contain assets, but any assets in the request body will overwrite the copied assets. #### Selection of assets source * If set as `<sourceName>[@<sourceVersionRange>]`, the new function will be created with copied assets of the selected source function. * If set as `!example`, a `runtime` query parameter is required, and the new function will be initialized with assets of the runtime example. #### Selection of the source function When `<sourceVersionRange>` is a range (or is not given), the latest published version (in that range) is used. If no published version exists, the latest draft is selected. If no versions in the range exist, a `404` Not Found error is returned. #### The `name` of the new function If a `name` is NOT specified (either as query parameter, or in an optional manifest asset in the request body), the `name` of the new function will be that of the source function. #### The `version` of the new function When the target and source name are equal, the `version` query parameters is defaulted to `<sourceVersionRange>` (`~<sourceVersionRange>` when it's an exact version) The version of the new function will be: * If a `version` is NOT specified (either as query parameter, in an optional manifest asset, or as `<sourceVersionRange>` default) * a patch increment (`<major>.<minor>.<patch>+1`) of the latest existing version with the target `name` * `1.0.0` otherwise * If a `version` is specified: * the lowest version in that range if no existing version is in that range. * an increment of the latest existing version, at the highest level (major,minor,patch) allowed by that range. * otherwise, if all allowed versions already exist, a `409` Duplicate error is raised. #### Deployment overrides The new function will use the deployment overrides of the copied function, unless a manifest was specified in the request body. | [optional] |
headers | HeaderTypes | request headers | ||
headers['content-type'] | str | content type | request header "content-type" |
should match mediaType application/octet-stream , application/tar , application/tar+gzip , application/x-gzip , application/x-tar , application/gzip , multipart/form-data , application/json , */*+json |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 |
PostPlugJobSyncResponseV2 PostPlugJobAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data, application/json, /+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Default Response | - |
202 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_asset( name: str, version: str, wildcard: str, query: DeleteAssetQuery, headers ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2
Delete Plug Asset
Delete an asset from the plug's collection of existing assets.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2
try:
# Delete Plug Asset
# calls `DELETE /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}`
api_response = await waylay_client.registry.plugs.delete_asset(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
'wildcard_example', # wildcard | path param "wildcard"
# query parameters:
query = {
'scaleToZero': False
'deploy': True
'chown': False
'async': True
},
)
print("The response of registry.plugs.delete_asset:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.delete_asset: %s\n" % e)
DELETE /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
wildcard | str | path parameter "wildcard" |
Full path or path prefix of the asset within the archive | |
query | QueryParamTypes | None | URL query parameter | ||
query['scaleToZero'] (dict) query.scale_to_zero (Query) |
bool | query parameter "scaleToZero" |
If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] |
query['deploy'] (dict) query.deploy (Query) |
bool | query parameter "deploy" |
Indicates that a function should be deployed when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an asset update or rebuild to initiate a build and deploy at a later stage. | [optional] [default True] |
query['chown'] (dict) query.chown (Query) |
bool | query parameter "chown" |
If set, ownership of a draft function is transferred to the current user. | [optional] [default False] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 |
PostPlugJobSyncResponseV2 PostPlugJobAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Default Response | - |
202 | Default Response | - |
403 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_archive( name: str, version: str, query: GetArchiveQuery, headers ) -> bytearray
Get Plug Archive
Get the specification archive of a plug.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
try:
# Get Plug Archive
# calls `GET /registry/v2/plugs/{name}/versions/{version}/content`
api_response = await waylay_client.registry.plugs.get_archive(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'ls': False
},
)
print("The response of registry.plugs.get_archive:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.get_archive: %s\n" % e)
GET /registry/v2/plugs/{name}/versions/{version}/content
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['ls'] (dict) query.ls (Query) |
bool | query parameter "ls" |
If set to `true`, the result will be a listing of the files in the asset, annotated with metadata and validation report from the asset conditions of the functions runtime. | [optional] [default False] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | bytearray |
||
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_asset( name: str, version: str, wildcard: str, query: GetAssetQuery, headers ) -> bytearray
Get File From Plug Archive
Get a file from the specification archive of a plug.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
try:
# Get File From Plug Archive
# calls `GET /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}`
api_response = await waylay_client.registry.plugs.get_asset(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
'wildcard_example', # wildcard | path param "wildcard"
# query parameters:
query = {
'ls': False
},
)
print("The response of registry.plugs.get_asset:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.get_asset: %s\n" % e)
GET /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
wildcard | str | path parameter "wildcard" |
Full path or path prefix of the asset within the archive | |
query | QueryParamTypes | None | URL query parameter | ||
query['ls'] (dict) query.ls (Query) |
bool | query parameter "ls" |
If set to `true`, the result will be a listing of the files in the asset, annotated with metadata and validation report from the asset conditions of the functions runtime. | [optional] [default False] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | bytearray |
||
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_latest( name: str, query: GetLatestQuery, headers ) -> GetPlugResponseV2
Get Latest Plug Version
Fetch the latest version of a plug. By default, the result shows the latest non-deprecated, non-draft version. If there is no such version, the latest deprecated or the latest draft version is returned, with the former taking precedence. Use the boolean query parameters includeDeprecated
or includeDraft
to change this behaviour:
includeDeprecated=true
: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.includeDraft=true
: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponseV2
from waylay.services.registry.models.plug_type import PlugType
try:
# Get Latest Plug Version
# calls `GET /registry/v2/plugs/{name}`
api_response = await waylay_client.registry.plugs.get_latest(
'name_example', # name | path param "name"
# query parameters:
query = {
'type': 'sensor'
'showTags': 'embed'
'includeDraft': True
'includeDeprecated': True
},
)
print("The response of registry.plugs.get_latest:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.get_latest: %s\n" % e)
GET /registry/v2/plugs/{name}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['type'] (dict) query.type (Query) |
PlugType | query parameter "type" |
If set, filters on the type of plug. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['includeDraft'] (dict) query.include_draft (Query) |
bool | query parameter "includeDraft" |
Configures the inclusion of draft versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are included. If set to `false`, draft versions are excluded. | [optional] |
query['includeDeprecated'] (dict) query.include_deprecated (Query) |
bool | query parameter "includeDeprecated" |
Configures the inclusion of deprecated versions when selecting latest versions per name. By default, deprecated versions are only considered when no other versions are available. If set to `true`, deprecated versions are included. If set to `false`, deprecated versions are excluded. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | GetPlugResponseV2 |
GetPlugResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json, text/html
Status code | Description | Response headers |
---|---|---|
200 | Plug Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get( name: str, version: str, query: GetQuery, headers ) -> GetPlugResponseV2
Get Plug Version
Get a specific version of a plug.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponseV2
try:
# Get Plug Version
# calls `GET /registry/v2/plugs/{name}/versions/{version}`
api_response = await waylay_client.registry.plugs.get(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'showTags': 'embed'
},
)
print("The response of registry.plugs.get:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.get: %s\n" % e)
GET /registry/v2/plugs/{name}/versions/{version}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | GetPlugResponseV2 |
GetPlugResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json, text/html
Status code | Description | Response headers |
---|---|---|
200 | Plug Version Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
jobs( name: str, version: str, query: JobsQuery, headers ) -> JobsForPlugResponseV2
List Plug Jobs
List the ongoing and completed operations on a specific plug.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.function_type import FunctionType
from waylay.services.registry.models.job_state_result import JobStateResult
from waylay.services.registry.models.job_type_schema import JobTypeSchema
from waylay.services.registry.models.jobs_for_plug_response_v2 import JobsForPlugResponseV2
try:
# List Plug Jobs
# calls `GET /registry/v2/plugs/{name}/versions/{version}/jobs`
api_response = await waylay_client.registry.plugs.jobs(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
},
)
print("The response of registry.plugs.jobs:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.jobs: %s\n" % e)
GET /registry/v2/plugs/{name}/versions/{version}/jobs
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['limit'] (dict) query.limit (Query) |
float | query parameter "limit" |
The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] |
query['type'] (dict) query.type (Query) |
List[JobTypeSchema] | query parameter "type" |
Filter on job type | [optional] |
query['state'] (dict) query.state (Query) |
List[JobStateResult] | query parameter "state" |
Filter on job state | [optional] |
query['functionType'] (dict) query.function_type (Query) |
List[FunctionType] | query parameter "functionType" |
Filter on function type | [optional] |
query['createdBefore'] (dict) query.created_before (Query) |
TimestampSpec | query parameter "createdBefore" |
Filter on jobs that created before the given timestamp or age | [optional] |
query['createdAfter'] (dict) query.created_after (Query) |
TimestampSpec | query parameter "createdAfter" |
Filter on jobs that created after the given timestamp or age | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | JobsForPlugResponseV2 |
JobsForPlugResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list( query: ListQuery, headers ) -> LatestPlugsResponseV2
List Plugs
List the (latest) versions of available plugs. ### List Latest Plug Versions By default, the result includes the latest non-deprecated, non-draft version for each plug name. If there is no such version, the latest deprecated or the latest draft version is included, with the former taking precedence. Use the boolean query parameters includeDeprecated
or includeDraft
to change this behaviour:
includeDeprecated=true
: do not prefer non-deprecated versions as a latest version: if the latest version is a deprecated one, it will be shown, even if there are older non-deprecated versions.includeDraft=true
: do not prefer non-draft versions as a latest version: if the latest version is a draft, it will be shown, even if there are older non-draft versions.
entities[]._links.draft
) or latest published (entities[]._links.published
) version (if existing and different). Use the query parameter showRelated
to include only a link (default showRelated=link
) or a full representation (showRelated=embed
). ### List Latest Plug Versions (with filter) When any of the version filter query parameters are used, the response contains the latest version per named plug that satisfy the filters, but without links. ### List All Plug Versions When using latest=false
(default when using the namedVersion
filter), the listing contains all plugs versions that satisfy the query, possibly multiple versions per named plugs. No HAL links are provided. #### Filter on status By default plug versions with status undeployed
are excluded in all cases. Use the version filter status
to include/exclude a status from the results. By example, > ?status=any&includeDeprecated=true&includeDraft=true&latest=false
will list ALL versions known to the function registry. #### Version filter parameters The following query parameters are version filters for the plug listing: > version
, status
, runtimeVersion
, createdBy
, createdBefore
, createdAfter
, updatedBy
, updatedBefore
, updatedAfter
, nameVersion
, deprecated
, draft
, tags
, wql
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.archive_format_filter import ArchiveFormatFilter
from waylay.services.registry.models.latest_plugs_response_v2 import LatestPlugsResponseV2
from waylay.services.registry.models.plug_type import PlugType
from waylay.services.registry.models.status_filter import StatusFilter
try:
# List Plugs
# calls `GET /registry/v2/plugs/`
api_response = await waylay_client.registry.plugs.list(
# query parameters:
query = {
'type': 'sensor'
'includeDraft': True
'includeDeprecated': True
'deprecated': True
'draft': True
'showTags': 'embed'
'createdBy': '@me'
'updatedBy': '@me'
'latest': True
},
)
print("The response of registry.plugs.list:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.list: %s\n" % e)
GET /registry/v2/plugs/
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
query | QueryParamTypes | None | URL query parameter | ||
query['type'] (dict) query.type (Query) |
PlugType | query parameter "type" |
If set, filters on the type of plug. | [optional] |
query['limit'] (dict) query.limit (Query) |
float | query parameter "limit" |
The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] |
query['page'] (dict) query.page (Query) |
float | query parameter "page" |
The number of pages to skip when returning result to this query. | [optional] |
query['includeDraft'] (dict) query.include_draft (Query) |
bool | query parameter "includeDraft" |
Configures the inclusion of draft versions when selecting latest versions per name. By default, draft versions are only considered when no other versions are available. If set to `true`, draft versions are included. If set to `false`, draft versions are excluded. | [optional] |
query['includeDeprecated'] (dict) query.include_deprecated (Query) |
bool | query parameter "includeDeprecated" |
Configures the inclusion of deprecated versions when selecting latest versions per name. By default, deprecated versions are only considered when no other versions are available. If set to `true`, deprecated versions are included. If set to `false`, deprecated versions are excluded. | [optional] |
query['deprecated'] (dict) query.deprecated (Query) |
bool | query parameter "deprecated" |
Filter on the deprecation status of the function. | [optional] |
query['draft'] (dict) query.draft (Query) |
bool | query parameter "draft" |
Filter on the draft status of the function. | [optional] |
query['nameVersion'] (dict) query.name_version (Query) |
List[str] | query parameter "nameVersion" |
Filter on exact `{name}@{version}` functions. Using this filter implies a `latest=false` default, returning multiple versions of the same named versions if they are filtered. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['tags'] (dict) query.tags (Query) |
TagsFilter | query parameter "tags" |
Filter on the tags of the item. Can be a single tag, or a list of tags. When multiple tags are specified, an item must have all of the tags to be selected. | [optional] |
query['wql'] (dict) query.wql (Query) |
str | query parameter "wql" |
Query filter using the 'wql' query language. This is a unstable preview feature, currently supporting the following match terms: * `tag:<name>` entity has a tag that fully matches `<name>` (case insensitive). * `tag:<name1>,<name2>` entity has a tag that fully matches any of `<name1>`, `<name2>` (case insensitive). * `tag:inIgnoreCase(<name1>,<name2>)` is the fully specified format for the previous statements. `inIgnoreCase` is the default match predicate. * `tag:in(<name1>,<name2>)` entity has a tag matches one of `<name1>`,`<name2>` (case sensitive) * `tag:equals(<name>)` entity has a tag matches `<name>` (case sensitive) * `tag:like(<pattern>)` entity has a tag that matches `<pattern>` (case insensitive), where `<pattern>` can contain `` (multiple characters) and `?` (single character) wildcards. Each argument of a match term (like `<name>` above) can either be a * a quoted match argument, quoted using `"`, can contain any character except `"`: `tag:"Status:In Review"`. * a safe match argument can only contain alpha-numeric characters or `_`: `tag:Status_In_Review`. Multiple _match term_s can be combined in a boolean predicate using the `AND`, `OR` and `NOT` operators: * `tag:abc AND tag:"My Demo" AND tag:like("prj:")`: entity has a tag matching `abc` AND a tag matching `"My Demo"` AND a tag that has the `prj:` prefix * `tag:abc tag:"My Demo" tag:like("prj:")`: same as the previous statement: a (space-deliminated) list of terms is implicitly combined with `AND`. * `tag:abc OR tag:"My Demo"`: entity has a tag matching `abc` OR a tag matching `"My Demo"` * `NOT tag:abc`: entity does not have a tag matching `abc` Round brackets can be used to combine predicates with different operators: * `(tag:abc OR tag:"My Demo") AND tag:like("prj:")`: entity has a tag `abc` or a tag `My Demo`, and a tag with prefix `prj:` For a multi-valued attribute like `tag`, each match term tests the existence of a matching tag assigned to the entity. When multiple match predicates on the same tag need to be specified, the boolean operators `not`, `all`, `any` can be used within the match term: * `tag:all(like("prj:"),not(like(":Done")))`: entity has a tag that starts with `prj:` and does NOT end with `:Done`. * `tag:not(Done)`: entity has a tag that does not match `Done` (this excludes entities without tags, and with a single `Done` tag!). * `NOT tag:not(in(abc,def))`: each tag of the entity is in `abc` or `def` (matches entities without tags!) * `tag:any(like("prj:"),not(done)))`: entity has a tag that either starts with `prj:` or does not match `done`. | [optional] |
query['version'] (dict) query.version (Query) |
str | query parameter "version" |
Filter on the version of the function (case-sensitive, supports wildcards). | [optional] |
query['status'] (dict) query.status (Query) |
List[StatusFilter] | query parameter "status" |
Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes undeployed functions. | [optional] |
query['runtimeVersion'] (dict) query.runtime_version (Query) |
SemanticVersionRange | query parameter "runtimeVersion" |
Filter on the runtime version. | [optional] |
query['createdBy'] (dict) query.created_by (Query) |
str | query parameter "createdBy" |
Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs. | [optional] |
query['updatedBy'] (dict) query.updated_by (Query) |
str | query parameter "updatedBy" |
Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs. | [optional] |
query['createdBefore'] (dict) query.created_before (Query) |
TimestampSpec | query parameter "createdBefore" |
Filter on funtions that were created before the given timestamp or age. | [optional] |
query['createdAfter'] (dict) query.created_after (Query) |
TimestampSpec | query parameter "createdAfter" |
Filter on funtions that were created after the given timestamp or age. | [optional] |
query['updatedBefore'] (dict) query.updated_before (Query) |
TimestampSpec | query parameter "updatedBefore" |
Filter on funtions that were updated before the given timestamp or age. | [optional] |
query['updatedAfter'] (dict) query.updated_after (Query) |
TimestampSpec | query parameter "updatedAfter" |
Filter on funtions that were updated after the given timestamp or age. | [optional] |
query['name'] (dict) query.name (Query) |
str | query parameter "name" |
Filter on the name of the function. This is case-insensitive and supports wild-cards `?` (any one character) and `*` (any sequence of characters). | [optional] |
query['archiveFormat'] (dict) query.archive_format (Query) |
List[ArchiveFormatFilter] | query parameter "archiveFormat" |
Filter on the archive format of the function. | [optional] |
query['runtime'] (dict) query.runtime (Query) |
List[str] | query parameter "runtime" |
Filter on the runtime of the function. | [optional] |
query['latest'] (dict) query.latest (Query) |
bool | query parameter "latest" |
When `true`, only the latest version per function name is returned. If set to `false`, multiple versions per named function can be returned. Defaults to `true`, except when specific versions are selected with the `nameVersion` filter. | [optional] |
query['showRelated'] (dict) query.show_related (Query) |
ShowLinkOrEmbedding | query parameter "showRelated" |
Sets the representation of related function versions (like the latest draft and/or published) in the response. Ignored (forced to `none`) when any of the version filter query params are used. - `embed`: as full summary representation (in `_embedded`). - `link`: as HAL link in (in `_links`). - `none`: omitted. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | LatestPlugsResponseV2 |
LatestPlugsResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list_versions( name: str, query: ListVersionsQuery, headers ) -> PlugVersionsResponseV2
List Plug Versions
List all versions of a plug, including deprecated versions or not.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.archive_format_filter import ArchiveFormatFilter
from waylay.services.registry.models.plug_versions_response_v2 import PlugVersionsResponseV2
from waylay.services.registry.models.status_filter import StatusFilter
try:
# List Plug Versions
# calls `GET /registry/v2/plugs/{name}/versions`
api_response = await waylay_client.registry.plugs.list_versions(
'name_example', # name | path param "name"
# query parameters:
query = {
'deprecated': True
'draft': True
'showTags': 'embed'
'createdBy': '@me'
'updatedBy': '@me'
},
)
print("The response of registry.plugs.list_versions:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.list_versions: %s\n" % e)
GET /registry/v2/plugs/{name}/versions
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['limit'] (dict) query.limit (Query) |
float | query parameter "limit" |
The maximum number of items to be return from this query. Has a deployment-defined default and maximum value. | [optional] |
query['page'] (dict) query.page (Query) |
float | query parameter "page" |
The number of pages to skip when returning result to this query. | [optional] |
query['deprecated'] (dict) query.deprecated (Query) |
bool | query parameter "deprecated" |
Filter on the deprecation status of the function. | [optional] |
query['draft'] (dict) query.draft (Query) |
bool | query parameter "draft" |
Filter on the draft status of the function. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['tags'] (dict) query.tags (Query) |
TagsFilter | query parameter "tags" |
Filter on the tags of the item. Can be a single tag, or a list of tags. When multiple tags are specified, an item must have all of the tags to be selected. | [optional] |
query['version'] (dict) query.version (Query) |
str | query parameter "version" |
Filter on the version of the function (case-sensitive, supports wildcards). | [optional] |
query['status'] (dict) query.status (Query) |
List[StatusFilter] | query parameter "status" |
Filter on the status of the plug. Filter values with a `-` postfix exclude the status. Use the `any` filter value to include all states. When not specified, a default `undeployed-` filter excludes undeployed functions. | [optional] |
query['runtimeVersion'] (dict) query.runtime_version (Query) |
SemanticVersionRange | query parameter "runtimeVersion" |
Filter on the runtime version. | [optional] |
query['createdBy'] (dict) query.created_by (Query) |
str | query parameter "createdBy" |
Filter on the user that create the plug. You can use the `@me` token to indicate your own plugs. | [optional] |
query['updatedBy'] (dict) query.updated_by (Query) |
str | query parameter "updatedBy" |
Filter on the user that last updated the plug. You can use the `@me` token to indicate your own plugs. | [optional] |
query['createdBefore'] (dict) query.created_before (Query) |
TimestampSpec | query parameter "createdBefore" |
Filter on funtions that were created before the given timestamp or age. | [optional] |
query['createdAfter'] (dict) query.created_after (Query) |
TimestampSpec | query parameter "createdAfter" |
Filter on funtions that were created after the given timestamp or age. | [optional] |
query['updatedBefore'] (dict) query.updated_before (Query) |
TimestampSpec | query parameter "updatedBefore" |
Filter on funtions that were updated before the given timestamp or age. | [optional] |
query['updatedAfter'] (dict) query.updated_after (Query) |
TimestampSpec | query parameter "updatedAfter" |
Filter on funtions that were updated after the given timestamp or age. | [optional] |
query['archiveFormat'] (dict) query.archive_format (Query) |
List[ArchiveFormatFilter] | query parameter "archiveFormat" |
Filter on the archive format of the function. | [optional] |
query['runtime'] (dict) query.runtime (Query) |
List[str] | query parameter "runtime" |
Filter on the runtime of the function. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | PlugVersionsResponseV2 |
PlugVersionsResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
patch_interface( name: str, version: str, query: PatchInterfaceQuery, headers ) -> GetPlugResponseV2
Patch Plug Interface
Patch the interface documentation of a plug version.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.documentation import Documentation
from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponseV2
try:
# Patch Plug Interface
# calls `PATCH /registry/v2/plugs/{name}/versions/{version}/interface`
api_response = await waylay_client.registry.plugs.patch_interface(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'showTags': 'embed'
},
# json data: use a generated model or a json-serializable python data structure (dict, list)
json = waylay.services.registry.Documentation() # Documentation | (optional)
)
print("The response of registry.plugs.patch_interface:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.patch_interface: %s\n" % e)
PATCH /registry/v2/plugs/{name}/versions/{version}/interface
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
json | Documentation | json request body | [optional] | |
query | QueryParamTypes | None | URL query parameter | ||
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | GetPlugResponseV2 |
GetPlugResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
patch_metadata( name: str, version: str, query: PatchMetadataQuery, headers ) -> GetPlugResponseV2
Patch Plug Metadata
Patch the metadata of a plug version.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponseV2
from waylay.services.registry.models.update_plug_metadata_request_v2 import UpdatePlugMetadataRequestV2
try:
# Patch Plug Metadata
# calls `PATCH /registry/v2/plugs/{name}/versions/{version}/metadata`
api_response = await waylay_client.registry.plugs.patch_metadata(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'showTags': 'embed'
},
# json data: use a generated model or a json-serializable python data structure (dict, list)
json = waylay.services.registry.UpdatePlugMetadataRequestV2() # UpdatePlugMetadataRequestV2 | (optional)
)
print("The response of registry.plugs.patch_metadata:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.patch_metadata: %s\n" % e)
PATCH /registry/v2/plugs/{name}/versions/{version}/metadata
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
json | UpdatePlugMetadataRequestV2 | json request body | [optional] | |
query | QueryParamTypes | None | URL query parameter | ||
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | GetPlugResponseV2 |
GetPlugResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
protect( name: str, version: str, query: ProtectQuery, headers ) -> GetPlugResponseV2
Protect Plug Version
Enable/disable protection for a plug version. Enabling protection requires ownership for draft versions.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.get_plug_response_v2 import GetPlugResponseV2
try:
# Protect Plug Version
# calls `POST /registry/v2/plugs/{name}/versions/{version}/protect`
api_response = await waylay_client.registry.plugs.protect(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'chown': False
'showTags': 'embed'
'enable': True
},
)
print("The response of registry.plugs.protect:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.protect: %s\n" % e)
POST /registry/v2/plugs/{name}/versions/{version}/protect
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['chown'] (dict) query.chown (Query) |
bool | query parameter "chown" |
If set, ownership of a draft function is transferred to the current user. | [optional] [default False] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['enable'] (dict) query.enable (Query) |
bool | query parameter "enable" |
If set to `true`, the function assets (including its code) will be protected by requiring additional permissions. If set to `false`, the function assets will no longer be protected. | [optional] [default True] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | GetPlugResponseV2 |
GetPlugResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
protect_versions( name: str, query: ProtectVersionsQuery, headers ) -> ProtectByNameResponseV2
Protect Plug
Enable/disable protection for all plug versions. Enabling protection requires ownership for draft versions.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.protect_by_name_response_v2 import ProtectByNameResponseV2
try:
# Protect Plug
# calls `POST /registry/v2/plugs/{name}/protect`
api_response = await waylay_client.registry.plugs.protect_versions(
'name_example', # name | path param "name"
# query parameters:
query = {
'chown': False
'showTags': 'embed'
'enable': True
},
)
print("The response of registry.plugs.protect_versions:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.protect_versions: %s\n" % e)
POST /registry/v2/plugs/{name}/protect
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['chown'] (dict) query.chown (Query) |
bool | query parameter "chown" |
If set, ownership of a draft function is transferred to the current user. | [optional] [default False] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['enable'] (dict) query.enable (Query) |
bool | query parameter "enable" |
If set to `true`, the function assets (including its code) will be protected by requiring additional permissions. If set to `false`, the function assets will no longer be protected. | [optional] [default True] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | ProtectByNameResponseV2 |
ProtectByNameResponseV2 | |
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
publish( name: str, version: str, query: PublishQuery, headers ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2
Publish Draft Plug
Mark the plug to be ready and stable, taking it out of draft mode., Typically, the plug should be in the running
status, such that publishing becomes a simple operation where the existing deployment can be re-used. In other statuses, plug-registry may need to initiate a new build and deployment procedure.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2
try:
# Publish Draft Plug
# calls `POST /registry/v2/plugs/{name}/versions/{version}/publish`
api_response = await waylay_client.registry.plugs.publish(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'chown': False
'deprecatePrevious': waylay.services.registry.DeprecatePreviousPolicy()
'async': True
},
)
print("The response of registry.plugs.publish:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.publish: %s\n" % e)
POST /registry/v2/plugs/{name}/versions/{version}/publish
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['chown'] (dict) query.chown (Query) |
bool | query parameter "chown" |
If set, ownership of a draft function is transferred to the current user. | [optional] [default False] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['deprecatePrevious'] (dict) query.deprecate_previous (Query) |
DeprecatePreviousPolicy | query parameter "deprecatePrevious" |
Set the cleanup policy used to automatically deprecate/delete previous versions. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 |
PostPlugJobSyncResponseV2 PostPlugJobAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Plug Published | - |
202 | Plug Published And Deploy Initiated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
rebuild( name: str, version: str, query: RebuildQuery, headers ) -> RebuildPlugSyncResponseV2 | RebuildPlugAsyncResponseV2
Rebuild Plug
Rebuild and deploy a plug with the original or updated base image.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.rebuild_plug_sync_response_v2 import RebuildPlugSyncResponseV2
from waylay.services.registry.models.rebuild_policy import RebuildPolicy
from waylay.services.registry.models.rebuild_request_v2 import RebuildRequestV2
try:
# Rebuild Plug
# calls `POST /registry/v2/plugs/{name}/versions/{version}/rebuild`
api_response = await waylay_client.registry.plugs.rebuild(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'scaleToZero': True
'dryRun': True
'async': True
'showTags': 'embed'
'upgrade': 'patch'
'ignoreChecks': True
'skipRebuild': True
'skipVerify': False
},
# json data: use a generated model or a json-serializable python data structure (dict, list)
json = waylay.services.registry.RebuildRequestV2() # RebuildRequestV2 | (optional)
)
print("The response of registry.plugs.rebuild:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.rebuild: %s\n" % e)
POST /registry/v2/plugs/{name}/versions/{version}/rebuild
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
json | RebuildRequestV2 | json request body | [optional] | |
query | QueryParamTypes | None | URL query parameter | ||
query['scaleToZero'] (dict) query.scale_to_zero (Query) |
bool | query parameter "scaleToZero" |
Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['dryRun'] (dict) query.dry_run (Query) |
bool | query parameter "dryRun" |
If set to <code>true</code>, checks whether rebuild jobs are needed, but do not start any jobs. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['upgrade'] (dict) query.upgrade (Query) |
RebuildPolicy | query parameter "upgrade" |
If set, force a rebuild with the given <em>runtime</em> version selection policy. <ul> <li><code>same</code> <b>patch</b> version. This should only include backward compatible upgrades. </li> <li><code>minor</code> <b>major</b> version. This might include an upgrade of e.g. the language runtime and/or provided dependencies that could break compatiblity with the function. .</li> </ul> | [optional] |
query['forceVersion'] (dict) query.force_version (Query) |
str | query parameter "forceVersion" |
If set, force a rebuild with the given runtime version (including downgrades). This parameter is mutually exclusive to the `upgrade` parameter. | [optional] |
query['ignoreChecks'] (dict) query.ignore_checks (Query) |
bool | query parameter "ignoreChecks" |
If set to true, checks that normally prevent a rebuild are overriden. These checks include: * function state in `pending`, `running`, `failed` or `undeployed` * backoff period due to recent failures * usage of deprecated dependencies * running jobs on entity * the `dryRun` option | [optional] |
query['skipRebuild'] (dict) query.skip_rebuild (Query) |
bool | query parameter "skipRebuild" |
If set, the function will not be rebuild. Always uses the current runtime version when re-deploying/re-verifying the function. | [optional] |
query['skipVerify'] (dict) query.skip_verify (Query) |
bool | query parameter "skipVerify" |
If set, the function will not be validated: it transitions to `running` without verification of it's deployment health. When a `scaleToZero` is requested or implied, it is executed at the end of the deployment job, rather than as a separate job. | [optional] [default False] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | RebuildPlugSyncResponseV2 | RebuildPlugAsyncResponseV2 |
RebuildPlugSyncResponseV2 RebuildPlugAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
202 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_version( name: str, version: str, query: RemoveVersionQuery, headers ) -> UndeployedResponseV2 | UndeploySubmittedResponseV2
Remove Plug Version
Deprecate, undeploy and/or remove a plug version. By default, a DELETE
* marks published version(s) deprecated: they remain active, but are no longer included in listings by default. * completely removes any draft version(s) (deprecate, undeploy and remove) A deprecated plug version will eventually be undeployed (but not removed) by an external background task, once proven that no waylay rule template or task references it. Use ?force=true
to skip the deprecation and immediately remove the version(s). Use ?undeploy=true
to undeploy the plug version(s), but keep it registered in a undeployed
state. An undeployed
version can later be restored by a rebuild action.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.undeployed_response_v2 import UndeployedResponseV2
try:
# Remove Plug Version
# calls `DELETE /registry/v2/plugs/{name}/versions/{version}`
api_response = await waylay_client.registry.plugs.remove_version(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'async': True
'force': True
'undeploy': True
'reset': True
},
)
print("The response of registry.plugs.remove_version:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.remove_version: %s\n" % e)
DELETE /registry/v2/plugs/{name}/versions/{version}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
query['force'] (dict) query.force (Query) |
bool | query parameter "force" |
If <code>true</code>, the plug version(s) will be undeployed and removed. Otherwise, the plug version(s) will only be <code>deprecated</code>, i.e removed from regular listings. | [optional] |
query['undeploy'] (dict) query.undeploy (Query) |
bool | query parameter "undeploy" |
If `true`, the `DELETE` operation * undeploys the (openfaas) function for the plug: it becomes no longer available for invocation. * does NOT remove the plug from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the plug can be restored later with a rebuild action. If `false`, the `DELETE` operation * only marks the plug version(s) as deprecated: the plug remains active but is removed from the default listings. This also applies to draft versions. Setting this parameter is incompatible with `force=true` or `reset=true`. If not set the default behaviour applies: * draft versions are undeployed and removed from registry. * non-draft versions are marked deprecated only. | [optional] |
query['reset'] (dict) query.reset (Query) |
bool | query parameter "reset" |
If `true`, the function version will be immediately undeployed and reset to `registered` state as a draft. This is incompatible with `force=true` or `undeploy=false`. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | UndeployedResponseV2 | UndeploySubmittedResponseV2 |
UndeployedResponseV2 UndeploySubmittedResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
202 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_versions( name: str, query: RemoveVersionsQuery, headers ) -> UndeployedResponseV2 | UndeploySubmittedResponseV2
Remove Plug
Deprecate, undeploy and/or remove all versions of this named plug. By default, a DELETE
* marks published version(s) deprecated: they remain active, but are no longer included in listings by default. * completely removes any draft version(s) (deprecate, undeploy and remove) A deprecated plug version will eventually be undeployed (but not removed) by an external background task, once proven that no waylay rule template or task references it. Use ?force=true
to skip the deprecation and immediately remove the version(s). Use ?undeploy=true
to undeploy the plug version(s), but keep it registered in a undeployed
state. An undeployed
version can later be restored by a rebuild action.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.undeployed_response_v2 import UndeployedResponseV2
try:
# Remove Plug
# calls `DELETE /registry/v2/plugs/{name}`
api_response = await waylay_client.registry.plugs.remove_versions(
'name_example', # name | path param "name"
# query parameters:
query = {
'async': True
'force': True
'undeploy': True
'reset': True
},
)
print("The response of registry.plugs.remove_versions:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.remove_versions: %s\n" % e)
DELETE /registry/v2/plugs/{name}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
query['force'] (dict) query.force (Query) |
bool | query parameter "force" |
If <code>true</code>, the plug version(s) will be undeployed and removed. Otherwise, the plug version(s) will only be <code>deprecated</code>, i.e removed from regular listings. | [optional] |
query['undeploy'] (dict) query.undeploy (Query) |
bool | query parameter "undeploy" |
If `true`, the `DELETE` operation * undeploys the (openfaas) function for the plug: it becomes no longer available for invocation. * does NOT remove the plug from registry: it stays in an `undeployed` status. All assets and definitions are retained, so the plug can be restored later with a rebuild action. If `false`, the `DELETE` operation * only marks the plug version(s) as deprecated: the plug remains active but is removed from the default listings. This also applies to draft versions. Setting this parameter is incompatible with `force=true` or `reset=true`. If not set the default behaviour applies: * draft versions are undeployed and removed from registry. * non-draft versions are marked deprecated only. | [optional] |
query['reset'] (dict) query.reset (Query) |
bool | query parameter "reset" |
If `true`, the function version will be immediately undeployed and reset to `registered` state as a draft. This is incompatible with `force=true` or `undeploy=false`. | [optional] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | UndeployedResponseV2 | UndeploySubmittedResponseV2 |
UndeployedResponseV2 UndeploySubmittedResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
202 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_asset( name: str, version: str, wildcard: str, query: UpdateAssetQuery, headers ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2
Update Plug Asset
The provided asset will be added to the plug function's collection of existing assets, replacing any existing asset with the same name. Please note that it is not allowed to update the plug.json json file with a changed value for any of the name
, version
and/or runtime
attributes. For each runtime other files are supported.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.file_upload import FileUpload
from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2
try:
# Update Plug Asset
# calls `PUT /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}`
api_response = await waylay_client.registry.plugs.update_asset(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
'wildcard_example', # wildcard | path param "wildcard"
# query parameters:
query = {
'scaleToZero': False
'deploy': True
'chown': False
'async': True
},
# non-json binary data: use a byte array or a generator of bytearray chuncks
content=b'my-binary-data',
# this operation supports multiple request content types: use `headers` to specify the one used
# alternatives:
headers = {
'content-type': 'application/octet-stream'
},
)
print("The response of registry.plugs.update_asset:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.update_asset: %s\n" % e)
PUT /registry/v2/plugs/{name}/versions/{version}/content/{wildcard}
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
wildcard | str | path parameter "wildcard" |
Full path or path prefix of the asset within the archive | |
content | ContentRequest | binary request body | A single asset file. | [optional] |
query | QueryParamTypes | None | URL query parameter | ||
query['scaleToZero'] (dict) query.scale_to_zero (Query) |
bool | query parameter "scaleToZero" |
If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] |
query['deploy'] (dict) query.deploy (Query) |
bool | query parameter "deploy" |
Indicates that a function should be deployed when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an asset update or rebuild to initiate a build and deploy at a later stage. | [optional] [default True] |
query['chown'] (dict) query.chown (Query) |
bool | query parameter "chown" |
If set, ownership of a draft function is transferred to the current user. | [optional] [default False] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
headers | HeaderTypes | request headers | ||
headers['content-type'] | str | content type | request header "content-type" |
should match mediaType |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 |
PostPlugJobSyncResponseV2 PostPlugJobAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Default Response | - |
202 | Default Response | - |
403 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_assets( name: str, version: str, query: UpdateAssetsQuery, files, headers ) -> PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2
Update Plug Assets
Update a draft plug function by updating its assets. The assets for a plug function can be provided as either
- a single tar archive (optionally compressed), with one of the content types
application/octet-stream
,application/tar
,application/tar+gzip
,application/x-gzip
,application/x-tar
,application/gzip
- separate files in a
multipart/form-data
request
name
, version
and/or runtime
attributes. For each runtime other files are supported.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.post_plug_job_sync_response_v2 import PostPlugJobSyncResponseV2
try:
# Update Plug Assets
# calls `PUT /registry/v2/plugs/{name}/versions/{version}/content`
api_response = await waylay_client.registry.plugs.update_assets(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'scaleToZero': False
'deploy': True
'chown': False
'async': True
},
# non-json binary data: use a byte array or a generator of bytearray chuncks
content=b'my-binary-data',
# this operation supports multiple request content types: use `headers` to specify the one used
# alternatives: 'application/tar', 'application/tar+gzip', 'application/x-gzip', 'application/x-tar', 'application/gzip', 'multipart/form-data',
headers = {
'content-type': 'application/octet-stream'
},
)
print("The response of registry.plugs.update_assets:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.update_assets: %s\n" % e)
PUT /registry/v2/plugs/{name}/versions/{version}/content
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
content | ContentRequest | binary request body | The assets for a <em>plug</em> function can be provided as either <ul> <li>a single <em>tar</em> archive (optionally compressed), with one of the content types <code>application/octet-stream</code>, <code>application/tar</code>, <code>application/tar+gzip</code>, <code>application/x-gzip</code>, <code>application/x-tar</code>, <code>application/gzip</code></li> <li>separate files in a <code>multipart/form-data</code> request</li> </ul> The provided assets will be added to the <em>plug</em> function's collection of existing assets, replacing any existing assets with the same name. Please note that it is not allowed to update the plug.json</code> json file with a changed value for any of the <code>name</code>, <code>version</code> and/or <code>runtime</code> attributes. For each <em>runtime</em> other files are supported. | [optional] |
files | FileTypes | request body files | ||
query | QueryParamTypes | None | URL query parameter | ||
query['scaleToZero'] (dict) query.scale_to_zero (Query) |
bool | query parameter "scaleToZero" |
If set to <code>true</code>, after successful deployment, the deployed function will be scaled to zero. This saves computing resources when the function is not to be used immediately. | [optional] [default False] |
query['deploy'] (dict) query.deploy (Query) |
bool | query parameter "deploy" |
Indicates that a function should be deployed when its assets are valid. * If `true` (default), jobs to build and deploy the function will be initiated after it is checked that the assets are valid. Invalid assets lead to a validation error, and the function and its assets are not created or updated. * If `false`, the uploaded assets are stored and the function is created/updated in `registered` state. Asset validation errors are only returned as warning, and stored as `failureReason` on the function entity. Use an asset update or rebuild to initiate a build and deploy at a later stage. | [optional] [default True] |
query['chown'] (dict) query.chown (Query) |
bool | query parameter "chown" |
If set, ownership of a draft function is transferred to the current user. | [optional] [default False] |
query['comment'] (dict) query.comment (Query) |
str | query parameter "comment" |
An optional user-specified comment corresponding to the operation. | [optional] |
query['author'] (dict) query.author (Query) |
str | query parameter "author" |
Optionally changes the author metadata when updating a function. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
headers | HeaderTypes | request headers | ||
headers['content-type'] | str | content type | request header "content-type" |
should match mediaType application/octet-stream , application/tar , application/tar+gzip , application/x-gzip , application/x-tar , application/gzip , multipart/form-data |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | PostPlugJobSyncResponseV2 | PostPlugJobAsyncResponseV2 |
PostPlugJobSyncResponseV2 PostPlugJobAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: application/octet-stream, application/tar, application/tar+gzip, application/x-gzip, application/x-tar, application/gzip, multipart/form-data
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Default Response | - |
202 | Default Response | - |
403 | Default Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
verify( name: str, version: str, query: VerifyQuery, headers ) -> VerifyPlugSyncResponseV2 | PostPlugJobAsyncResponseV2
Verify Health Of Plug
Verify health of plug deployed on openfaas.
from pprint import pprint
# Import the waylay-client from the waylay-sdk-core package
from waylay.sdk.client import WaylayClient
from waylay.sdk.api.api_exceptions import ApiError
# Intialize a waylay client instance
waylay_client = WaylayClient.from_profile()
# Note that the typed model classes for responses/parameters/... are only available when `waylay-sdk-registry-types` is installed
from waylay.services.registry.models.verify_plug_sync_response_v2 import VerifyPlugSyncResponseV2
try:
# Verify Health Of Plug
# calls `POST /registry/v2/plugs/{name}/versions/{version}/verify`
api_response = await waylay_client.registry.plugs.verify(
'name_example', # name | path param "name"
'version_example', # version | path param "version"
# query parameters:
query = {
'scaleToZero': True
'showTags': 'embed'
'async': True
},
)
print("The response of registry.plugs.verify:\n")
pprint(api_response)
except ApiError as e:
print("Exception when calling registry.plugs.verify: %s\n" % e)
POST /registry/v2/plugs/{name}/versions/{version}/verify
Name | Type | API binding | Description | Notes |
---|---|---|---|---|
name | str | path parameter "name" |
The name of the function. | |
version | str | path parameter "version" |
The version of the function. | |
query | QueryParamTypes | None | URL query parameter | ||
query['scaleToZero'] (dict) query.scale_to_zero (Query) |
bool | query parameter "scaleToZero" |
Indicates whether the function needs to be scaled down after successful verification. If not set, the function is scaled to zero only if it was not active before this command. | [optional] |
query['showTags'] (dict) query.show_tags (Query) |
ShowInlineOrEmbedding | query parameter "showTags" |
Instructs how tag (objects) should be rendered in responses. The tags are show at the `tags` property of the manifest (legacy: the `metadata.tags` property) - `inline`: Show full tag objects in the manifest. - `embed`: Show tag references in the manifest. Referenced full tag objects are included in a separate `_embedded` HAL section. - `none`: Show tag references in the manifest. Do not render tag objects. The default behaviour depends on deployment settings. | [optional] |
query['async'] (dict) query.var_async (Query) |
bool | query parameter "async" |
Unless this is set to <code>false</code>, the server will start the required job actions asynchronously and return a <code>202</code> <em>Accepted</em> response. If <code>false</code> the request will block until the job actions are completed, or a timeout occurs. | [optional] [default True] |
headers | HeaderTypes | request headers |
Selected path param | Raw response param | Return Type | Description | Links |
---|---|---|---|---|
Literal[""] (default) | False (default) | VerifyPlugSyncResponseV2 | PostPlugJobAsyncResponseV2 |
VerifyPlugSyncResponseV2 PostPlugJobAsyncResponseV2 |
|
str | False (default) | Any |
If any other string value for the selected path is provided, the exact type of the response will only be known at runtime. | |
/ | True | Response |
The raw http response object. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Default Response | - |
202 | Plug Verification Initiated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]