Create API call from shell script to retrieve JSON data and save to file
$30-250 USD
Paid on delivery
I have data from an application that I am making an API call from. I need the script to make the api call, save and parse the JSON data, check to determine if the value of one of the fields matches, and save it to a csv file in the below format.
print(RPS + ' ' + Hostname + ' ' + Serial_Number + ' ' + Group_Name + ' ' + Resource_Type + ' ' + Make + ' ' + Model + ' ' + Datacenter)
WHERE
RPS = device['asset_tag']
Hostname = device['name']
Serial_Number = device['serial']
Group_Name = device['tenant']['name']
Resource_Type = device['device_role']['name']
Make = device['device_type']['manufacturer']['name']
Model = device['device_type']['model']
Datacenter = device['site']['name']
Sample Data
"id": 10766,
"url": "http://application URL",
"display": "aix505vm1 (11920)",
"name": "aix505vm1",
"device_type": {
"id": 929,
"url": "http://application URL",
"display": "9115-505",
"manufacturer": {
"id": 11,
"url": "http://application URL",
"display": "IBM",
"name": "IBM",
"slug": "ibm"
},
"model": "9115-505",
"slug": "9115-505"
},
"device_role": {
"id": 51,
"url": "http://application URL",
"display": "Server",
"name": "Server",
"slug": "server"
},
"tenant": {
"id": 34,
"url": "http://application URL",
"display": "infosec Prod",
"name": "Infosec Prod",
"slug": "infosec-prod"
},
"platform": null,
"serial": "10-0CC5A",
"asset_tag": "11920",
"site": {
"id": 5,
"url": "http://application URL",
"display": "Data Hall 3 - Production",
"name": "Data Hall 3 - Production",
"slug": "data-hall-3-production"
},
"location": {
"id": 36,
"url": "http://application URL",
"display": "J",
"name": "J",
"slug": "j",
"_depth": 0
},
"rack": {
"id": 953,
"url": "http://application URL",
"display": "J28",
"name": "J28"
},
"position": 5,
"face": {
"value": "front",
"label": "Front"
},
"parent_device": null,
"status": {
"value": "active",
"label": "Active"
},
"airflow": null,
"primary_ip": null,
"primary_ip4": null,
"primary_ip6": null,
"cluster": null,
"virtual_chassis": null,
"vc_position": null,
"vc_priority": null,
"comments": "AIX 6.1 Build server. ",
"local_context_data": null,
"tags": [],
"custom_fields": {
"contract_start_date": "2020-05-15",
"contract_end_date": "2022-04-30",
"aptare_status": "Enabled",
"deployment_ticket": null,
"hardware_support_vendor": null,
"logistics_tag": null,
"ownership": "Owned",
"po_number": null,
"purchase_date": null,
"service_contract": "No Service_ 2020-05-15 to 2022-04-30",
"service_contract_notes": "Under contract",
"sr_entry_date": "2006-03-29"
},
"config_context": {},
"created": "2021-06-01T00:00:00Z",
"last_updated": "2021-06-01T18:12:26.940882Z"
}
]
}
Project ID: #33472263
About the project
22 freelancers are bidding on average $137 for this job
Do you specificially want a bash script that does this? if yes I know how to do most of it, I am figuring out the bit that I don't, let's chat If you don't specifically want it in bash script and Javascript or some ot More
Hi, I will parse the JSON data. Do you want to output the data on page as well ? Can you please share more details in chat?
I checked the API description you have provided, I can solve your issue! I'm an experienced (+6 years) website (front-end+ back-end) developer, I've worked with JSON files and API a lot, you can visit my profile on Fre More
Hi, how are you doing? I am a python developer with a lot of experience in dealing with APIs. I am working mainly with processing and manipulating data ao this task will be easy for me. Looking forward to hearing from More
Hello I have powerful background in python and I can use api and json by using requests and json module. So I think I can do it and I hope discuss about your project detail. Regards.
Hi, I am data analyst and web scraping specialist. In your project we will use python requests to make the api call and pandas to parsing the json file and get final csv format. Please get in touch so we can discuss fu More
Hi, I am experienced JSON API expert, and can handle this task in short time easily. I have confidence of this type of job, and can provide you satisfied result. Thanks.
Greetings Sir, i am Muhammad Faisal and i am a professional Software Engineer having almost 4 years of experience and we provide you quality work within your time and budget so, let's get started :) Thanks