Skip to content
Weik.ioDocs
2026.2
Try Weik.io

APIs and subscriptions

Weik.io 2026.2

Serve API versions on your gateways and give callers access through subscriptions. Video

Watch: Publish an API and call it, 3:55

The video publishes an API in front of an integration and deploys it to production. Then it calls the API with curl.

On this page

After you publish an API, you serve its versions on gateways and choose who may call them.

Each gateway accepts calls to one environment on its hostnames. Its rules set who may call it and how often. Weik.io obtains and renews a certificate for each hostname unless you upload one.

To let a caller use APIs on a gateway, you give it a subscription on that gateway. Unless the subscription admits callers with no credential, its type sets how the caller proves who it is:

  • An API key
  • A query parameter
  • Basic credentials
  • An OpenID Connect token
  • A client certificate

Commands on this page#

Command What it does
weikio gateway create Create a gateway in an environment.
weikio gateway set Change a gateway, keeping the fields you don’t set.
weikio gateway diff Compare the rules of two gateways.
weikio get gateways List the gateways.
weikio describe gateway Show a gateway in full, including its certificates and what uses it.
weikio get apim-instances List the APIM instances with their entrances and the gateway revisions they serve.
weikio delete gateway Delete a gateway.
weikio rename gateway Rename a gateway.
weikio api deploy Deploy an API version to an environment’s gateways.
weikio api promote Deploy what one environment serves to another, keeping the destination’s gateways and overrides.
weikio api rollback Roll a deployment back to the definition it served before.
weikio api undeploy Undeploy an API version from an environment.
weikio api set-gateways Change the gateways of a deployment, keeping its definition.
weikio api set-rules Make a gateway’s rules stricter for one deployment.
weikio get api-deployments List a project’s API deployments, in every environment unless --env is given.
weikio get apis List the APIs of a project.
weikio describe api Show an API in full, including its subscriptions and its calls of the last day.
weikio get apiversions List the versions of one API.
weikio describe apiversion Show an API version with its routes and clusters.
weikio delete api Delete an API and its versions.
weikio rename api Rename an API.
weikio delete apiversion Delete one version of an API.
weikio get subscriptions List a project’s subscriptions with their calls of the last day.
weikio subscription create Create a subscription in one environment.
weikio subscription set Change the given fields of a subscription.
weikio subscription key Create a subscription’s first credential and print it once.
weikio subscription rotate-key Replace the credential of a subscription and print the new one once.
weikio subscription disable Disable a subscription.
weikio subscription enable Enable a subscription.
weikio delete subscription Delete a subscription.

The tables below leave out the flags every command accepts, such as --env, --project, -o and --context, which the CLI reference lists.

weikio gateway create#

Create a gateway in an environment. --networks is required.

