Connecting to Applications (API)

Applications

Applications represent external systems that consume processed data from Foundation. They serve as the final destination for your refined data products, enabling business insights, analytics, and operational decisions.

When to Connect Applications

  • Business intelligence: Visualize data for business insights and reporting

  • Dashboard creation: Build monitoring dashboards for key metrics

  • Machine learning: Feed data into ML models for predictive analytics

  • System integration: Connect transformed data with other business applications

  • Real-time analytics: Enable live data consumption for operational decisions

Application Types

  • Business Intelligence Tools: PowerBI

  • Custom Dashboards: dashboard.ai (MeshX's dashboard application)

  • Machine Learning Platforms: Various ML services and frameworks

  • Custom Applications: Industry-specific or purpose-built applications

  • API Consumers: Applications consuming data via REST APIs

Creating an Application

Step 1: Create Application

Endpoint: POST /api/data/application

{
  "entity": {
    "name": "Sales Analytics Dashboard",
    "entity_type": "application",
    "label": "SAD",
    "description": "PowerBI dashboard for sales performance analysis",
    "purpose": "Provide real-time sales insights to management team",
    "accountable_person": {
      "email": "[email protected]",
      "full_name": "Dashboard Administrator"
    },
    "business_impact": "Enables data-driven sales decisions and performance tracking"
  },
  "entity_info": {
    "owner": "[email protected]",
    "contact_ids": ["Application contact"],
    "links": ["example.com"]
  }
}

Endpoint: POST /api/data/link/data_product/application

Parameters:

  • identifier: Data product identifier

  • child_identifier: Application identifier

Python Functions

def create_application(name, description, purpose, business_impact, accountable_email="[email protected]", accountable_name="Application Manager"):
    """Create a new application"""
    response = requests.post(
        f"{API_URL}/data/application",
        headers=get_headers(),
        json={
            "entity": {
                "name": name,
                "entity_type": "application",
                "label": name[:3].upper(),
                "description": description,
                "purpose": purpose,
                "accountable_person": {
                    "email": accountable_email,
                    "full_name": accountable_name
                },
                "business_impact": business_impact
            },
            "entity_info": {
                "owner": accountable_email,
                "contact_ids": [f"{name} contact"],
                "links": ["example.com"]
            }
        }
    )
    
    if response.status_code == 200:
        app_id = response.json()["identifier"]
        print(f"Application '{name}' created with ID: {app_id}")
        return app_id
    else:
        print(f"Error creating application: {response.text}")
        return None

def link_data_product_to_application(data_product_id, application_id):
    """Link data product to application"""
    response = requests.post(
        f"{API_URL}/data/link/data_product/application",
        headers=get_headers(),
        params={
            "identifier": data_product_id,
            "child_identifier": application_id
        }
    )
    
    if response.status_code == 200:
        print(f"Successfully linked data product {data_product_id} to application {application_id}")
        return True
    else:
        print(f"Error linking data product to application: {response.text}")
        return False

def create_complete_application(name, description, purpose, business_impact, data_product_ids):
    """Create application and link to multiple data products"""
    # Create application
    app_id = create_application(name, description, purpose, business_impact)
    if not app_id:
        return None
    
    # Link to data products
    for product_id in data_product_ids:
        if not link_data_product_to_application(product_id, app_id):
            print(f"Failed to link data product {product_id}")
    
    print(f"Application setup completed: {app_id}")
    return app_id

Management Operations

def list_applications():
    """List all applications"""
    response = requests.get(f"{API_URL}/data/application/list", headers=get_headers())
    return response.json() if response.status_code == 200 else None

def get_queryable_applications():
    """Get applications available for querying"""
    response = requests.get(f"{API_URL}/data/application/list/query", headers=get_headers())
    return response.json() if response.status_code == 200 else None

def get_application(application_id):
    """Get specific application details"""
    response = requests.get(
        f"{API_URL}/data/application?identifier={application_id}",
        headers=get_headers()
    )
    return response.json() if response.status_code == 200 else None

def get_application_links(application_id):
    """Get data products linked to application"""
    response = requests.get(
        f"{API_URL}/data/application/link?identifier={application_id}",
        headers=get_headers()
    )
    return response.json() if response.status_code == 200 else None

def update_application_info(application_id, updated_info):
    """Update application information"""
    response = requests.put(
        f"{API_URL}/data/application/info?identifier={application_id}",
        headers=get_headers(),
        json=updated_info
    )
    return response.status_code == 200

Best Practices

  • Clear purpose: Define specific business purpose and impact for each application

  • Proper ownership: Assign accountable persons who understand the application's business context

  • Multiple connections: Link applications to multiple relevant data products for comprehensive insights

  • Health monitoring: Regularly check application health and data product connections

  • Documentation: Maintain clear descriptions of what data each application consumes and provides

  • Access control: Ensure applications have appropriate permissions for their intended use cases

Application Integration Patterns

Real-time Dashboards

  • Link to frequently updated data products

  • Use streaming or near-real-time data products

  • Monitor data freshness and quality

Batch Analytics

  • Connect to daily/weekly processed data products

  • Suitable for historical analysis and reporting

  • Less resource intensive for large datasets

Last updated