Create API call from shell script to retrieve JSON data and save to file

Completed Posted 2 years ago Paid on delivery
Completed 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"

}

]

}

Shell Script Python PHP Linux JSON

Project ID: #33472263

About the project

22 proposals Remote project Active 2 years ago

Awarded to:

gangabass

I can provide you a simple PHP script that will make API call, parse JSON response and save CSV output for you. All I need to start is a bit more details about API call you want (what is end point URL and parameters et More

$50 USD in 1 day
(683 Reviews)
8.1

22 freelancers are bidding on average $137 for this job

Itblast

Hello I have gone through the job description and understand that you need Create API call from shell script to retrieve JSON data and save to file I am an Expert in php, python, Linux with over 6 years experience in More

$140 USD in 7 days
(110 Reviews)
7.2
programcoder19

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

$200 USD in 1 day
(66 Reviews)
5.7
pardhansingh57

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?

$250 USD in 7 days
(100 Reviews)
5.9
Nehag510

Hello Greeting of the Day As you are looking for a WEB developer I am glad to tell you that I am a professional programmer with 6 years of experience in WEB development. I think this project is for me and I can finish More

$250 USD in 7 days
(15 Reviews)
5.3
BarryCrouch

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

$34 USD in 1 day
(30 Reviews)
5.4
ahmedsalah99hop

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

$100 USD in 7 days
(19 Reviews)
4.8
hnutweblera

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.

$200 USD in 7 days
(5 Reviews)
5.2
RajulRao

Hey! It's Rajul, An Experienced Software Developer. I am ready to work with you, I have read your details and requirements and I am highly confident that I will deliver you the task. I am skilled coder with skills inc More

$200 USD in 5 days
(5 Reviews)
4.5
Slmmy

Hello There , ⭐️I have 100% project deliver rate, Hope you went through my profile https://www.freelancer.com/u/Slmmy ⭐️This is Nauman Full stack developer , Having 10 years experience in Web and software development. More

$154 USD in 7 days
(12 Reviews)
4.5
nikosl1

Hello Sir, I am graduated Computer Engineer with deep knowledge in Python Scripting and have worked with JSON format files. I am slightly new in this platform but i have already completed a bunch of projects in here. More

$50 USD in 1 day
(8 Reviews)
3.9
AhmedHassan20221

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

$40 USD in 1 day
(9 Reviews)
3.8
TabzAli

Greetings I can surely help you for Create API call from shell script to retrieve JSON data and save to file I am in the IT industry since more than a decade and serve so many clients for building and rebuilding web More

$30 USD in 2 days
(6 Reviews)
2.6
andrija85e1

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.

$200 USD in 2 days
(2 Reviews)
2.0
mfaisal902

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

$300 USD in 3 days
(4 Reviews)
1.4