Skip to content

Deployed Items

A deployed item holds the provisioning output produced when a service owner fulfils a change instance — connection strings, IP addresses, hostnames, credentials, or any structured data that the consumer needs to use the service.

Accessed via client.deployed_items.

Model properties

Property Type Description
id int Deployed item ID
name str Deployed item name
service_item_id int Associated service item ID
change_instance_id int The change instance that created this item
data_field dict The provisioning payload (connection info, config, etc.) — accesses the data field in the API response
created datetime Creation timestamp
modified datetime Last modified timestamp

Methods

list(**filters)

Returns a lazy generator of deployed items. Use for large result sets.

Filters:

Filter Type Description
ordering str Sort field — prefix with - for descending (e.g. -created)
# All deployed items
for item in client.deployed_items.list():
    print(item.id, item.name)

# Most recently created first
for item in client.deployed_items.list(ordering="-created"):
    print(item.id, item.created)

filter(**filters)

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

items = client.deployed_items.filter(ordering="-created")
print(f"Found {len(items)} deployed items")

get(id)

Retrieves a single deployed item by ID. Raises NetorcaNotFoundError if not found.

item = client.deployed_items.get(789)

print(item.id)
print(item.name)
print(item.service_item_id)
print(item.change_instance_id)
print(item.data_field)    # the provisioning payload
print(item.created)
print(item.modified)

# Access any API field not exposed as a property
print(item.data['version'])  # version number of the deployed item

create(data)

Creates a deployed item to record the output of a provisioning operation. This is how a service owner records what was actually deployed in response to a change instance.

Field Type Required Description
service_item int yes The service item being fulfilled
change_instance int yes The change instance being resolved
data dict yes The provisioning payload — any structure you choose
item = client.deployed_items.create({
    "service_item": 123,
    "change_instance": 456,
    "data": {
        "host":     "db-prod-01.internal",
        "port":     5432,
        "database": "myapp",
        "username": "app_user"
    }
})
print(item.id)
print(item.data_field)   # same dict returned as data_field

update(id, data, partial=True)

Updates a deployed item — for example to reflect a failover or configuration change after the initial provisioning. Defaults to PATCH.

Parameter Type Description
id int Deployed item ID
data dict Fields to update
partial bool True (default) = PATCH, False = PUT
# Update connection details after a failover
client.deployed_items.update(789, {
    "data": {
        "host":     "db-prod-02.internal",
        "port":     5432,
        "database": "myapp",
        "username": "app_user"
    }
})

delete(id)

Permanently deletes a deployed item.

client.deployed_items.delete(789)

get_dependant(**filters)

Returns deployed items that depend on other deployed items — i.e. items that require another deployed item to exist before they can be used. Returns a list of raw dicts.

Filters: same as list().

dependants = client.deployed_items.get_dependant()
for dep in dependants:
    print(dep)