I would like to add relations using REST API to a defect which is already created.
The exact REST calls to create relations depend on both elements you want to connect: Defects could e.g. be linked to requirements, test run, ... Your defects will be linked to which entity type?
As far as I know you can create relations from both entities - either link the defect to a test run or a test run to the defect.
You might have a look at the GDPR Content Pack (download at https://marketplace.microfocus.com/appdelivery/content/gdpr-content-pack). The Excel sheet "Octane Fields" lists all fields for Octane entities including a description. If you filter that sheet for "defect" you'll currently find 94 fields; e.g.:
The code to create Octane relations is in module modOCT, subOCTCreateRelation.