Apoxy
Extensions API

Edge Function Revisions

API reference for Edge Function Revisions (extensions.apoxy.dev/v1alpha2)

API Group: extensions.apoxy.dev/v1alpha2

Operations

List Edge Function Revisions

GET/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions

List EdgeFunctionRevision

Response

  • 200: OK

Create Edge Function Revision

POST/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions

create an EdgeFunctionRevision

Request Body

Spec fields (EdgeFunctionRevisionSpec):

FieldTypeDescription
codeEdgeFunctionCodeSourceCode is the source of the function code/binary. (required)
envEnvVar[]Env is a list of environment variables to set in the function runtime. These will be available via WASIp1 environ* routines as well as Apoxy Runtime SDK APIs.
modestringMode is runtime mode of the function. (required)
runtimeEdgeFunctionRuntimeConfiguration for the function runtime.

Response

  • 200: OK
  • 201: Created
  • 202: Accepted

Delete All Edge Function Revisions

DELETE/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions

Delete collection of EdgeFunctionRevision

Response

  • 200: OK

Get Edge Function Revision

GET/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions/{name}

Get the specified EdgeFunctionRevision

Response

  • 200: OK

Replace Edge Function Revision

PUT/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions/{name}

Replace the specified EdgeFunctionRevision

Request Body

Spec fields (EdgeFunctionRevisionSpec):

FieldTypeDescription
codeEdgeFunctionCodeSourceCode is the source of the function code/binary. (required)
envEnvVar[]Env is a list of environment variables to set in the function runtime. These will be available via WASIp1 environ* routines as well as Apoxy Runtime SDK APIs.
modestringMode is runtime mode of the function. (required)
runtimeEdgeFunctionRuntimeConfiguration for the function runtime.

Response

  • 200: OK
  • 201: Created

Update Edge Function Revision

PATCH/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions/{name}

Partially update the specified EdgeFunctionRevision

Response

  • 200: OK
  • 201: Created

Delete Edge Function Revision

DELETE/apis/extensions.apoxy.dev/v1alpha2/edgefunctionrevisions/{name}

delete an EdgeFunctionRevision

Response

  • 200: OK
  • 202: Accepted

Schema Reference

EdgeFunctionCodeSource

FieldTypeDescription
goPluginSourceGoPluginSourceGoSource specifies sources for the Go filter plugin. This option is only available for non-cloud (kubernets, unmanaged, etc) Proxy providers.
jsSourceJavaScriptSourceJsSource specifies sources for the JavaScript function runtime. If set/modified, a function will undergo a build step to compile the JavaScript source into a WebAssembly binary before it is deployed.
wasmSourceWasmSourceWasmSource specifies sources for the WebAssembly function runtime.

GoPluginSource

FieldTypeDescription
ociOCIImageRefOCI is the OCI image reference to the Go plugin.
pluginConfigstringPluginConfig is the configuration passed to the Go plugin as JSON-encoded structpb.Struct message. Plugin will receive it as anypb.Any message.
urlstringURL is the URL to the Go plugin .so

OCIImageRef

FieldTypeDescription
credentialsOCICredentialsCredentials is the credentials for pulling the OCI image. Only one of Credentials or CredentialsRef may be specified.
credentialsRefOCICredentialsObjectReferenceCredentialsRef is the reference to the secret containing the credentials for pulling the OCI image. Only one of Credentials or CredentialsRef may be specified.
repostringRepo is the repository of the OCI image. (required)
tagstringTag is the tag of the OCI image.

OCICredentials

FieldTypeDescription
passwordstringPassword is the password for the OCI registry. This field is write-only and is not returned in the response.
passwordDatastringPasswordData is the base64 encoded password for the OCI registry.
usernamestringUsername is the username for the OCI registry.

OCICredentialsObjectReference

FieldTypeDescription
groupstringGroup is the group of the target resource. (required)
namestringName is the name of the target resource. (required)
namespacestringNamespace is the namespace of the target resource. (required)

JavaScriptSource

FieldTypeDescription
assetsJavaScriptAssetsSourceAsset accepts a list of source files to be included in the function. Only one of Assets, Git, or Npm may be specified.
entrypointstringEntrypoint is the entrypoint path to the function. (required)
gitJavaScriptGitSourceGit is the git source for the function. Only one of Assets, Git, or Npm may be specified.
npmJavaScriptNpmSourceNpm is the npm source for the function. Only one of Assets, Git, or Npm may be specified.

JavaScriptAssetsSource

FieldTypeDescription
filesSourceFile[](required)

JavaScriptGitSource

FieldTypeDescription
branchstringBranch is the git branch.
commitstringCommit is the git commit.
repositorystringRepository is the git repository URL. (required)

JavaScriptNpmSource

FieldTypeDescription
packagestringPackage is the npm package name. (required)
versionstringVersion is the npm package version.

WasmSource

FieldTypeDescription
urlstringURL is the URL to the WebAssembly binary. (required)

EdgeFunctionRuntime

FieldTypeDescription
capabilitiesRuntimeCapabilitiesCapabilities is the list of capabilities granted to the function.
portinteger (int32)Port is the port the function listens on. Defaults to 8080.
timeoutDurationTimeout is the maximum time the function is allowed to run. Defaults to 30 seconds but can be increased depending on your plan.

RuntimeCapabilities

FieldTypeDescription
fetchAPIbooleanFetchAPI is the capability to fetch data from the internet. Defaults to true.
kvbooleanK/V is the capability to access the key/value store. Defaults to true.

On this page