6

I have a SharePoint hosted app and I want to use the JIRA REST API with it. Which means I want to make requests and work with the data from the responses. Because it's a SharePoint hosted app I can only use client side code.

So far I used the web proxy to achive that, but that means I have to add the remote endpoint to the AppManifest.xml. But I want the user of my app to enter the URL to their JIRA Site, so I don't know the URL from the start. Because it's not possible to add remote endpoints dynamically I can't use the web proxy I suppose.

Now my question is, is there a way to make requests to a REST API without the web proxy?

1 Answer 1

2

SharePoint only allows out of the box REST & CSOM endpoints consumption from Apps so if you deploy custom WCF services or other 3rd party, it won't be allowed from within the App.

If you use sp.webrequestinfo cross-domain library, you'll notice that it will work providing your service is consumable anonymously. Remember that in the context of a SharePoint-Hosted App, your only ways to consume web services are: 1. with JavaScript 2. using an External Content Type but that only works for data services and I'm not sure that it works if your service requires authentication.

So, given the above, one way to achieve our goal is to use CORS but it will require some extra efforts before it works.

For complete details check:

http://www.silver-it.com/node/159

1
  • If I get it right for CORS to work the server needs to send specific headers. But that means the users of my app need to configure their JIRA server for my app to work. Or am I wrong?
    – Mars
    Commented Oct 2, 2014 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.