Switched API_KEY in tests to an environment variable and added the fields attribute to pipelines