Viewpoints API
Note
⚙️ Advanced / API Reference — Complete reference for working with ArchiMate viewpoints and viewpoint-related APIs.
Overview
Viewpoints are standard perspectives on an ArchiMate model, each targeting a specific stakeholder group. PyArchimate provides tools to:
Retrieve available viewpoints for a model
Query which elements are valid in a specific viewpoint
Assign elements to viewpoints
Filter model views by viewpoint
The two main modules for viewpoint operations are:
pyArchimate.viewpoint— Core viewpoint definitions and utilitiespyArchimate.viewpoint_registry— Registry of all standard ArchiMate viewpoints
Standard Viewpoints
ArchiMate defines 13 standard viewpoints. Each viewpoint focuses on a specific architectural perspective:
Business Layer Viewpoints
Business Process ViewpointShows business processes and how they relate. Audience: business analysts, process owners.
Business Function ViewpointDisplays business functions and their responsibilities. Audience: business strategists.
Business Interaction ViewpointRepresents interactions between business actors. Audience: organization stakeholders.
Application Layer Viewpoints
Application Structure ViewpointShows application components and their relationships. Audience: application architects.
Application Usage ViewpointDisplays how applications are used by business processes. Audience: application users, business analysts.
Technology Layer Viewpoints
Technology Structure ViewpointShows infrastructure components and their relationships. Audience: infrastructure architects.
Technology Usage ViewpointDisplays how technology supports applications. Audience: infrastructure operators.
Cross-Layer Viewpoints
Business Process Realization ViewpointMaps business processes to applications and technology. Audience: enterprise architects.
Business Function Realization ViewpointMaps business functions to applications. Audience: business and application architects.
Service Realization ViewpointShows how services are realized by applications and infrastructure. Audience: service architects.
Stakeholder-Specific Viewpoints
Implementation and Deployment ViewpointShows implementation and deployment details. Audience: project managers, deployment engineers.
Motivation ViewpointDisplays business drivers, goals, and requirements. Audience: business strategists, stakeholders.
Migration and Implementation Viewpoint
Migration and Implementation ViewpointShows migration paths and transformation details. Audience: program managers, transformation leads.
API Reference
Viewpoint entity and association classes.
- class pyArchimate.viewpoint.Viewpoint(id: str, name: str, description: str)[source]
Bases:
objectAn ArchiMate 3.x viewpoint definition (immutable registry entry).
- Parameters:
id – Canonical string slug (e.g. ‘stakeholder’, ‘technology’)
name – Human-readable viewpoint name
description – Brief description of the viewpoint’s purpose
- description: str
- id: str
- name: str
Registry of all 13 standard ArchiMate 3.x viewpoints.
Usage Examples
Get all viewpoints for a model
from pyArchimate import Model
model = Model.read("mymodel.archimate")
# Get all available viewpoints
viewpoints = model.get_viewpoints()
for viewpoint in viewpoints:
print(f"Viewpoint: {viewpoint.name} ({viewpoint.slug})")
Get elements valid in a viewpoint
from pyArchimate.viewpoint_registry import VIEWPOINTS
# Access Business Process viewpoint
bp_viewpoint = VIEWPOINTS['business-process']
# Get elements that are valid in this viewpoint
valid_elements = bp_viewpoint.get_valid_elements()
print(f"Valid elements: {[e.name for e in valid_elements]}")
Assign an element to a viewpoint
element = model.get_element("elem_id")
# Assign to Business Process viewpoint
element.assign_viewpoint('business-process')
Filter elements by viewpoint
# Get all elements valid in Technology Structure viewpoint
tech_elements = model.get_elements_by_viewpoint('technology-structure')
print(f"Technology elements: {[e.name for e in tech_elements]}")
Validate element in viewpoint
from pyArchimate import ArchiType
from pyArchimate.viewpoint_registry import is_valid_in_viewpoint
# Check if BusinessProcess is valid in Business Process viewpoint
valid = is_valid_in_viewpoint(
ArchiType.BusinessProcess,
'business-process'
)
print(f"Valid: {valid}")
New to This Topic?
If you’re new to viewpoints, start with:
Core Concepts — Introduction to viewpoints and their role in ArchiMate
Element Hierarchies — Understanding element organization
Getting Started — Getting started with pyArchimate
See Also
Element Class API Reference — Element API reference
Model Class - Hierarchy & Query API Reference — Model API reference
Architecture Overview — Package structure and architecture