Advanced
The following advanced query parameters are available:
- Delete Dependents
- Create Missing Related Entities
The delete_dependents query parameter is used to enable the deletion of dependent Port entities. This is useful when you have two blueprints with a required relation, and the target entity in the relation should be deleted. In this scenario, the delete operation will fail if this flag is set to false, if the flag is set to true, the source entity will be deleted as well.
- Available at
DELETEAPI endpoint of a specific entity. - Default:
false(disabled) - Use case: Deletion of dependent Port entities. Must be enabled if you want to delete a target entity (and its source entities) when the entity's blueprint has required relations.
The create_missing_related_entities parameter is used to enable the creation of missing related Port entities. This is useful when you want to create an entity and its related entity in one call, or if you want to create an entity that its related entity does not exist yet.
In both of these scenarios, the resulting related entity will be a barebones entity which you can later on update with relevant information as usual.
Port creates barebones entities with only an identifier and a title. Port doesn't validate the blueprint's required relations when it creates them, so the entity can be invalid until you set those relations.
Any later write to a barebones entity validates the full blueprint, including its required relations. This applies even to a property-only update. If a required relation is still unset, the request fails with a 422 required_relation error.
To avoid this error, populate the required relation on the barebones entity before you make other updates to it.
If your org uses create_missing_related_entities, define a default relationship for the required relation of the related blueprint. This helps the barebones entities Port creates keep their required relation, so later updates don't fail with 422 required_relation.
- Available at
POST,PUT,PATCHAPI endpoints of a specific entity. - Default:
false(disabled) - Use case: Creation of missing related Port entities. Must be enabled, if you want to create a source entity (and its target related entity) even though the target entity doesn't exist.