Skip to content

Applications

An application is a named grouping that belongs to a consumer team. Service items are always associated with an application — it is the unit that consumers use to organise the things they have requested.

Applications are read-only via the API — they are created and managed automatically by the platform when consumers submit service requests. create, update, and delete are not supported.

Accessed via client.applications.

Model properties

The Python model exposes these convenience properties. Additional API fields (such as runtime_status, change_state, and item counts) are accessible via app.data['field_name'].

Property Type Description
id int Application ID
name str Application name
description str Application description
owner_id int Owner team ID
owner_name str Owner team name
created datetime Creation timestamp
modified datetime Last modified timestamp

Additional fields in app.data:

Field Type Description
runtime_status str Application runtime status (REQUESTED, IN_SERVICE, DECOMMISSIONED)
change_state str Aggregate state of all change instances for this application
num_service_items int Total number of service items in this application
num_pending_changes int Number of change instances currently pending
num_approved_changes int Number of change instances currently approved
num_completed_changes int Number of completed change instances
metadata dict Arbitrary metadata attached to the application

Methods

list(**filters)

Returns a lazy generator of all applications. Use for large result sets.

Filters:

Filter Type Description
name str Exact name match
name_contains str Partial name match
include_decommissioned bool Include decommissioned applications (default: False)
ordering str Sort field — prefix with - for descending (e.g. name, -modified)
# All applications
for app in client.applications.list():
    print(app.name, app.owner_name)

# Sorted by name
for app in client.applications.list(ordering="name"):
    print(app.name)

# Including decommissioned
for app in client.applications.list(include_decommissioned=True):
    print(app.name, app.data['runtime_status'])

filter(**filters)

Same as list() but returns all results as a list. Accepts the same filters.

# Applications whose name contains "prod"
apps = client.applications.filter(name_contains="prod")
print(f"Found {len(apps)} matching applications")

# Application with a specific name
apps = client.applications.filter(name="payment-service")

# Most recently modified first
apps = client.applications.filter(ordering="-modified")

get(id)

Retrieves a single application by ID. Raises NetorcaNotFoundError if not found.

app = client.applications.get(10)

print(app.id)
print(app.name)
print(app.description)
print(app.owner_name)
print(app.owner_id)
print(app.created)
print(app.modified)

# Additional API fields
print(app.data['runtime_status'])
print(app.data['change_state'])
print(app.data['num_service_items'])
print(app.data['num_pending_changes'])