Generate Cluster Command

POST - execute-hook

Sample URL

http://<IP>:<GWPORT>/avxapi/execute-hook?gwkey=f000ca01&gwsource=external

Description

This API used to generate cluster command.

Parameters

Table 1. Parameter Details
Param Type Name Mandatory Description Schema
Header sessionId Yes AppViewX Session ID. string
Query gwkey Yes Tenant Key string
Query gwsource Yes Source from which the request is triggered. string
body payload Yes Refer to sample request body payload

Payload

Table 2. Payload Details
Name Mandatory Description Field Type Constraints
hook Yes Contains all the hook params. hook NA
input Yes Tenant Key input NA

Hook

Table 3. Hook Details
Name Mandatory Description Field Type Constraints
name Yes Name of the hook. String

Possible value:

Cluster

Input

Table 4. Input Details
Name Mandatory Description Field Type Constraints
action Yes Specific action String

Possible value:

generate_commands

payload Yes Contains all the payload params. payload NA

Payload

Table 5. Payload Details
Name Mandatory Description Field Type Constraints
clusterName Yes Name of the Cluster. String NA
vendor Yes Contains all the payload params. String NA
connectivityType Yes Connection type for AppViewX KUBE+. String Possible Values:
  • EKS
  • AKS
  • GKE
  • OpenShift
  • Self-Managed
connectivityUrl Yes URL to connect AppViewX KUBE+ from the cluster. String Possible Values:

AppViewX URL, Cloud Connector URL

credType Yes Authentication credentials type. String Possible Values:
  • OAuth2.0
  • Basic Authentication
loginName No User name. String

Required if the credType is Authentication.

namespace Yes Namespace to deploy cert-orchestrator. String NA
purpose Yes Features to be enabled in the cert-orchestrator deployed in the cluster. List Possible Values:
  • Provision Certificates to K8s Secrets
  • Discover Certificates
  • Provision Certificates to Ephemeral Volumes
  • Discover K8's Infra Certificates
  • Enable mTLS Certificates for Service Mesh
certGroupType No Certificate Group to onboard and categorize certificates based on business rules. String

Required if the purpose consist of

  • Discover Certificates
  • Discover K8's Infra
    Certificates
Possible values:
  • Use Existing

  • Auto Create Group

groupName No Certificate Group name. String

Required if the purpose is Use Existing.

Sample Request

{
"payload": {
"hook": {
"name": "Cluster"
},
"input": {
"action": "generate_commands",
"payload": {
"clusterName": "testing",
"vendor": "EKS",
"connectivityType": "AppViewX URL",
"connectivityUrl": "https://{appviewx-fqdn}/",
"credType": "Basic Authentication",
"loginName": "admin",
"namespace": "crypto-mesh",
"purpose": [
"Provision Certificates to K8s Secrets",
"Discover Certificates",
"Provision Certificates to Ephemeral Volumes"
],
"certGroupType": "Use Existing",
"groupName": "Default"
}
}
}
}

Sample Response

{
"response": {
"status": "Success",
"output": {
"status": "Success",
"response": "\"Create Namespace for Cert-Orchestrator plugin\"\n\nkubectl create ns crypto-mesh\n\n\
},
"type": "script"
},
"message": null,
"appStatusCode": null,
"tags": null,
"headers": null
}

Consumes

application/json

Produces

application/json

Tags

kube