The commit that added "configure expiration" command is a good reference point: de40334a10ee0001f93cfba2e663fa929c8bf57c
The wire format source of truth for this command atm is located in the github repo wiki: https://github.com/puppetlabs/puppetdb/wiki/Workspace-support-plan-stage-1