Using the bwagent REST API to Return Selected Fields
You can retrieve information of only selected fields by adding query parameters to the request URL.
The following sample queries show how to retrieve selected fields:
- Example 1: To check the status of an Application, the REST API GET URL would be -
http://localhost:8079/bw/v1/domains/<DomainName>/appspaces/<AppspaceName>/applications/<ApplicationName>/<ApplicationVersion>?fields=state
The URL returns the following response:
{"state":"Running"}
- Example 2: To get AppSpace details
Normal query - http://localhost:8079/bw/v1/domains/<DomainName>/appspaces/<AppSpaceName>. It returns the total payload, that is, all fields.
- Select Query: http://localhost:8079/bw/v1/domains/<DomainName>/appspaces/<AppSpaceName>?select=name,status. It retrieves only 2 fields.
- Sub-field: http://localhost:8079/bw/v1/domains/<DomainName>/appspaces/<AppSpaceName>?select=appSpaceConfigRefs.href. It fetches href of appSpaceConfigRefs.
Copyright © Cloud Software Group, Inc. All rights reserved.