REST API Reference
Meshery’s APIs
Each of Meshery’s APIs are subject to the following authentication and authorization system. Meshery requires a valid token in order to allow clients to invoke its APIs.
Authentication
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](#providers). Use of the Local Provider, "None", puts Meshery into single-user mode and does not require authentication.What are authentication tokens?
Meshery authentication tokens allow users or systems to authenticate with Meshery Server via either its two clients, Meshery CLI and Meshery UI, or its two APIs: REST or GraphQL.Meshery's authentication token system provide secure access to Meshery's powerful management features.
How to get your token
There are two ways to get your authentication token:
Meshery UI
Using Meshery UI, you can get a copy of your authentication token by following these steps:1. Log into Meshery by selecting your identity provider of choice (typically found at
http:\\{meshery-server}:9081/provider
)
2. Navigate to your user's avatar in the upper righthand corner and select "Get Token" from the dropdown of profile section:
Meshery CLI
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 browser available on your system (this command cannot be executed on a headless system).
How to access Meshery’s REST API
Example using curl
Using curl, you can access Meshery's REST API by executing this command:
curl --location 'localhost:9081/api/<endpoint>' \ --header 'meshery-token: <yourToken>\ --header 'Cookie: meshery-provider=Meshery; meshery.layer5.io_ref=/;token=<yourToken>
Self-generated documentation based on Meshery’s OpenAPI specification for it’s REST API.
Meshery’s REST API can be explored interactively using the Swagger UI Playground.
Endpoints
/api/application
GET Handle GET request for Application Files
Description
Responses
200
-
/api/application/deploy
POST Handle POST request for Application File Deploy
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Upload Yaml/Yml File | formData | File |
Responses
200
-
DELETE Handle DELETE request for Application File Deploy
Description
Responses
200
/api/application/download/{id}/{sourcetype}
GET Handle GET request for Meshery Application with of source content
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Upload Yaml/Yml File | formData | File |
Responses
/api/application/types
GET Handle GET request for Meshery Application types
Description
Responses
200
-
/api/application/{id}
DELETE Handle Delete for a Meshery Application File
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
/api/application/{sourcetype}
POST Handle POST request for Application Files
Description
Responses
200
-
/api/content/design/share
POST Handle POST request for Sharing content
Description
Responses
500
200
403
/api/content/filter/share
POST Handle POST request for Sharing content
Description
Responses
200
403
500
/api/events
GET Handle GET request for events.
Description
Responses
200
/api/events/bulk
DELETE Handle DELETE request to delete events in bulk.
Description
Responses
200
/api/events/status
PUT Handle PUT request to update event status in bulk.
Description
Responses
200
-
/api/events/status/{id}
PUT Handle PUT request to update event status.
Description
Responses
200
-
/api/events/types
GET Handle GET request for available event categories and actions.
Description
Responses
200
/api/events/{id}
DELETE Handle DELETE request for events.
Description
Responses
200
/api/filter
GET Handle GET request for filters
Description
Responses
200
-
POST Handle POST requests for Meshery Filters
Description
Responses
200
-
/api/filter/catalog
GET Handle GET request for catalog filters
Description
Responses
200
-
/api/filter/catalog/publish
POST Handle Publish for a Meshery Filter
Description
Responses
202
/api/filter/catalog/unpublish
DELETE Handle UnPublish for a Meshery Filter
Description
Responses
200
/api/filter/clone/{id}
POST Handle Clone for a Meshery Filter
Description
Responses
200
/api/filter/deploy
POST Handle POST request for Filter File Deploy
Description
Responses
200
-
DELETE Handle DELETE request for Filter File Deploy
Description
Responses
200
/api/filter/file/{id}
GET Handle GET request for filter file with given id
Description
Responses
200
-
/api/filter/{id}
GET Handle GET request for a Meshery Filter
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
-
DELETE Handle Delete for a Meshery Filter
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
/api/identity/users
GET Handles GET for all Users
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
page | query | Integer | |
pageSize | query | Integer | |
search | query | String | |
order | query | in: order | String |
filter | query | in: filter | String |
Responses
200
-
/api/identity/users/keys
GET Handles GET for all Keys for users
Description
Responses
200
-
/api/integrations/connections
GET Handle GET request for getting all connections
Description
Responses
200
POST Handle POST request for creating a new connection
Description
Responses
201
/api/integrations/connections/status
GET Handle GET request for getting all connections status
Description
Responses
200
-
/api/integrations/connections/{connectionId}
PUT Handle PUT request for updating an existing connection by connection ID
Description
Responses
200
-
DELETE Handle DELETE request for deleting an existing connection by connection ID
Description
Responses
200
/api/integrations/connections/{connectionKind}
GET Handle GET request for getting all connections for a given kind.
Description
Responses
200
PUT Handle PUT request for updating an existing connection
Description
Responses
200
/api/integrations/environments
GET Handles GET for all Environments
Description
Responses
200
-
POST Handle POST request for creating a new environment
Description
Responses
201
/api/integrations/environments/{environmentID}/connections/{connectionID}
POST Handle POST to add Connection in Environment by ID
Description
Responses
200
-
DELETE Handle DELETE to remove Connection from Environment by ID
Description
Responses
201
/api/integrations/environments/{id}
GET Handle GET for Environment info by ID
Description
Responses
200
-
PUT Handle PUT request for updating a environment
Description
Responses
200
-
DELETE Handle DELETE for Environment based on ID
Description
Responses
201
/api/meshmodel/components/register
POST Handle POST request for registering meshmodel components.
Description
Responses
200
/api/meshmodel/generate
POST Handle POST request for component generation
Description
Responses
200
/api/meshmodel/validate
POST Handle POST request for validate
Description
Responses
200
/api/meshmodels/categories
GET Handle GET request for getting all meshmodel categories
Description
Responses
200
-
/api/meshmodels/categories/{category}
GET Handle GET request for getting all meshmodel categories of a given name
Description
Responses
200
-
/api/meshmodels/categories/{category}/components
GET Handle GET request for getting meshmodel components of a specific model and category.
Description
Responses
200
-
/api/meshmodels/categories/{category}/components/{name}
GET Handle GET request for getting meshmodel components of a specific type category.
Description
Responses
200
-
/api/meshmodels/categories/{category}/models
GET Handle GET request for getting all meshmodel models for a given category. The component type/model name should be lowercase like "kubernetes", "istio"
Description
Responses
200
-
/api/meshmodels/categories/{category}/models/{model}
GET Handle GET request for getting all meshmodel models for a given category. The component type/model name should be lowercase like "kubernetes", "istio"
Description
Responses
200
-
/api/meshmodels/categories/{category}/models/{model}/components
GET Handle GET request for getting meshmodel components of a specific model and category. The component type/model name should be lowercase like "kubernetes", "istio"
Description
Responses
200
-
/api/meshmodels/categories/{category}/models/{model}/components/{name}
GET Handle GET request for getting meshmodel components of a specific type by model and category.
Description
Responses
200
-
/api/meshmodels/components
GET Handle GET request for getting meshmodel components across all models and categories
Description
Responses
200
-
/api/meshmodels/components/{name}
GET Handle GET request for getting meshmodel components of a specific type by name across all models and categories
Description
Responses
200
-
/api/meshmodels/models
GET Handle GET request for getting all meshmodel models
Description
Responses
200
-
/api/meshmodels/models/{model}
GET Handle GET request for getting all meshmodel models. The component type/model name should be lowercase like "kubernetes", "istio"
Description
Responses
200
-
/api/meshmodels/models/{model}/components
GET Handle GET request for getting meshmodel components of a specific model. The component type/model name should be lowercase like "kubernetes", "istio"
Description
Responses
200
-
/api/meshmodels/models/{model}/components/{name}
GET Handle GET request for getting meshmodel components of a specific model.
Description
Responses
200
-
/api/meshmodels/models/{model}/policies/
GET Handle GET request for getting meshmodel policies of a specific model by name.
Description
Responses
200
-
/api/meshmodels/models/{model}/policies/{name}
GET Handle GET request for getting meshmodel policies of a specific model by name.
Description
Responses
200
-
/api/meshmodels/models/{model}/relationships
GET Handle GET request for getting meshmodel relationships of a specific model
Description
Responses
200
-
/api/meshmodels/models/{model}/relationships/{name}
GET Handle GET request for getting meshmodel relationships of a specific model by name.
Description
Responses
200
-
/api/meshmodels/registrants
GET Handle GET request for getting all meshmodel registrants
Description
Responses
200
-
/api/meshmodels/relationships
GET Handle GET request for getting all meshmodel relationships
Description
Responses
200
-
/api/pattern
GET Handle GET request for patterns
Description
Responses
200
-
POST Handle POST requests for patterns
Description
Responses
200
-
/api/pattern/catalog
GET Handle GET request for catalog patterns
Description
Responses
200
-
/api/pattern/catalog/publish
POST Handle Publish for a Meshery Pattern
Description
Responses
202
/api/pattern/catalog/unpublish
DELETE Handle Publish for a Meshery Pattern
Description
Responses
200
/api/pattern/clone/{id}
POST Handle Clone for a Meshery Pattern
Description
Responses
200
/api/pattern/deploy
POST Handle POST request for Pattern Deploy
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Upload Yaml/Yml File | formData | File |
Responses
200
DELETE Handle DELETE request for Pattern Deploy
Description
Responses
200
/api/pattern/{id}
GET Handle GET for a Meshery Pattern
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
-
DELETE Handle Delete for multiple Meshery Patterns
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
/api/patterns
DELETE Handle Delete for multiple Meshery Patterns
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
/api/perf/profile
GET Handle GET request to run a test
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Query | query | Unknown | |
Body | body | Unknown |
Responses
200
/api/perf/profile/result
GET Handles GET requests for perf results
Description
Responses
200
-
/api/perf/profile/result/{id}
GET Handles GET requests for perf result
Description
Responses
200
-
/api/policies/run_policy
POST
Description
Responses
/api/provider
GET Handle GET request for the choice of provider
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
provider | query | String |
Responses
200
/api/provider/capabilities
GET Handle GET requests for Provider
Description
Responses
200
/api/provider/extension
GET Handle GET request for React Components
Description
Responses
200
/api/providers
GET Handle GET request for list of providers
Description
Responses
200
-
/api/schema/resource/{resourceName}
GET Handles the request to retrieve and merge resource JSON schema and UI schema.
Description
Responses
/api/smi/results
GET Handle GET request for the results of all the smi conformance tests
Description
Responses
200
-
/api/system/adapter/manage
POST Handle POST requests to persist adapter config
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
meshLocationURL | body | Unknown |
Responses
200
-
DELETE Handle DELETE requests to delete adapter config
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
adapter | query | String |
Responses
200
/api/system/adapter/operation
POST Handle POST requests for Adapter Operations
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
adapter | query | String | |
query | query | String | |
customBody | query | String | |
namespace | query | String | |
deleteOp | query | String |
Responses
200
/api/system/adapters
GET Handle GET request for adapters
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
adapter | query | String |
Responses
200
-
/api/system/adapters/available
GET Handle GET request for available adapters
Description
Responses
200
-
/api/system/database
GET Handle GET request for getting summary about the system database.
Description
Responses
200
-
/api/system/database/reset
DELETE Reset the system database to its initial state.
Description
Responses
200
500
/api/system/kubernetes
POST Handle POST request for Kubernetes Config
Description
Responses
200
-
DELETE Handle DELETE request for Kubernetes Config
Description
Responses
200
/api/system/kubernetes/contexts
GET Handle GET request for all kubernetes contexts.
Description
Responses
200
-
POST Handle POST requests for Kubernetes Context list
Description
Responses
200
-
/api/system/kubernetes/ping?connection_id={id}
GET Handle GET request for Kubernetes ping
Description
Responses
200
/api/system/kubernetes/register
POST Handle registration request for Kubernetes components
Description
Responses
202
400
500
/api/system/meshsync/grafana
GET Handle GET request for mesh-sync grafana
Description
Responses
200
-
/api/system/meshsync/prometheus
GET Handle GET request for fetching prometheus
Description
Responses
200
-
/api/system/sync
GET Handle GET request for config sync
Description
Responses
200
-
/api/system/version
GET Handle GET request for system/server version
Description
Responses
200
-
/api/telemetry/metrics/board_import
POST Handle POST request for Prometheus board import
Description
Responses
200
-
/api/telemetry/metrics/boards
POST Handle POST request for Prometheus board
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Body | body | Unknown |
Responses
200
/api/telemetry/metrics/config
DELETE Handle DELETE for Prometheus configuration
Description
Responses
200
GET Handle GET for Prometheus configuration
Description
Responses
200
-
POST Handle POST for Prometheus configuration
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
prometheusURL | body | Unknown |
Responses
200
/api/telemetry/metrics/grafana/boards
GET Handle GET request for Grafana boards
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
dashboardSearch | query | String |
Responses
200
-
POST Handle POST request for Grafana boards
Description
Responses
200
/api/telemetry/metrics/grafana/config
GET Handle GET request for Grafana configuration
Description
Responses
200
-
POST Handle POST request for Grafana configuration
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Body | body | Unknown |
Responses
200
DELETE Handle DELETE request for Grafana configuration
Description
Responses
200
/api/telemetry/metrics/grafana/ping
GET Handle GET request for Grafana ping
Description
Responses
200
/api/telemetry/metrics/grafana/query
GET Handle GET request for Grafana queries
Description
Responses
200
/api/telemetry/metrics/grafana/scan
GET Handle GET request for Grafana
Description
Responses
200
-
/api/telemetry/metrics/ping
GET Handle GET request for Prometheus Ping
Description
Responses
200
/api/telemetry/metrics/query
GET Handle GET request for Prometheus Query
Description
Responses
200
/api/telemetry/metrics/static-board
GET Handle GET request for Prometheus static board
Description
Responses
200
-
/api/user/login
GET Handlers GET request for User login
Description
Responses
200
/api/user/logout
GET Handlers GET request for User logout
Description
Responses
200
/api/user/performance/profiles
GET Handle GET requests for performance profiles
Description
Responses
200
-
POST Handle POST requests for saving performance profile
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Body | body | Unknown |
Responses
200
-
/api/user/performance/profiles/results
GET Handles GET requests for performance results
Description
Responses
200
-
/api/user/performance/profiles/{id}
GET Handle GET requests for performance results of a profile
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
-
DELETE Handle Delete requests for performance profiles
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
/api/user/performance/profiles/{id}/results
GET Handle GET request for results of a profile
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
-
/api/user/performance/profiles/{id}/run
GET Handle GET request to run a performance test
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Body | query | Unknown |
Responses
200
/api/user/prefs
GET Handle GET Requests for User Load Test Preferences
Description
Responses
200
-
POST Handle POST Requests for User Load Test Preferences
Description
Responses
200
-
/api/user/prefs/perf
GET Handle GET request for load test preferences
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
uuid | query | String |
Responses
200
-
POST Handle POST request for load test preferences
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
Body | body | Unknown |
Responses
200
DELETE Handle DELETE request for load test preferences
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
uuid | query | String |
Responses
200
/api/user/profile/{id}
GET Handle GET for User info by ID
Description
Responses
200
-
/api/user/schedules
GET Handle GET request for Schedules
Description
Responses
200
-
POST Handle POST request for Schedules
Description
Responses
200
-
/api/user/schedules/{id}
GET Handle GET request for Schedules
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
-
DELETE Handle DELETE request for Schedules
Description
Parameters
Name | Located in | Description | Type |
---|---|---|---|
id | path | id for a specific | String |
Responses
200
-
/api/user/token
GET Handle GET request for tokens
Description
POST Handle POST request for tokens
Description
/api/v2/events
GET Handle GET request for events.
Description
Responses
200
-
/provider
GET Handle GET request to provider UI
Description
Responses
200