GraphQL API Reference

Self-generated API documentation for Meshery’s GraphQL API. The API can be explored interactively using the GraphQL Playground. Documentation is generated from Meshery’s GraphQL schema. Each table below documents a GraphQL type.

WARNING: Fields that are deprecated are marked with {warning-solid}.

Query type

The Query type contains the API’s top-level entry points for all executable queries.

Query.connectToNats

Check is Meshey Server is connected to NATS, if not connect to the NATS Server.

Returns Status!.

Query.deployMeshsync

Check the Meshsync Status and deploy if not enabled.

Returns Status!.

Query.fetchAllResults

Query for fetching all results for profile ID.

Returns PerfPageResult!.

Arguments

Name Type Description
selector PageFilter!  

Query.fetchPatterns

Query for fetching all patterns with selector.

Returns PatternPageResult!.

Arguments

Name Type Description
selector PageFilter!  

Query.fetchResults

Query for fetching all results for profile ID.

Returns PerfPageResult!.

Arguments

Name Type Description
profileID String!  
selector PageFilter!  

Query.getAvailableAddons

Query details about Addons available (Eg. Prometheus and Grafana).

Returns [AddonList!]!.

Arguments

Name Type Description
selector MeshType Select Mesh Type.

Query.getAvailableNamespaces

Query available Namesapces in your cluster.

Returns [NameSpace!]!.

Query.getControlPlanes

Query Control Plane data for a Service Mesh (or all) in your cluster.

Returns [ControlPlane!]!.

Arguments

Name Type Description
filter ServiceMeshFilter Filter Control Plane Query.

Query.getDataPlanes

Query Data Plane information for a Service Mesh (or all) in your cluster.

Returns [DataPlane!]!.

Arguments

Name Type Description
filter ServiceMeshFilter Filter Control Plane Query.

Query.getKubectlDescribe

Query for getting kubectl describe details with meshkit.

Returns KctlDescribeDetails!.

Arguments

Name Type Description
kind String!  
name String!  
namespace String!  

Query.getMeshsyncStatus

Check the Meshsync Status.

Returns OperatorControllerStatus!.

Query.getNatsStatus

Check is Meshey Server is connected to NATS.

Returns OperatorControllerStatus!.

Query.getOperatorStatus

Query status of Meshery Operator in your cluster.

Returns OperatorStatus.

Query.getPerfResult

Query for performance result.

Returns MesheryResult.

Arguments

Name Type Description
id ID!  

Query.getPerformanceProfiles

Query for fetching all results for profile ID.

Returns PerfPageProfiles!.

Arguments

Name Type Description
selector PageFilter!  

Query.getScopes

Query for getting scopes.

Returns [OAMCapability].

Arguments

Name Type Description
id ID  
name String  
trim Boolean  

Query.getTraits

Query for getting traits.

Returns [OAMCapability].

Arguments

Name Type Description
id ID  
name String  
trim Boolean  

Query.getWorkloads

Query for getting workloads.

Returns [OAMCapability].

Arguments

Name Type Description
id ID  
name String  
trim Boolean  

Query.resyncCluster

Query to resync the cluster discovery.

Returns Status!.

Arguments

Name Type Description
selector ReSyncActions Selector to control several resync actions.

Mutation type

The Mutation type contains all the mutations you can execute.

All mutations receive their arguments in a single input object named input.

Mutation.changeAddonStatus

Change the Addon Status.

Input type: AddonStatusInput

Arguments

Name Type Description
selector MeshType Filter by Serice Mesh.
targetStatus Status! Desired Status.
Returns Status!.

Mutation.changeOperatorStatus

Change the Operator Status.

Input type: OperatorStatusInput

Arguments

Name Type Description
targetStatus Status! Desired status for Meshery Operator.
Returns Status!.

Subscription type

The Subscription type contains all the Subscriptions you can listen to.

Subscription.listenToAddonState

Listen to changes in status of Addons available (Eg. Prometheus and Grafana).

Returns [AddonList!]!.

Arguments

Name Type Description
selector MeshType Select Mesh Type.

Subscription.listenToControlPlaneState

Listen to changes in Control Plane data for a Service Mesh (or all) in your cluster.

Returns [ControlPlane!]!.

Arguments

Name Type Description
filter ServiceMeshFilter Filter Control Plane Query.

Subscription.listenToDataPlaneState

Listen to changes in Data Plane data for a Service Mesh (or all) in your cluster.

Returns [DataPlane!]!.

Arguments

Name Type Description
filter ServiceMeshFilter Filter Control Plane Query.

Subscription.listenToMeshSyncEvents

Listen to changes in the list of available Namesapces in your cluster.

Returns OperatorControllerStatus!.

Subscription.listenToOperatorState

Listen to changes in status of Meshery Operator in your cluster.

Returns OperatorStatus!.

Subscription.subscribeBrokerConnection

Listen to changes in Broker (NATS) Connection.

Returns Boolean!.

Subscription.subscribePerfProfiles

Listen to changes in Performance Profiles.

Returns PerfPageProfiles!.

Arguments

Name Type Description
selector PageFilter!  

Subscription.subscribePerfResults

Listen to all results for profile ID.

Returns PerfPageResult!.

Arguments

Name Type Description
profileID String!  
selector PageFilter!  

Object types

Object types represent the resources that the Meshery GraphQL API can return. They contain fields. Each field has its own type, which will either be one of the basic GraphQL scalar types (e.g.: String or Boolean) or other object types. Fields may have arguments. Fields with arguments are exactly like top-level queries, and are listed beneath the table of fields for each object type.

For more information, see Object Types and Fields on graphql.org.

AddonList

Deatils about the Addon Component.