Terminal
weikio gateway create <name> [--env E] --networks internet|CIDR,... [--hostname H ...] [--display-name S] [--served-by hub|site] [--entrance N ...] [--projects p,...] [--default] [--like G] [--relay-from G,...] [--client-certificate none|optional|required] [--authority A=CA.pem[,CA.pem] ...] [--caller-limit N/W] [--subscription-limit N/W] [--upstream-networks CIDR,...] [--max-request-size SIZE] [--server-certificate NAME=CHAIN.pem,KEY.pem ...] [--certificate-source automatic|public|platform|uploaded|AUTHORITY] [-y]
Argument or flag What it does
<name> Sets the new gateway’s name.
--like <like> Copies networks, entrances, client certificate rules, limits, upstreams and request size from this gateway.
--display-name <display-name> Sets the gateway’s display name. Give “” to remove it.
--hostname <hostname> Adds a hostname that callers use to reach the gateway. Repeat it for each hostname.
--networks <networks> Sets the networks that may call the gateway, as internet for any caller or as address ranges such as 10.0.0.0/8, comma separated.
--served-by <served-by> Sets who serves the gateway, as hub, or as site for the agents with the capability gateway=<name>.
--entrance <entrance> Adds an entrance where the gateway accepts calls. Repeat it for each entrance. The default is the hub’s entrance, when the hub has one.
--projects <projects> Sets the projects that may use the gateway, comma separated. Give “” for any project.
--default Makes it a default gateway. Deployments and subscriptions of its projects that set no gateway use it.
--relay-from <relay-from> Sets the hub gateways of the same environment that may relay calls into this site gateway, comma separated.
--server-certificate <server-certificate> Uploads a certificate for the gateway’s hostnames, as NAME=CHAIN.pem,KEY.pem. Repeat it for each certificate.
--certificate-source <certificate-source> Sets who signs the certificates of the gateway’s hostnames, as automatic, public (the installation’s public authority), platform, uploaded or a certificate authority’s name.
--client-certificate <client-certificate> Sets whether callers need a client certificate, as none, optional or required.
--authority <authority> Sets an authority whose client certificates the gateway accepts, as NAME=CA.pem[,CA.pem]. Repeat it for each authority. The CA certificates you give replace that authority’s current ones.
--caller-limit <caller-limit> Sets the calls allowed per caller address, as N/W, such as 600/1m. Each APIM instance counts calls separately.
--subscription-limit <subscription-limit> Sets the calls allowed per subscription that has no limit of its own, as N/W, such as 600/1m. All APIM instances count these calls together.
--upstream-networks <upstream-networks> Sets the address ranges the gateway’s APIs may call, comma separated. Give “” for anywhere.
--max-request-size <max-request-size> Sets the largest request body the gateway accepts, such as 10MB. Give “” for the platform’s limit.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API:

  • PUT /api/v1/gateways/{name}
  • GET /api/v1/settings/install
  • GET /api/v1/gateways/{like}

Also written as weikio create gateway.

Terminal
$ weikio gateway create internal --env production --hostname api.example.com --networks 10.0.0.0/8 --default -y
You see
Target: https://hub.example, environment production (--env)
gateway internal created (environment production, revision 12)
Listens on the hub's entrance 'public' to callers in 10.0.0.0/8.
api.example.com points at this hub. Requesting its certificate from Let's Encrypt. HTTPS is served once it's issued (weikio describe gateway internal).

weikio gateway set#

Change a gateway, keeping the fields you don’t set. When you add a hostname, Weik.io obtains its certificate unless you upload one.

Terminal
weikio gateway set <name> [the flags of create] [--no-default] [--remove-hostname H ...] [--remove-server-certificate NAME ...] [--projects ""] [--remove-authority A ...] [--revoke-certificate A=leaf.pem|SHA256 ...] [--unrevoke-certificate A=leaf.pem|SHA256 ...] [--no-caller-limit] [--no-subscription-limit] [--upstream-networks ""] [--max-request-size ""] [-y]
Argument or flag What it does
<name> Identifies the gateway.
--no-default Makes it no longer a default gateway.
--remove-hostname <remove-hostname> Removes a hostname. Repeat the flag for each hostname you remove.
--remove-server-certificate <remove-server-certificate> Removes an uploaded certificate by its name. Repeat it for each certificate.
--display-name <display-name> Sets the gateway’s display name. Give “” to remove it.
--hostname <hostname> Adds a hostname that callers use to reach the gateway. Repeat it for each hostname.
--networks <networks> Sets the networks that may call the gateway, as internet for any caller or as address ranges such as 10.0.0.0/8, comma separated.
--served-by <served-by> Sets who serves the gateway, as hub, or as site for the agents with the capability gateway=<name>.
--entrance <entrance> Adds an entrance where the gateway accepts calls. Repeat it for each entrance. The default is the hub’s entrance, when the hub has one.
--projects <projects> Sets the projects that may use the gateway, comma separated. Give “” for any project.
--default Makes it a default gateway. Deployments and subscriptions of its projects that set no gateway use it.
--relay-from <relay-from> Sets the hub gateways of the same environment that may relay calls into this site gateway, comma separated.
--server-certificate <server-certificate> Uploads a certificate for the gateway’s hostnames, as NAME=CHAIN.pem,KEY.pem. Repeat it for each certificate.
--certificate-source <certificate-source> Sets who signs the certificates of the gateway’s hostnames, as automatic, public (the installation’s public authority), platform, uploaded or a certificate authority’s name.
--client-certificate <client-certificate> Sets whether callers need a client certificate, as none, optional or required.
--authority <authority> Sets an authority whose client certificates the gateway accepts, as NAME=CA.pem[,CA.pem]. Repeat it for each authority. The CA certificates you give replace that authority’s current ones.
--caller-limit <caller-limit> Sets the calls allowed per caller address, as N/W, such as 600/1m. Each APIM instance counts calls separately.
--subscription-limit <subscription-limit> Sets the calls allowed per subscription that has no limit of its own, as N/W, such as 600/1m. All APIM instances count these calls together.
--upstream-networks <upstream-networks> Sets the address ranges the gateway’s APIs may call, comma separated. Give “” for anywhere.
--max-request-size <max-request-size> Sets the largest request body the gateway accepts, such as 10MB. Give “” for the platform’s limit.
--remove-authority <remove-authority> Stops accepting the client certificates of this authority. Repeat it for each authority.
--revoke-certificate <revoke-certificate> Revokes a client certificate, as AUTHORITY=leaf.pem or AUTHORITY=SHA256 fingerprint. Repeat it for each certificate.
--unrevoke-certificate <unrevoke-certificate> Accepts a revoked client certificate again, as AUTHORITY=leaf.pem or AUTHORITY=SHA256 fingerprint. Repeat it for each certificate.
--no-caller-limit Removes the caller limit.
--no-subscription-limit Removes the limit for subscriptions that set none of their own.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API: PUT /api/v1/gateways/{name}, GET /api/v1/apim/instances.

