Update a property definition
prism.properties.update(strproperty_id, PropertyUpdateParams**kwargs) -> PropertyDefinition
PATCH/v2/prism/{teamId}/{objectType}/properties/{propertyId}
Patches the editable fields (name, icon, enabled) of a property definition. type and scoping fields are immutable; type must be supplied in the body so the server knows which per-type table to write.
Update a property definition
import os
from micro_so import Micro
client = Micro(
api_key=os.environ.get("MICRO_API_KEY"), # This is the default and can be omitted
)
property_definition = client.prism.properties.update(
property_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
object_type="comment",
type="num",
)
print(property_definition.id){
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"type": "num",
"alias": "app_stage",
"crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"locked": true,
"name": "name",
"native": true,
"options": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"color_scheme": "color_scheme",
"crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"description": "description",
"icon": "icon",
"list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"option_group": "option_group",
"sort_index": 0,
"value": "value"
}
],
"required": true,
"role_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"type": "num",
"alias": "app_stage",
"crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"locked": true,
"name": "name",
"native": true,
"options": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"color_scheme": "color_scheme",
"crm_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"description": "description",
"icon": "icon",
"list_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"option_group": "option_group",
"sort_index": 0,
"value": "value"
}
],
"required": true,
"role_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"team_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}