Creating and Managing Meshes

Meshes

Meshes are collaboration spaces that transcend organizational boundaries, enabling controlled data sharing and joint data product development. They govern how data is discovered, accessed, and shared across teams.

When to Use Data Meshes

Data meshes are essential in the following scenarios:

  • Organizational alignment: When you need to organize data products by department, domain, or business function (e.g., "Sales Analytics", "Customer Experience", "Financial Reporting")

  • Access control: When you want to implement different access controls for different groups of data products

  • Domain ownership: When you're implementing a data mesh architecture with domain-specific data ownership and governance

  • Environment separation: When you want to separate development (dev), testing (test), and production (prod) environments

  • Business boundary definition: When you need clear boundaries for data governance and compliance within specific business areas

Creating a Data Mesh

Creating a data mesh establishes the foundational container for all your data products and related resources within a specific domain.

API Request

Endpoint: POST /api/data/mesh

Request Body:

{
  "entity": {
    "name": "Mesh Example",
    "entity_type": "mesh",
    "label": "TME",
    "description": "This is an example for a Mesh",
    "purpose": "Enterprise data organization and governance",
    "assignees": [
      {
        "email": "[email protected]",
        "full_name": "Mesh Administrator",
        "role": "Role"
      }
    ],
    "security_policy": [
      "statement_1"
    ]
  },
  "entity_info": {
    "owner": "[email protected]",
    "contact_ids": [
      "Mesh Support Contact"
    ],
    "links": []
  }
}

Required Headers

Authorization: Bearer {your_access_token}
x-org: {your_organization_name}

Key Fields Explanation

Standard Fields:

  • name: Descriptive name for the mesh (should reflect the business domain)

  • entity_type: Always "mesh" for mesh endpoints

  • label: Short identification code (typically 3 letters)

  • description: Detailed description of the mesh's purpose and scope

Mesh-Specific Fields:

  • purpose: The business purpose and strategic value of this mesh

  • assignees: List of people responsible for managing this mesh, including their roles

  • security_policy: List of security policy statements that apply to all resources within this mesh

  • entity_info: Contact information for the person/team responsible for this mesh

Response

Upon successful creation, the API returns a response containing the mesh details:

{
  "entity": {
    "identifier": "bc2f439d-c142-4044-bf57-7dda09975266",  
    "urn": "urn:meshx:backend:data:root:mesh:bc2f439d-c142-4044-bf57-7dda09975266",
    "name": "Mesh Example",
    "is_system": false,
    "description": "This is an example for a Mesh",
    "label": "TME",
    "created_at": "2025-04-10T13:30:27.416441Z",
    "state": {
      "code": "000",
      "reason": "Created.",
      "healthy": true
    },
    "owner": null,
    "purpose": "Enterprise data organization and governance",
    "assignees": [
      {
        "email": "[email protected]",
        "full_name": "Mesh Administrator",
        "role": "Role"
      }
    ],
    "security_policy": [
      "statement_1"
    ]
  },
  "entity_info": {
    "owner": "[email protected]",
    "contact_ids": [
      "Mesh Support Contact"
    ],
    "links": []
  },
  "links": {
    "parents": [],
    "children": []
  }
}

Important: Store the identifier from the response for future operations and for linking other resources to this mesh.

Python Example

Here's a comprehensive Python example for creating and managing data meshes:

def create_mesh(name, description, purpose, owner_email="[email protected]"):
    """Create a new data mesh"""
    mesh_resp = requests.post(
        f"{API_URL}/data/mesh",
        headers=get_headers(),
        json={
            "entity": {
                "name": name,
                "entity_type": "mesh",
                "label": name[:3].upper(),
                "description": description,
                "purpose": purpose,
                "assignees": [
                    {
                        "email": owner_email,
                        "full_name": "Mesh Administrator",
                        "role": "Administrator"
                    }
                ],
                "security_policy": ["default_policy"]
            },
            "entity_info": {
                "owner": owner_email,
                "contact_ids": [f"{name} Support"],
                "links": []
            }
        }
    )
    
    if mesh_resp.status_code == 200:
        mesh_id = mesh_resp.json()["entity"]["identifier"]
        print(f"Mesh '{name}' created with ID: {mesh_id}")
        return mesh_id
    else:
        print(f"Error creating mesh: {mesh_resp.text}")
        return None

# Example usage
sales_mesh_id = create_mesh(
    name="Sales Analytics",
    description="Data mesh for sales performance analysis and reporting",
    purpose="Enable data-driven sales insights and performance optimization",
    owner_email="[email protected]"
)



Reintentar

Managing Existing Data Meshes

Once you have created data meshes, you can perform various management operations:

List All Data Meshes

GET /api/data/mesh/list

Get Specific Data Mesh

GET /api/data/mesh?identifier={mesh_id}

Update Data Mesh

PUT /api/data/mesh?identifier={mesh_id}

Best Practices

When designing your mesh architecture, consider these best practices:

  • Align with business domains: Create meshes that reflect your organizational structure and business domains

  • Clear ownership: Assign specific teams or individuals to manage each mesh

  • Appropriate security policies: Implement security policies that match the sensitivity and compliance requirements of each domain

  • Environment separation: Use separate meshes for development, testing, and production to maintain data integrity

  • Resource planning: Plan which resources will be shared vs. mesh-exclusive to optimize efficiency and governance

Last updated