docs/static/v0.5/extensibility/api/index.html
Each of Meshery’s APIs are subject to the following authentication and authorization system.
Requests to any of the API endpoints must be authenticated and include a valid JWT access token in the HTTP headers. Type of authentication is determined by the selected Provider. Use of the Local Provider, “None”, puts Meshery into single-user mode and does not require authentication.
Meshery authentication tokens allow users or systems to authenticate with Meshery Server via either its two clients, Meshery >CLI and UI, or its two APIs: REST or GraphQL.
Meshery's authentication token system provide secure access to Meshery's powerful management features.
Currently, Meshery only requires a valid token in order to allow clients to invoke its APIs.
Each of the API endpoints are exposed through server.go. Endpoints are grouped by function (e.g. /api/mesh or /api/perf).
Alternatively, Remote Providers can extend Meshery’s endpoints behind the /api/extensions/ endpoint.
There are two ways to get your authentication token:
Using Meshery UI, you can get a copy of your authentication token by following these steps:
http:<meshery-server>:9081/provider)Using Meshery CLI, you can get a copy of your authentication token by executing this command:
mesheryctl system login
In order to use this command, you must have a web broswer available on your system (this command cannot be executed on a headless system).
Meshery provides its GraphQl API at hostname:9081/api/graphql/query. A GraphQL request can be made as a POST request to the endpoint with the query as the payload.
Explore the Meshery GraphQL API using the interactive Playground provided with Meshery instance at localhost:9081/api/system/graphql/playground.
Meshery GrahphQL API can be used to perform three operations:
See 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.
Meshery provides a REST API available through the default port of 9081/tcp.
See REST API Reference Self-generated API documentation for Meshery’s REST API. Documentation is generated from Meshery’s Open API schema.