Fields

Name Type Description
endpoint String! Endpoint (if applicable).
name String! Name.
owner String! Owner.

Container

Fields

Name Type Description
containerName String!  
controlPlaneMemberName String!  
image String!  
ports [Container_Port] args: NOT IMPLEMENTED.
resources Any env: NOT IMPLEMENTED,.
status Container_Status  

Container_Port

Fields

Name Type Description
containerPort Int!  
name String  
protocol String!  

Container_Status

Fields

Name Type Description
containerID Any  
containerStatusName String!  
image String!  
imageID Any  
lastState Any  
ready Boolean!  
restartCount Any  
started Boolean! image: String! imageID: String! containerID: String!.
state Any  

ControlPlane

Control Plane data for a particular Mesh.

Fields

Name Type Description
members [ControlPlaneMember!]! Members of the Mesh.
name String! Service Mesh Name.

ControlPlaneMember

Member Details.

Fields

Name Type Description
component String! Component.
data_planes [Container!] DataPlanes.
name String! Name.
namespace String! Namespace.
version String! Version.

DataPlane

Data Plane for a particular Mesh.

Fields

Name Type Description
name String! Service Mesh Name.
proxies [Container!]! Members of the Mesh.

Error

Fields

Name Type Description
code String! Error Code.
description String! Error Details.

KctlDescribeDetails

Fields

Name Type Description
describe String  

MesheryResult

Fields

Name Type Description
created_at String  
mesh String  
meshery_id String  
name String  
performance_profile String  
runner_results Map  
server_board_config String  
server_metrics String  
test_id String  
test_start_time String  
updated_at String  
user_id String  

NameSpace

Type to define a k8s Namespace.

Fields

Name Type Description
namespace String! Namespace Name.

OAMCapability

Fields

Name Type Description
host String  
id String  
metadata Any  
oam_definition Any  
oam_ref_schema String  
restricted Boolean  

OperatorControllerStatus

Controllers of Meshery Operator.

Fields

Name Type Description
error Error Controller Error Log.
name String! Controller Name.
status Status! Controller Status.
version String! Controller Verison.

OperatorStatus

Status of Meshery Operator and its controllers.

Fields

Name Type Description
controllers [OperatorControllerStatus!]! Details about various Controllers of Meshery Operator.
error Error Error Logs encountered by Meshery Operator.
status Status! Status of Meshery Operator.
version String! Verion of Meshery Operator.

PatternLocation

Fields

Name Type Description
branch String  
host String  
path String  
type String  

PatternPageResult

Fields

Name Type Description
page Int!  
page_size Int!  
patterns [PatternResult]  
total_count Int!  

PatternResult

Fields

Name Type Description
canSupport Boolean!  
created_at String  
errmsg String  
id ID!  
location PatternLocation!  
name String!  
pattern_file String!  
updated_at String  
user_id String!  

PerfPageProfiles

Fields

Name Type Description
page Int!  
page_size Int!  
profiles [PerfProfile]  
total_count Int!  

PerfPageResult

Fields

Name Type Description
page Int!  
page_size Int!  
results [MesheryResult]  
total_count Int!  

PerfProfile

Fields

Name Type Description
concurrent_request Int!  
content_type String  
created_at String  
duration String!  
endpoints [String]  
id String!  
last_run String  
load_generators [String]  
name String  
qps Int  
request_body String  
request_cookies String  
request_headers String  
service_mesh String  
total_results Int  
updated_at String  
user_id String!  

Enumeration types

Also called Enums, enumeration types are a special kind of scalar that is restricted to a particular set of allowed values.

For more information, see Enumeration Types on graphql.org.

MeshType

Service Mesh Types.

Value Description
ALL_MESH All meshes that Meshery supports.
APP_MESH AWS App Mesh.
CILIUM_SERVICE_MESH Cilium Service Mesh.
CITRIX_SERVICE_MESH Citrix Service Mesh.
CONSUL Consul by HashiCorp.
INVALID_MESH Invalid Mesh.
ISTIO Istio Service Mesh.
KUMA Kuma.
LINKERD LinkerD Service Mesh.
NETWORK_SERVICE_MESH Network Service Mesh.
NGINX_SERVICE_MESH NGINX Service Mesh.
OCTARINE Octarine Mesh.
OPEN_SERVICE_MESH Open Service Mesh.
TANZU VMware Tanzu Service Mesh.
TRAEFIK_MESH Traefik Mesh.

Status

Value Description
CONNECTED Connected (Applicable only for NATS status for now).
DISABLED Disabled.
ENABLED Enabled.
PROCESSING Processing.
UNKNOWN Unknown.

Scalar types

Scalar values are atomic values, and do not have fields of their own. Basic scalars include strings, boolean values, and numbers. This schema also defines various custom scalar values, such as types for times and dates.

This schema includes custom scalar types for identifiers, with a specific type for each kind of object.

For more information, read about Scalar Types on graphql.org.

Any

Boolean

Represents true or false values.

ID

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "VXNlci0xMA==") or integer (such as 4) input value will be accepted as an ID.

Int

Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Map

String

Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.

Time

Input types

Types that may be used as arguments (all scalar types may also be used as arguments).

Only general use input types are listed here. For mutation input types, see the associated mutation type above.

For more information, read about Scalar Types on graphql.org.

PageFilter

Arguments

Name Type Description
from String  
order String  
page String!  
pageSize String!  
search String  
to String  

ReSyncActions

Type ReSyncActions define the actions involved during resync.

Arguments

Name Type Description
ReSync String!  
clearDB String!  

ServiceMeshFilter

Filter Control Plane Query.

Arguments

Name Type Description
type MeshType Filter by Service Mesh.