Is there any way to add an attachment to an issue by using rest api.
If not rest API please suggest any other methods to upload attachments to an issue from outside of JIRA
Yes - POST /rest/api/2/issue/{issueIdOrKey}/attachments
See docs here: https://docs.atlassian.com/jira/REST/server/#api/2/issue/{issueIdOrKey}/attachments-addAttachment
It looks like you're new here. Sign in or register to get started.