Skip to main content
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
integer
default:"0"
Page number for pagination
pagesize
integer
default:"10"
Number of designs per page
Search term for filtering designs by name
order
string
Field to order by

Response

page
integer
Current page number
page_size
integer
Number of items per page
total_count
integer
Total number of designs
patterns
array
Array of design objects

Get Design by ID

curl -H "Authorization: Bearer $TOKEN" \
  http://localhost:9081/api/pattern/{id}
Method: GET Endpoint: /api/pattern/{id}

Path Parameters

id
string
required
Design ID (UUID)

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

name
string
required
Design name
pattern_data
object
required
Design data including the pattern file
save
boolean
default:"true"
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

sourcetype
string
required
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

id
string
required
Design ID (UUID)

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

id
string
required
Design ID to deploy
name
string
Design name

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

id
string
required
Design ID to clone

Download Design

curl -H "Authorization: Bearer $TOKEN" \
  http://localhost:9081/api/pattern/download/{id}
Method: GET Endpoint: /api/pattern/download/{id}

Path Parameters

id
string
required
Design ID to download

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.
file
file
required
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

page
integer
default:"0"
Page number
pagesize
integer
default:"10"
Page size

Response

Returns a paginated list of published catalog designs.