docs/static/v0.6/reference/rest-apis/index.html
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. 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 Meshery UI, or its two APIs: REST or GraphQL.
Meshery's authentication token system provide secure access to Meshery's powerful management features.
There are two ways to get your authentication token:
#Meshery UIUsing Meshery UI, you can get a copy of your authentication token by following these steps:
http:\\{meshery-server}:9081/provider)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).
#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\>
Meshery’s REST API can be explored interactively using the Swagger UI Playground.
Fetches the list of all applications saved by the current user ?updated\_after= timestamp should be of the format "YYYY-MM-DD HH:MM:SS" ?order={field} orders on the passed field ?search= A string matching is done on the specified application name ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10
200-Returns all meshery applications
Deploy an attached application file with the request
| Name | Located in | Description | Type |
|---|---|---|---|
| Upload Yaml/Yml File | formData | File |
200-Returns the response of the application files
Delete a deployed application file with the request
200
Get the application source-content
| Name | Located in | Description | Type |
|---|---|---|---|
| Upload Yaml/Yml File | formData | File |
Get application file types
200-Returns Meshery application types
Deletes a meshery application file with ID: id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200
Updates the design for the provided application
200-Fetches a single Meshery Application
Used to share designs with others
200
403
500
Used to share filters with others
200
403
500
Listens for events across all of Meshery's components like adapters and server, streaming them to the UI via Server Side Events This API call never terminates and establishes a persistent keep-alive connection over which EventsResponses are pushed.
200
Bulk delete events associated with the ids.
200
Bulk update status for the events associated with the ids.
200-Returns event
Updates event status for the event associated with the id.
200-Returns event
200
Deletes event associated with the id.
200
?order={field} orders on the passed field ?search= A string matching is done on the specified filter name ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?visibility={[visibility]} Default visibility is public + private; Mulitple visibility filters can be passed as an array Eg: ?visibility=["public", "published"] will return public and published filters200-Returns all meshery filters
Used to save/update a Meshery Filter
200-Returns a single meshery filter
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10. ?search={filtername} If search is non empty then a greedy search is performed200-Returns all meshery filters
Publishes filter to Meshery Catalog by setting visibility to published and setting catalog data
202
Unpublishes filter from Meshery Catalog by setting visibility to private and removing catalog data from website
200
Creates a local copy of a published filter with id: id
200
Deploy an attached filter file with the request
200-Returns the response of the Filter files
Delete a deployed filter file with the request
200
Returns the Meshery Filter file saved by the current user with the given id
200-Returns a single meshery filter
Fetches the Meshery Filter with the given id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200-Returns a single meshery filter
Deletes a meshery filter with ID: id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 20 ?search={username|email|first_name|last_name} If search is non empty then a greedy search is performed ?filter={condition}| Name | Located in | Description | Type |
|---|---|---|---|
| page | query | Integer | |
| pageSize | query | Integer | |
| search | query | String | |
| order | query | in: order | String |
| filter | query | in: filter | String |
200-Returns all users info
Returns all keys for user
200-Returns users Keys
?order={field} orders on the passed field ?search={} If search is non empty then a greedy search is performed ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10
200
Creates a new connection
201
Get all connections status
200-Returns all connections Status
Updates existing connection using ID
200-Returns a single connection
Deletes existing connection
200
Updates existing connection
200
?order={field} orders on the passed field ?search={} If search is non empty then a greedy search is performed ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10
200
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 20 ?search={environments_name} If search is non empty then a greedy search is performed ?filter={condition}200-Returns all environements
Creates a new environment
201
Returns Environment connection mapping info
200-Returns environment
Removes connection from environment
201
Returns Environment info
200-Returns environment
Updates a environment
200-Returns environment
Returns Environment info
201
Validate the given value with the given schema
200
Generates Meshery Components for the given payload
200
Validate the given value with the given schema
200
?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?search={categoryName} If search is non empty then a greedy search is performed ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Returns meshmodel categories
?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all ?search={[true/false]} If search is true then a greedy search is performed
200-Returns meshmodel categories
?version={version} ?trim={[true]} When trim is set to true, the underlying schemas are not returned for entities ?apiVersion={apiVersion} If apiVersion is unspecified then all models are returned ?order={field} orders on the passed field ?search={componentname} If search is non empty then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all200-Return meshmoddel components with the count of duplicates
Example: /api/meshmodels/categories/Orchestration and Management/components/Namespace Components can be further filtered through query parameter ?model={model} If model is unspecified then all models are returned ?version={version} If version is unspecified then all model versions are returned ?apiVersion={apiVersion} If apiVersion is unspecified then all components are returned ?order={field} orders on the passed field ?search={[true/false]} If search is true then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmoddel components with the count of duplicates
?version={version} If version is unspecified then all models are returned ?order={field} orders on the passed field ?search={modelname} If search is non empty then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmodel models with the count of duplicates
?version={version} If version is unspecified then all models are returned ?order={field} orders on the passed field ?search={[true/false]} If search is true then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmodel models with the count of duplicates
Example: /api/meshmodels/categories/Orchestration and Management/models/kubernetes/components Components can be further filtered through query parameter ?version={version} ?trim={[true]} When trim is set to true, the underlying schemas are not returned for entities ?apiVersion={apiVersion} If apiVersion is unspecified then all models are returned ?order={field} orders on the passed field ?search={componentname} If search is non empty then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmoddel components with the count of duplicates
Example: /api/meshmodels/categories/Orchestration and Management/models/kubernetes/components/Namespace Components can be further filtered through query parameter ?version={version} If version is unspecified then all model versions are returned ?apiVersion={apiVersion} If apiVersion is unspecified then all components are returned ?order={field} orders on the passed field ?search={[true/false]} If search is true then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmoddel components with the count of duplicates
?version={version} ?apiVersion={apiVersion} If apiVersion is unspecified then all models are returned ?order={field} orders on the passed field ?search={componentname} If search is non empty then a greedy search is performed ?trim={[true]} When trim is set to true, the underlying schemas are not returned for entities ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all200-Return meshmoddel components with the count of duplicates
Example: /api/meshmodels/components/Namespace Components can be further filtered through query parameter ?model={model} If model is unspecified then all models are returned ?version={version} If version is unspecified then all model versions are returned ?apiVersion={apiVersion} If apiVersion is unspecified then all components are returned ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?trim={[true]} When trim is set to true, the underlying schemas are not returned for entities ?search={[true/false]} If search is true then a greedy search is performed ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmoddel components with the count of duplicates
?version={version} If version is unspecified then all models are returned ?order={field} orders on the passed field ?search={modelname} If search is non empty then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all200-Return meshmodel models with the count of duplicates
?version={version} If version is unspecified then all models are returned ?order={field} orders on the passed field ?search={[true/false]} If search is true then a greedy search is performed ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all200-Return meshmodel models with the count of duplicates
Example: /api/meshmodels/models/kubernetes/components Components can be further filtered through query parameter ?version={version} ?trim={[true]} When trim is set to true, the underlying schemas are not returned for entities ?apiVersion={apiVersion} If apiVersion is unspecified then all models are returned ?search={componentname} If search is non empty then a greedy search is performed ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmoddel components with the count of duplicates
Example: /api/meshmodels/models/kubernetes/components/Namespace Components can be further filtered through query parameter ?version={version} If version is unspecified then all model versions are returned ?apiVersion={apiVersion} If apiVersion is unspecified then all components are returned ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?search={[true/false]} If search is true then a greedy search is performed ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Return meshmoddel components with the count of duplicates
Example: /api/meshmodels/models/kubernetes/policies ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?search={[true/false]} If search is true then a greedy search is performed ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Returns meshmodel policies
Example: /api/meshmodels/models/kubernetes/policies/{name} ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?search={[true/false]} If search is true then a greedy search is performed ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Returns meshmodel policies
Example: /api/meshmodel/model/kubernetes/relationship # Relationships can be further filtered through query parameter ?version={version} ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Returns meshmodel relationships
Example: /api/meshmodels/models/kubernetes/relationships/Edge # Relationships can be further filtered through query parameter ?version={version} ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?search={[true/false]} If search is true then a greedy search is performed ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Returns meshmodel relationships
?page={pagenumber} Default page number is 1 ?order={field} orders on the passed field ?search={Hostname} Gets host by the name ?sort={[asc/desc]} Default behavior is asc ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all200-Returns meshmodel registrants
?version={version} ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all200-Returns meshmodel relationships
Returns the list of all the patterns saved by the current user This will return all the patterns with their details ?order={field} orders on the passed field ?search= A string matching is done on the specified design name ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 10 ?visibility={[visibility]} Default visibility is public + private; Mulitple visibility filters can be passed as an array Eg: ?visibility=["public", "published"] will return public and published designs
200-Returns all meshery patterns
Edit/update a meshery pattern
200-Returns a single meshery pattern
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10. ?search={patternname} If search is non empty then a greedy search is performed200-Returns all meshery patterns
Publishes pattern to Meshery Catalog by setting visibility to published and setting catalog data
202
Unpublishes pattern from Meshery Catalog by setting visibility to private and removing catalog data from website
200
Creates a local copy of a published pattern with id: id
200
Deploy an attached pattern with the request
| Name | Located in | Description | Type |
|---|---|---|---|
| Upload Yaml/Yml File | formData | File |
200
Delete a deployed pattern with the request
200
Fetches the pattern with the given id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200-Returns a single meshery pattern
DeleteMultiMesheryPatternsHandler deletes patterns with the given ids
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200
DeleteMultiMesheryPatternsHandler deletes patterns with the given ids
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200
Runs the load test with the given parameters
| Name | Located in | Description | Type |
|---|---|---|---|
| Query | query | Unknown | |
| Body | body | Unknown |
200
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?search={} If search is non empty then a greedy search is performed ?from={date} Date must be in yyyy-mm-dd format ?to={date} Date must be in yyyy-mm-dd format200-Returns all performance results
Returns an individual result from provider
200-Returns Single test result
Handle POST request for running the set of policies on the design file, the policies are picked from the policies directory and query is sent to find all the relationships around the services in the given design file
Update the choice of provider in system
| Name | Located in | Description | Type |
|---|---|---|---|
| provider | query | String |
200
Returns the capabilities.json for the provider
200
handles the requests to serve react components from the provider package
200
Returns the available list of providers
200-Returns a list of available providers
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?search={status|mesh_version|mesh_name|date|id} If search is non empty then a greedy search is performed200-Returns SMI results
Used to persist adapter config
| Name | Located in | Description | Type |
|---|---|---|---|
| meshLocationURL | body | Unknown |
200-Returns all the meshery adapters
Used to delete adapter configuration
| Name | Located in | Description | Type |
|---|---|---|---|
| adapter | query | String |
200
Used to send operations to the adapters
| Name | Located in | Description | Type |
|---|---|---|---|
| adapter | query | String | |
| query | query | String | |
| customBody | query | String | |
| namespace | query | String | |
| deleteOp | query | String |
200
Fetches and returns all the adapters and ping adapters
| Name | Located in | Description | Type |
|---|---|---|---|
| adapter | query | String |
200-Return all the adapters
Fetches and returns all the adapters available for deployment
200-Return all the adapters
?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 10. To return all results: pagesize=all ?search={tablename} If search is non empty then a greedy search is performed200-Returns database summary
This endpoint resets the system database to its initial state by performing the following steps: Creates an archive of the current database contents. Drops all existing tables in the database. Applies auto migration to recreate the necessary tables.
200
500
Used to delete kubernetes config to System
200
Used to add kubernetes config to System
200-Returns saved kubernetes config
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?search={contextname} If search is non empty then a greedy search is performed200-Returns K8s contexts
Returns the context list for a given k8s config
200-Returns kubernetes context list
Fetches server version to simulate ping
200
Used to register Kubernetes components to Meshery from a kubeconfig file
202
400
500
Fetches Prometheus and Grafana
200-Returns a map for v1 services
Fetches Prometheus
200-Returns a map for v1 services
?apiVersion={apiVersion} If apiVersion is unspecified then all models are returned ?search={componentname} If search is non empty then a greedy search is performed ?order={field} orders on the passed field ?sort={[asc/desc]} Default behavior is asc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all ?annotation={annotaion} annotation is a boolean value. If true then annotations are returned ?labels={labels} labels is a boolean value. If true then labels are returned ?spec={spec} spec is a boolean value. If true then spec is returned ?status={status} status is a boolean value. If true then status is returned ?clusterId={clusterId} clusterId is a string value. If specified then resources for that cluster are returned
200-Returns MeshSync resources
Used to send session data to the UI for initial sync
200-Returns User Load Test Preferencee
Returns the running Meshery version
200-Returns Meshery version
Used for importing Grafana board for Prometheus
200-Response for prometheus board import
Used to persist selected board and panels
| Name | Located in | Description | Type |
|---|---|---|---|
| Body | body | Unknown |
200
Used for fetching Prometheus configuration
200-Returns prometheus configuration
Used for persisting Prometheus configuration
| Name | Located in | Description | Type |
|---|---|---|---|
| prometheusURL | body | Unknown |
200
Used for deleting Prometheus configuration
200
Used for fetching Grafana boards and panels
| Name | Located in | Description | Type |
|---|---|---|---|
| dashboardSearch | query | String |
200-Returns Grafana boards and panels
Used for persist Grafana boards and panel selections
200
Used for fetching Grafana configuration
200-Returns Grafana configs
Used for persisting Grafana configuration
| Name | Located in | Description | Type |
|---|---|---|---|
| Body | body | Unknown |
200
Used for Delete Grafana configuration
200
Used to initiate a Grafana ping
200
Used for handling Grafana queries
200
Fetches and returns Grafana
200-Returns a map for v1 services
Used to ping prometheus
200
Used to prometheus queries
200
Used to fetch the static board
200-Returns Prometheus static board
Redirects user for auth or issues session
200
Redirects user for auth or issues session
200
Returns the list of all the performance profiles saved by the current user ?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?search={profilename} If search is non empty then a greedy search is performed
200-Returns all the performance profiles
Save performance profile using the current provider's persistence mechanism
| Name | Located in | Description | Type |
|---|---|---|---|
| Body | body | Unknown |
200-Returns a single performance profile
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?search={} If search is non empty then a greedy search is performed ?from={date} Date must be in yyyy-mm-dd format ?to={date} Date must be in yyyy-mm-dd format200-Returns all performance results
Returns single performance profile with the given id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200-Returns a single performance profile
Deletes a performance profile with the given id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200
Fetches pages of results from provider for the given id ?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10 ?search={result_name|mesh|url} If search is non empty then a greedy search is performed
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200-Returns all performance results
Runs the load test with the given parameters
| Name | Located in | Description | Type |
|---|---|---|---|
| Body | query | Unknown |
200
Returns User Load Test Preferences
200-Returns User Load Test Preferencee
Updates User Load Test Preferences
200-Returns User Load Test Preferencee
Used for fetching load test preferences
| Name | Located in | Description | Type |
|---|---|---|---|
| uuid | query | String |
200-Returns load test preferences
Used for persisting load test preferences
| Name | Located in | Description | Type |
|---|---|---|---|
| Body | body | Unknown |
200
Used for deleting load test preferences
| Name | Located in | Description | Type |
|---|---|---|---|
| uuid | query | String |
200
Returns User info
200-Returns user info
?order={field} orders on the passed field ?page={page-number} Default page number is 0 ?pagesize={pagesize} Default pagesize is 10200-Returns List of saved schedules
Save schedule using the current provider's persistence mechanism
200-Returns a single schedules
Fetches and returns the schedule with the given id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200-Returns a single schedules
Deletes a schedule with the given id
| Name | Located in | Description | Type |
|---|---|---|---|
| id | path | id for a specific | String |
200-Returns List of saved schedules
Returns token from the actual provider in a file response: 200:
Receives token from the actual provider response: 200:
search={description} If search is non empty then a search is performed on event description ?category=[eventcategory] Returns event belonging to provided categories ?action=[eventaction] Returns events belonging to provided actions ?status={[read/unread]} Return events filtered on event status Default is unread```` ?severity=[eventseverity] Returns events belonging to provided severities ?sort={field} order the records based on passed field, defaults to updated_at ?order={[asc/desc]} Default behavior is desc ?page={page-number} Default page number is 1 ?pagesize={pagesize} Default pagesize is 25. To return all results: pagesize=all
200-Returns all events
Servers providers UI
200