Create Or Update SNI

PUT {{gateway}}/snis/:sniNameOrId

Create Or Update SNI konghq

  • Inserts (or replaces) the SNI under the requested resource with the definition specified in the body. The SNI will be identified via the name or id attribute.
  • When the name or id attribute has the structure of a UUID, the SNI being inserted/replaced will be identified by its id. Otherwise it will be identified by its name.
  • When creating a new SNI without specifying id (neither in the URL nor in the body), then it will be auto-generated.
  • Notice that specifying a name in the URL and a different one in the request body is not allowed.
AttributesMandatoryTypeDescription
sni name or idrequiredpathThe unique identifier or the name of the SNI to create or update

Request Body

AttributesMandatoryTypeDescription
namerequiredbodyThe SNI name to associate with the given certificate.
tagsoptionalbodyAn optional set of strings associated with the SNIs, for grouping and filtering.
certificaterequiredbodyThe id (a UUID) of the certificate with which to associate the SNI hostname. The Certificate must have a valid private key associated with it to be used by the SNI object. With form-encoded, the notation is certificate.id=. With JSON, use “"certificate":{"id":""}.

Request Body

{"name"=>"my-sni", "tags"=>["user-level", "low-priority"], "certificate"=>{"id"=>"a2e013e8-7623-4494-a347-6d29108ff68b"}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring