@chinningchen not sure if this will be useful, but below is a snippet in 4.5.0 comprised of several kit commands that can achieve those GUI actions:
from pxr import Usd, UsdGeom, UsdPhysics, Sdf, PhysxSchema
import omni, omni.usd, omni.kit.commands
stage = omni.usd.get_context().get_stage()
# create a torus in stage
omni.kit.commands.execute('CreateMeshPrimWithDefaultXform',
prim_type='Torus',
prim_path=None)
# get the torus prim
prim = stage.GetPrimAtPath('/World/Torus')
# apply particle sampling API
omni.kit.commands.execute('AddPhysicsComponent',
usd_prim=prim,
component='PhysxParticleSamplingAPI')
# get the particle system prim
particleSystem = stage.GetPrimAtPath('/World/ParticleSystem')
# apply particle isosurface API
omni.kit.commands.execute('AddPhysicsComponent',
usd_prim=particleSystem,
component='PhysxParticleIsosurfaceAPI')
feel free to test it out (i think it should still work in 4.2.0)