weikio gateway diff#

Compare the rules of two gateways.

Terminal
weikio gateway diff <gateway> <other>
Argument or flag What it does
<gateway> Identifies one gateway.
<other> Identifies the gateway to compare it with.

Who can run it: a grant whose role has read in the environment.

API: GET /api/v1/gateways/{a}/diff/{b}.

weikio get gateways#

List the gateways.

Terminal
weikio get gateways [--env E]

Who can run it: a grant whose role has read in the environment.

API: GET /api/v1/gateways?environment=.

Also written as weikio get gateway.

weikio describe gateway#

Show a gateway in full, including its certificates and what uses it.

Terminal
weikio describe gateway <name>
Argument or flag What it does
<name> Identifies the gateway.

Who can run it: a grant whose role has read in the environment.

API: GET /api/v1/gateways/{name}, GET /api/v1/apim/instances.

Also written as weikio describe gateways.

weikio get apim-instances#

List the APIM instances with their entrances and the gateway revisions they serve.

Terminal
weikio get apim-instances

Who can run it: a platform administrator. A reader of an environment sees the APIM instances that serve its gateways.

API: GET /api/v1/apim/instances.

Also written as weikio get apim-instance.

weikio delete gateway#

Delete a gateway.

Terminal
weikio delete gateway <name> [-y]
Argument or flag What it does
<name> Identifies the gateway.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API: DELETE /api/v1/gateways/{name}.

Also written as weikio delete gateways.

weikio rename gateway#

Rename a gateway.

Terminal
weikio rename gateway <name> <new-name>
Argument or flag What it does
<name> Identifies the gateway.
<new-name> Sets the new name.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a platform administrator.

API: PATCH /api/v1/gateways/{name}.

weikio api deploy#

Deploy an API version to an environment’s gateways. Without --gateways, a new deployment is served on the environment’s only gateway, or on its default gateways that allow the project. A deployment that already exists keeps its gateways.

Terminal
weikio api deploy <p>/<api>@<v> [--env E] [--gateways G,...] [--set k=v ...] [--unset k ...] [--dry-run] [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
--gateways <gateways> Sets the gateways that serve the version, comma separated.
--set <set> Adds an override, as k=v, to the deployment’s other overrides. Repeat it for each override.
--unset <unset> Removes the override with this name. Repeat the flag for each override you remove.
--dry-run Prints what would happen and changes nothing.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has deploy in the destination environment.

API: PUT /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}, GET /api/v1/gateways?environment=.

Terminal
$ weikio apply -f ./finance/apis/
You see
Target: https://hub.example, project finance (from finance/project.yaml)
api finance/invoices created
api-version finance/invoices@v1 created (type proxy, rate limit 1200/1m)
api-version finance/bank-notifications@v1 created (type webhook, channel bank-notification-received)
api-deployment devtest/finance/invoices@v1 created
api-subscription devtest/finance/partner-y created
Gateways updated in: devtest.

