Sunday, May 15, 2016

Accessing the API using api_key through python and retrieving the data

 

Following python script connects to public api using the api_key and we can retrieve the data from it. In order to get authenticated and read data we need to get the api_key.

# The python script is to test  connection to public api using the api_key and load the data based on the selection of object attributes

image 
Once we execute the script, sample output is as below.

C:\u01\Python-2711\python.exe C:/Users/xxxxxx/PycharmProjects/Learning/APIConnect.py
Please enter the city where you like to search : Nashua
Planet Fitness (603) 816-3555 03063
Cravings (603) 882-6626 03060
Thousand Crane II (603) 579-0888 03060
Preciou's Hair Salon (603) 882-0443 03060
Supercuts (603) 594-8545 03060
Tom's Barber Shop (603) 889-0223 03060
xxxxxxx

Tuesday, March 8, 2016

Importing certificate to oracle ohs wallet using orapki

Importing the client root/intermediate/public cert to oracle http server wallet

As middleware administrator tasks its regular to update the new certs to oracle wallets , we can import the new certs to wallet in different ways either  using the owm utility to import through GUI or by using orapki command utility . In my other post i have explained the creation of wallet using the orapki command in the topic i will provide the steps to import the user certificates/partner certificates using orapki utility.

First we need to set the java home

export JAVA_HOME=/u01/java/jdk

Import the root certificate first to wallet. Go to oracle_common/bin where we have orapki installed.

./orapki wallet add –wallet <wallet location> –trusted_cert –cert <certlocaton> –pwd <wallet password>

eg : ./orapki wallet add –wallet /u02/keystore/default –trusted_cert –cert /stage/clientcert/root.cer –pwd Welcome123

Import the intermediate certificate to wallet

./orapki wallet add –wallet <wallet location> –trusted_cert –cert <certlocaton> –pwd <wallet password>

eg : ./orapki wallet add –wallet /u02/keystore/default –trusted_cert –cert /stage/clientcert/intermediate.cer –pwd Welcome123

Import the public certificate to wallet

./orapki wallet add –wallet <wallet location> –trusted_cert –cert <certlocaton> –pwd <wallet password>

eg : ./orapki wallet add –wallet /u02/keystore/default –trusted_cert –cert /stage/clientcert/public.cer –pwd Welcome123

Verify the certificate import is added properly to wallet by using the display option

./orapki wallet display –wallet  /u02/keystore/default