# Get environments for service **GET /api/apm/settings/agent-configuration/environments** **Spaces method and path for this operation:**
get /s/{space_id}/api/apm/settings/agent-configuration/environments
Refer to [Spaces](http://www.elastic.co/docs/deploy-manage/manage-spaces) for more information. ## Servers - http://localhost:5601: http://localhost:5601 () ## Authentication methods - Api key auth - Basic auth ## Parameters ### Headers - **elastic-api-version** (string) The version of the API to use ### Query parameters - **serviceName** (string) The name of the service ## Responses ### 200 Successful response #### Body: application/json (object) - **environments** (array[object]) Service environment list ### 400 Bad Request response #### Body: application/json (object) - **error** (string) Error type - **message** (string) Error message - **statusCode** (number) Error status code ### 401 Unauthorized response #### Body: application/json (object) - **error** (string) Error type - **message** (string) Error message - **statusCode** (number) Error status code ### 404 Not found response #### Body: application/json (object) - **error** (string) Error type - **message** (string) Error message - **statusCode** (number) Error status code [Powered by Bump.sh](http://bump.sh)