weikio api promote#

Deploy what one environment serves to another. The destination gets the definition the source serves. It keeps its own overrides and its gateways with the rules set on each.

Terminal
weikio api promote <p>/<api>@<v> --from E1 [--to E2] [--gateways G,...] [--dry-run] [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
--from <from> Sets the environment to copy from.
--to <to> Sets the environment to copy into.
--gateways <gateways> Sets the gateways that serve the version, comma separated.
--dry-run Prints what would happen and changes nothing.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has deploy in the destination environment.

API: GET /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v} in both environments, PUT /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v} in the destination, GET /api/v1/gateways?environment=.

Terminal
$ weikio api promote finance/invoices@v1 --from devtest --to production -y
You see
Target: https://hub.example, project finance (argument), environment production (--to)
api-deployment production/finance/invoices@v1 created (gateways internal, definition 3f9a0c1e2b4d, revision 31)
Served at https://api.example.com/invoices/v1 (gateway internal).

weikio api rollback#

Roll a deployment back to the definition it served before.

Terminal
weikio api rollback <p>/<api>@<v> [--env E] [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has deploy in the environment.

API: POST /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}/rollback.

weikio api undeploy#

Undeploy an API version from an environment.

Terminal
weikio api undeploy <p>/<api>@<v> [--env E] [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has deploy in the environment.

API: DELETE /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}.

weikio api set-gateways#

Change a deployment’s gateways and leave its definition as it is.

Terminal
weikio api set-gateways <p>/<api>@<v> [--env E] [--add G,...] [--remove G,...] [--via HUB=SITE ...] [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
--add <add> Adds gateways, comma separated.
--remove <remove> Removes gateways, comma separated.
--via <via> Sets a hub gateway that relays calls to a site gateway, as HUB=SITE. Repeat it as needed.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has deploy in the environment.

API:

  • GET /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}
  • PUT /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}
  • GET /api/v1/gateways?environment=

weikio api set-rules#

Make a gateway’s rules stricter for one deployment.

Terminal
weikio api set-rules <p>/<api>@<v> [--env E] --gateway G [--networks CIDR,...] [--client-certificate optional|required] [--authority A ...] [--caller-limit N/W] [--subscription-limit N/W] | --clear [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
--gateway <gateway> Identifies the gateway whose rules you make stricter.
--networks <networks> Sets the address ranges within the gateway’s networks that may call this API, comma separated.
--client-certificate <client-certificate> Sets whether callers need a client certificate, as optional or required.
--authority <authority> Sets a gateway authority whose client certificates this API accepts. Repeat it as needed.
--caller-limit <caller-limit> Sets the calls allowed per caller address, as N/W, such as 600/1m.
--subscription-limit <subscription-limit> Sets the calls allowed per subscription that has no limit of its own, as N/W, such as 600/1m.
--clear Removes this API’s stricter rules on the gateway.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has deploy in the environment.

API:

  • GET /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}
  • PUT /api/v1/environments/{environment}/projects/{project}/api-deployments/{api}/{v}
  • GET /api/v1/gateways?environment=

weikio get api-deployments#

List a project’s API deployments, in every environment unless --env is given.

Terminal
weikio get api-deployments [--env E] [--project P] [--api A]
Argument or flag What it does
--api <api> Shows only the deployments of this API.

Who can run it: a grant whose role has read in the environment.

API: GET /api/v1/environments/{environment}/projects/{project}/api-deployments, GET /api/v1/projects/{project}/apis/{api}/deployments.

Also written as weikio get api-deployment.

Terminal
$ weikio get api-deployments --api invoices
You see
ENVIRONMENT   API                   DEFINITION     GATEWAYS   DEPLOYED BY        DEPLOYED               STATE
devtest       finance/invoices@v1   3f9a0c1e2b4d   devtest    anna@example.com   2026-10-08 09:14 UTC   -
production    finance/invoices@v1   3f9a0c1e2b4d   internal   anna@example.com   2026-10-08 09:20 UTC   -

weikio get apis#

List the APIs of a project.

Terminal
weikio get apis [--project P]

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/apis, GET /api/v1/environments/{environment}/projects/{project}/api-deployments.

