Designs (also called patterns) are declarative definitions of infrastructure and application configurations in Meshery. They allow you to define, version, and deploy cloud native infrastructure as code.
List Designs
curl -H "Authorization: Bearer $TOKEN" \
"http://localhost:9081/api/pattern?page=0&pagesize=25"
Method: GET
Endpoint: /api/pattern
Query Parameters
Page number for pagination
Number of designs per page
Search term for filtering designs by name
Response
Get Design by ID
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:9081/api/pattern/{id}
Method: GET
Endpoint: /api/pattern/{id}
Path Parameters
Response
Returns a single design object including the pattern file content.
Create Design
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Application",
"pattern_data": {
"name": "My Application",
"design_file": {
"name": "my-app",
"version": "0.0.1",
"services": {}
}
},
"save": true
}' \
http://localhost:9081/api/pattern
Method: POST
Endpoint: /api/pattern
Request Body
Design data including the pattern file
Whether to save the design
Response
Status: 201 Created
Returns the created design object.
Update Design
curl -X PUT \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Design Name",
"pattern_data": {...}
}' \
http://localhost:9081/api/pattern/{sourcetype}
Method: PUT
Endpoint: /api/pattern/{sourcetype}
Path Parameters
Source type of the design (e.g., yaml, json, helm, docker-compose)
Delete Design
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
http://localhost:9081/api/pattern/{id}
Method: DELETE
Endpoint: /api/pattern/{id}
Path Parameters
Deploy Design
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "design-uuid",
"name": "My Design"
}' \
http://localhost:9081/api/pattern/deploy
Method: POST
Endpoint: /api/pattern/deploy
Request Body
Undeploy Design
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "design-uuid"
}' \
http://localhost:9081/api/pattern/deploy
Method: DELETE
Endpoint: /api/pattern/deploy
Clone Design
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
http://localhost:9081/api/pattern/clone/{id}
Method: POST
Endpoint: /api/pattern/clone/{id}
Path Parameters
Download Design
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:9081/api/pattern/download/{id}
Method: GET
Endpoint: /api/pattern/download/{id}
Path Parameters
Response
Returns the design file as a downloadable attachment.
Import Design
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-F "file=@design.yaml" \
http://localhost:9081/api/pattern/import
Method: POST
Endpoint: /api/pattern/import
Request Body
Multipart form data with a file upload.
Design file to import (YAML, JSON, Helm, Docker Compose, etc.)
Get Design Types
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:9081/api/pattern/types
Method: GET
Endpoint: /api/pattern/types
Response
Returns available design types and source formats.
Publish Design to Catalog
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "design-uuid",
"catalog_data": {
"content_class": "official",
"type": "deployment"
}
}' \
http://localhost:9081/api/pattern/catalog/publish
Method: POST
Endpoint: /api/pattern/catalog/publish
Unpublish Design from Catalog
curl -X DELETE \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "design-uuid"
}' \
http://localhost:9081/api/pattern/catalog/unpublish
Method: DELETE
Endpoint: /api/pattern/catalog/unpublish
Get Catalog Designs
curl -H "Authorization: Bearer $TOKEN" \
"http://localhost:9081/api/pattern/catalog?page=0&pagesize=25"
Method: GET
Endpoint: /api/pattern/catalog
Query Parameters
Response
Returns a paginated list of published catalog designs.