Whats the reason you need groovy? Where you say [quote: Im creating a groovy script to generate a POST json to include in a REST web service step] i dont understand why youre not using the OTB functionality to do this.
Later on in your post you seem to state you want the groovy to process and reports certain datasource stats.
Also you mentioned ypuve found some groovy you thought might work if updated...f you have some groovy, even if it doesnt work its alwaysbest to add it to your post so the groovy scripters on the forum (not me!) will have a better understanding of where youre at in regards to progress.
Example csv and request payload can only help too (although i always forget this bit too!)
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta