Refine deploy workflow

OK this does not work for me with all sensible fields.  Is there some API documentation or a working example?