# Connection to OData source through URL

**URL:** <https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 9, 2023, 11:39pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405 "2023-01-09T23:39:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 9, 2023, 11:39pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/1 "2023-01-09T23:39:41Z")

</div>

I am trying to connect to our online form in an application called weever. We have the url and access key, but I’m unsure how to make the connection and receive all of the data from their server.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 9, 2023, 11:41pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/2 "2023-01-09T23:41:19Z")

</div>

What is "odata"?

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 9, 2023, 11:52pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/3 "2023-01-09T23:52:21Z")

</div>

The OData Protocol is \*\*an application-level protocol for interacting with data via RESTful interfaces. It’s a type of API

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 9, 2023, 11:55pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/4 "2023-01-09T23:55:38Z")

</div>

Perspective/Ignition have no special client handling for OData. You will need to manually construct the queries you want to issue, with either an HTTP binding, or, more powerfully/flexibly, the `system.net.httpClient` function: [system.net.httpClient - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.net.httpClient)

Keep in mind that both an HTTP binding and `system.net.httpClient` will be issuing requests _from the Gateway_, not your local device running the Perspective session.

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 9, 2023, 11:57pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/5 "2023-01-09T23:57:14Z")

</div>

Okay one of the details I can’t seem to get much information on is how to put in credentials for the server to respond.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 10, 2023, 12:06am UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/6 "2023-01-10T00:06:21Z")

</div>

That's largely up to the API you're talking to. OData itself doesn't have much to say about authentication. Do you have a link to any documentation?

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 10, 2023, 12:06am UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/7 "2023-01-10T00:06:55Z")

</div>

No I only have the url link and a access code for my admin account

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 10, 2023, 12:09am UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/8 "2023-01-10T00:09:58Z")

</div>

The link is mainly for power bi but I’m trying to connect it to ignition

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 10, 2023, 12:13am UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/9 "2023-01-10T00:13:05Z")

</div>

You'll have to get some insight into the API. I looked briefly and didn't see anything from Weever that looked very useful. Based on this article: [How do I connect to Power BI with an access key?](https://support.weeverapps.com/power-bi-access-key)  
You likely issue a base request at your "OData URL", and it gives you back meta-information about other resources you can access. Excel/PowerBI wraps that up in nice presentation, but it's likely just a JSON response with a bunch of further hyperlinks.

You could do this with Python/Jython/whatever directly, or use an HTTP-exploration tool like POSTMan, `httpie`, etc.

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 10, 2023, 12:15am UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/10 "2023-01-10T00:15:58Z")

</div>

Thank you, I would have as hard of a time if our server was internet connected I could pull directly into our database.

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 10, 2023, 3:59pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/11 "2023-01-10T15:59:58Z")

</div>

I've got a little way now but get the error Error Exception("[api.prod.weeverapps.com](http://api.prod.weeverapps.com)"). Do you have any idea of what the issue is the error is vague?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 10, 2023, 4:34pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/12 "2023-01-10T16:34:12Z")

</div>

Where/how are you testing? I would focus on testing from something like the script console, so you get the full detail of any errors.

---

<div class="post-metadata">

**Author:** ![Cody\_Harkness](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@Cody\_Harkness](https://forum.inductiveautomation.com/u/Cody_Harkness)\
**Post date:** [January 10, 2023, 5:10pm UTC](https://forum.inductiveautomation.com/t/connection-to-odata-source-through-url/68405/13 "2023-01-10T17:10:41Z")

</div>

I am testing through the HTTP binding wizard.