weikio describe api#

Show an API in full, including its subscriptions and its calls of the last day.

Terminal
weikio describe api <p>/<n>
Argument or flag What it does
<api> Identifies the API, as project/name.

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/apis/{name}, GET /api/v1/environments/{environment}/projects/{project}/api-subscriptions?api=, GET /api/v1/metrics/summary, GET /api/v1/traces/_related.

weikio get apiversions#

List the versions of one API.

Terminal
weikio get apiversions <p>/<api>
Argument or flag What it does
<api> Identifies the API, as project/name.

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/apis/{api}/versions, GET /api/v1/projects/{project}/apis/{api}/deployments.

weikio describe apiversion#

Show an API version with its routes and clusters.

Terminal
weikio describe apiversion <p>/<api>@<version> [--openapi]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
--openapi Prints the version’s OpenAPI document instead.

Who can run it: a grant on the project whose role has read.

API: GET /api/v1/projects/{project}/apis/{api}/versions/{version}.

weikio delete api#

Delete an API and its versions.

Terminal
weikio delete api <p>/<n> [-y]
Argument or flag What it does
<api> Identifies the API, as project/name.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: DELETE /api/v1/projects/{project}/apis/{name}.

weikio rename api#

Rename an API.

Terminal
weikio rename api <p>/<n> <new-name>
Argument or flag What it does
<name> Identifies the API, as project/name.
<new-name> Sets the new name in the same project.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: PATCH /api/v1/projects/{project}/apis/{name}.

weikio delete apiversion#

Delete one version of an API.

Terminal
weikio delete apiversion <p>/<api>@<version> [-y]
Argument or flag What it does
<apiversion> Identifies the API version, as project/api@version.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: DELETE /api/v1/projects/{project}/apis/{api}/versions/{version}.

weikio get subscriptions#

List a project’s subscriptions with their calls of the last day.

Terminal
weikio get subscriptions [--env E] [--project P] [--api A]
Argument or flag What it does
--api <api> Shows only the subscriptions to this API.

Who can run it: a grant whose role has read in the environment.

API: GET /api/v1/environments/{environment}/projects/{project}/api-subscriptions?api=, GET /api/v1/projects/{project}/api-subscriptions?api=.

Terminal
$ weikio get subscriptions --env production
You see
NAME        PROJECT   APIS       GATEWAY    TYPE     ACTIVE   RATE LIMIT   EXPIRES   CALLS 24H   LIMITED   LAST CALL
partner-x   finance   invoices   internal   apikey   yes      60/1m        -         0           0         -

weikio subscription create#

Create a subscription in one environment. For the types apikey, queryparameter and basic, the command prints the credential once as its last line. Weik.io stores only a hash of the credential.

Terminal
weikio subscription create <p>/<name> [--env E] [--gateway G] --api A[,B ...] --type apikey|queryparameter|basic|oidc|anonymous|certificate [--owner S] [--rate-limit N/W] [--expires T] [--header "k: v" ...] [--username S] [--oidc-issuer URL --oidc-audience S] [--certificate-authority A --certificate-name N]
Argument or flag What it does
<subscription> Sets the subscription’s name, as project/name.
--gateway <gateway> Sets the subscription’s gateway. The default is the environment’s only gateway, or its only default gateway that allows the project.
--api <api> Sets the subscription’s APIs, comma separated.
--type <type> Sets how callers authenticate, as apikey, queryparameter, basic, oidc, anonymous or certificate.
--owner <owner> Sets who the subscription is for. Without it, the owner is the subscription’s name.
--rate-limit <rate-limit> Sets the subscription’s rate limit, as N/W, such as 600/1m.
--expires <expires> Sets when the subscription expires, as a duration such as 90d or a date such as 2027-01-01.
-H, --header <header> Sets a header the gateway adds to this subscription’s requests, as “Name: value”. Repeat it for each header.
--username <username> Sets the username of a basic credential. The default is the subscription’s current username, or its name.
--oidc-issuer <oidc-issuer> Sets the issuer of the caller’s tokens, for type oidc.
--oidc-audience <oidc-audience> Sets the audience the caller’s tokens must have, for type oidc.
--certificate-authority <certificate-authority> Sets the gateway authority that issues the caller’s client certificate, for type certificate.
--certificate-name <certificate-name> Sets the name in the caller’s client certificate, for type certificate.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: PUT /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}.

