For example, the command to create a cube is:
bpy.ops.mesh.primitive_cube_add(view_align=False,
enter_editmode=False,
location=(0.0, 0.0, 0.0),
rotation=(0, 0, 0),
layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
But how do you specify its name so it's not automatically determined (e.g. Cube.001)?