As I can create a sub-task specifying another issue as parent, can I create sub-issue which is not of issuetype id = 5 and still have a parent using REST API? Please suggest how, if this is possible.
I believe you'll need to use the proper sub-task issue ID as mentioned here:
issueTypefield must correspond to a sub-task issue type
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG