Hello,
I created a workflow to automatise the creation of a vm and his configuration under RedHat Satellite. In order to make the RedHat Satellite configuration, I need to run a REST request (with GET method) and then I have to parse the results but I don't find the way to do this.
The request.execute() method that I use have no function available to parse the results. The only method that I find "usefull" is contentAsString but it return a string.
Could you help me to solve this ?
Here is an example of the contentAsString results, I need to get the id result :
- {
- "total": 61,
- "subtotal": 1,
- "page": 1,
- "per_page": 20,
- "search": "GP-PROD-CentOs-7.2",
- "sort":
- {
- "by": null,
- "order": null
- },
- "results":
- [
- {
- "subnet_id": null,
- "subnet_name": null,
- "operatingsystem_id": 23,
- "operatingsystem_name": "CentOS 7.2",
- "domain_id": 1,
- "domain_name": "si.francetv.fr",
- "environment_id": 35,
- "environment_name": "KT_Default_Organization_Library_VUE_CentOS_7_2_25",
- "compute_profile_id": 1,
- "compute_profile_name": "1-Profile_de_VM-Petite",
- "ancestry": null,
- "parent_id": null,
- "parent_name": null,
- "puppet_proxy_id": 1,
- "puppet_ca_proxy_id": 1,
- "ptable_id": 108,
- "ptable_name": "FTV Disk Layout CentOS",
- "medium_id": 19,
- "medium_name": "CentOs 7.2",
- "architecture_id": 1,
- "architecture_name": "x86_64",
- "realm_id": null,
- "realm_name": null,
- "created_at": "2016-05-02 15:18:44 UTC",
- "updated_at": "2016-10-19 13:51:43 UTC",
- "id": 56,
- "name": "GP-PROD-CentOs-7.2",
- "title": "GP-PROD-CentOs-7.2"
- }
- ]
- }