Also written as weikio create subscription.

Terminal
$ weikio subscription create finance/partner-x --env production --api invoices --type apikey --rate-limit 60/1m -y
You see
Target: https://hub.example, project finance (argument), environment production (--env)
api-subscription production/finance/partner-x created (gateway internal, type apikey, APIs invoices, rate limit 60/1m)

To rotate the key later:
  weikio subscription rotate-key finance/partner-x --env production

API key (shown once): ****************************************
Terminal
$ curl -H "X-Api-Key: $PARTNER_KEY" https://api.example.com/invoices/v1/pending

weikio subscription set#

Change the given fields of a subscription.

Terminal
weikio subscription set <p>/<name> --env E [--api a,b] [--owner S] [--rate-limit N/W] [--expires 90d|date] [--header "Name: value" ...] [--oidc-issuer URL] [--oidc-audience S] [--certificate-authority A] [--certificate-name N]
Argument or flag What it does
<subscription> Identifies the subscription, as project/name.
--api <api> Sets the subscription’s APIs, comma separated, in place of the current ones.
--owner <owner> Sets who the subscription is for.
--rate-limit <rate-limit> Sets the subscription’s rate limit, as N/W, such as 600/1m.
--expires <expires> Sets when the subscription expires, as a duration such as 90d or a date such as 2027-01-01.
-H, --header <header> Sets a header the gateway adds to this subscription’s requests, as “Name: value”. Repeat it for each header. The headers you give replace the current ones.
--oidc-issuer <oidc-issuer> Sets the issuer of the caller’s tokens, for type oidc.
--oidc-audience <oidc-audience> Sets the audience the caller’s tokens must have, for type oidc.
--certificate-authority <certificate-authority> Sets the gateway authority that issues the caller’s client certificate, for type certificate.
--certificate-name <certificate-name> Sets the name in the caller’s client certificate, for type certificate.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: PUT /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}.

weikio subscription key#

Create a subscription’s first credential and print it once. Use it for a subscription that came from Git through weikio apply, whose document has no credential.

Terminal
weikio subscription key <p>/<name> [--env E] [--username S]
Argument or flag What it does
<subscription> Identifies the subscription, as project/name.
--username <username> Sets the username of a basic credential. The default is the subscription’s current username, or its name.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: POST /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}/credential.

weikio subscription rotate-key#

Replace the credential of a subscription and print the new one once.

Terminal
weikio subscription rotate-key <p>/<name> [--env E] [--username S] [-y]
Argument or flag What it does
<subscription> Identifies the subscription, as project/name.
--username <username> Sets the username of a basic credential. The default is the subscription’s current username, or its name.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: POST /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}/credential.

weikio subscription disable#

Disable a subscription.

Terminal
weikio subscription disable <p>/<name> [--env E]
Argument or flag What it does
<subscription> Identifies the subscription, as project/name.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: PATCH /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}.

weikio subscription enable#

Enable a subscription.

Terminal
weikio subscription enable <p>/<name> [--env E]
Argument or flag What it does
<subscription> Identifies the subscription, as project/name.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: PATCH /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}.

weikio delete subscription#

Delete a subscription.

Terminal
weikio delete subscription <p>/<name> [--env E] [-y]
Argument or flag What it does
<subscription> Identifies the subscription, as project/name.
-y, --yes Skips the confirmation.
--reason <reason> Stores a reason for the change with the audit record.

Who can run it: a grant on the project whose role has author.

API: DELETE /api/v1/environments/{environment}/projects/{project}/api-subscriptions/{name}.

Exit codes#

The codes match the exit code table in the CLI reference.

Code Meaning
0 The command succeeded.
1 The command stopped without making the change.
2 The command has a usage error.
3 Your key is missing, expired or revoked, or its access doesn’t cover the command.
4 What you named doesn’t exist.
5 The change conflicts with another change.
6 Weik.io couldn’t be reached or wasn’t ready, or it was rate limiting your calls or out of storage. Run the command again later.
8 A document isn’t valid.

See also#

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo