Develop > API calls > Application environment APIs > List environments associated with an application design version

List environments associated with an application design version

This API lists all environments associated to the application design.

The appDesignId (ID of the application design) parameter is required for executing this API. With appDesignId as the parameter, the API lists environments that are associated to all the life cycle stages of the specified application design.

Optionally, you can also provide lifecycleStage, StartIndex, and pageSize as parameters. With lifecycleStage as parameter along with appDesignId, the API returns environments that are associated to the specified life cycle stage of the application design.

URI Method Parameters Returns
http://[host]:[port]/csa/api/codar/app-environment GET
  • appDesignId - Id ofthe application design
  • (Optional) lifecycleStage - Filters the response by life cycle stage.
  • (Optional) startIndex - A number that specifies the offset of the first entry to be included in the page.
  • (Optional) pageSize - A number that specifies the page size.

200 - Successful
400 - Bad request
401 - Not authorized
404 - Not found
500 - Internal server error

Example

The following URL was sent:

https://localhost:8444/csa/api/codar/app-environments?appDesignId=980aa84e-2b04-48f3-af18-7b2595716abb

The following JSON was returned:

{ "members": [ { "@self": "/csa/api/codar/app-lifecycle/stages/84905d24-d92f-4916-b312-78af206d31a5", "@type": "urn:x-hp:2012:software:cloud:data_model:lifeCycleStage", "id": "84905d24-d92f-4916-b312-78af206d31a5", "name": "DEVELOPMENT", "displayName": "test stage1", "description": "test stage1 desc", "count": "1", "color": "#ffffff", "icon": "/csa/api/blobstore/Service_Design.png?tag=library", "environments": [ { "@self": "/csa/api/resource/environment/8a8186da513854bf01513d73dcb50c24", "@type": "urn:x-hp:2012:software:cloud:data_model:resource-environment", "id": "8a8186da513854bf01513d73dcb50c24", "name": "Testing environment", "description": "Testing environment", "icon": "/csa/images/library/other.png" } ] }, { "@self": "/csa/api/codar/app-lifecycle/stages/84905d24-d92f-4916-b312-78af206d31a8", "@type": "urn:x-hp:2012:software:cloud:data_model:lifeCycleStage", "id": "84905d24-d92f-4916-b312-78af206d31a8", "name": "PRODUCTION", "displayName": "Production", "description": "The final stage in which the artifacts are deployed and can go live.", "count": "0", "color": "#ff887c", "icon": "/csa/api/blobstore/lifecycle_stage_production.png?tag=library", "environments": [] }, { "@self": "/csa/api/codar/app-lifecycle/stages/673b77f2-127b-45a5-81e5-25efbdfcd960", "@type": "urn:x-hp:2012:software:cloud:data_model:lifeCycleStage", "id": "673b77f2-127b-45a5-81e5-25efbdfcd960", "name": "TEST_STAGE", "displayName": "test stage", "description": "test stage desc", "count": "2", "color": "#ffffff", "icon": "/csa/api/blobstore/Service_Design.png?tag=library", "environments": [ { "@self": "/csa/api/resource/environment/8a8186da513854bf01513d733be40c22", "@type": "urn:x-hp:2012:software:cloud:data_model:resource-environment", "id": "8a8186da513854bf01513d733be40c22", "name": "Application Development", "description": "Application Development", "icon": "/csa/images/library/software_application_tier.png" }, { "@self": "/csa/api/resource/environment/8a8186da510f5cd80151340c64432359", "@type": "urn:x-hp:2012:software:cloud:data_model:resource-environment", "id": "8a8186da510f5cd80151340c64432359", "name": "vCenter", "icon": "/csa/images/library/other.png" } ] } ] }