Lab: 15 Object Storage: API Connectivity & Compute - TanveeKhanDB/OCI GitHub Wiki

What is API Connectivity & Compute for Object Storage:

This is the way where we can send the files to OCI bucket via Linux machine. It privilage to work as user by providing user details such as OCID, tanancy details.


Steps to perfom API connectivity and storage of file in OCI bucket

  • Loing to server via putty

  • Create a folder and file which is going to save in OCI bucket.

  • Downalond all the necessary package to create communication between OCI VM and Linux machine.

  • Create Confiq file under OCI (as VM is not awar about bucket because its not attacted to VM unlike block volume)

  • Proive right to Linux machine to behave like user (you) by provide below details

  • User OCID

  • Tanancy OCID

  • Default password: N/A

  • Provide server location

  • Allow to generate Key

  • Map the generated key to the user by choosing the add API Key option under OCI

  • Connection stablished now we can share the file.


Create a Scritp dir under which .tar file which will save to object bucket.

tar -cvf scripts05052026.tar scripts

Already installed all the required python library:

sudo dnf install python3
sudo dnf install python3-pip
python3 -m pip install oci-cli --upgrade
/usr/local/bin/oci setup config

User OCI details:

Add API key to user in console:

Confiq file inside OCI Vs CLI:

Send file to object store via CLI

oci os object put -bn TK_bucket1 --file scripts01012024.tar