add scripts to api layouts