How do you specify the name of a primitive created via the Python API?
After some  more searching I found the solution here Adding Named Objects in Blender with Python API

The following example creates five cubes with names 'LittleCube000', 'LittleCube001', 'LittleCube002', 'LittleCube003' and 'LittleCube004'

for i in range(5):
   add_cube(location = (i*2, 0, 0))
   bpy.context.active_object.name = 'LittleCube{:03}'.format(i)


You can also find an object named 'OldName', and updated to 'NewName':

object = bpy.data.objects.get('OldName')
if object:
    object.name = 'NewName'


However, if 'NewName' is already in use, then a numerical suffix will be automatically added to it.