I think I'm seeing 2 issues that you may be facing. The first is that your script, running inside a simple HTML page, is probably running through regular HTTP. Your request is to HTTPS and browsers will prevent cross-domain/protocol requests like that. Changing to "http://demo.aeries.net/aeries.net/api/v2/schools" will work, but not really. A request like that from your local web page will go through (use Fiddler and you will see the request and response), but the results won't be returned to the object XML object. I think the browser may be blocking the content for the same reason as the HTTPS issue. You are requesting content from a different domain. And for security reasons, browsers don't like that. To confirm this, I tested against a local instance of Aeries.net I have on my dev machine and the script works perfectly.
So in summary, you can't use javascript to do what you are trying to do. You will need to create server-side code (or an application) where the browser's security restrictions won't inhibit your code. Here is a sample "xmlHTTP" class written in VB.net to give you an example of how you would do this server-side.
Imports Microsoft.VisualBasic
Imports System.XML
Public Class XMLHTTP
Protected _URL As String = ""
Public Property URL() As String
Get
Return _URL
End Get
Set(ByVal value As String)
_URL = value
End Set
End Property
Public Sub New()
End Sub
Public Sub New(ByVal URL As String)
Me.URL = URL
End Sub
Public Function ReturnXML() As XmlDocument
Dim HttpWebReq As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(Me.URL)
HttpWebReq.Method = "GET"
Dim hwrp As System.Net.HttpWebResponse = CType(HttpWebReq.GetResponse(), System.Net.HttpWebResponse)
Dim s As System.IO.Stream = hwrp.GetResponseStream()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(s)
Dim responseText As String = sr.ReadToEnd()
Dim xmlDoc As New XmlDocument()
If responseText.Length > 0 Then 'If nothing is returned, the following statement would generate an exception, so make sure we've got something
xmlDoc.LoadXml(responseText)
End If
hwrp.Close()
Return xmlDoc
End Function
Public Function ReturnXML(ByVal URL As String) As XmlDocument
Me.URL = URL
Return ReturnXML()
End Function
End Class
Camden Iliff Aeries® SIS / Eagle Software |
Have you seen the new Aeries Teacher Resource Center? Visit http://teacher.aeries.com/ to see all of the great resources available to teachers.
--
You received this message because you are subscribed to the Google Groups "Interfacing With Aeries" group.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/3ecbf0de-1524-4739-aa96-55f01be7bfd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The cert is technically the only published, publicly documented way.
Camden Iliff Aeries® SIS / Eagle Software |
Have you seen the new Aeries Teacher Resource Center? Visit http://teacher.aeries.com/ to see all of the great resources available to teachers.
From: interfacing...@googlegroups.com [mailto:interfacing...@googlegroups.com] On Behalf Of mop...@fuhsd.net
Sent: Monday, October 5, 2015 8:31 AM
To: Interfacing With Aeries <interfacing...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "Interfacing With Aeries" group.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/ead09a6a-7fda-4baa-b4c7-f939674831c6%40googlegroups.com.
It's all through Aeries.net on the "API Security" page.
Camden Iliff Aeries® SIS / Eagle Software |
Have you seen the new Aeries Teacher Resource Center? Visit http://teacher.aeries.com/ to see all of the great resources available to teachers.
From: interfacing...@googlegroups.com [mailto:interfacing...@googlegroups.com] On Behalf Of mop...@fuhsd.net
Sent: Monday, October 5, 2015 10:35 AM
To: Interfacing With Aeries <interfacing...@googlegroups.com>
Subject: [interfacing-with-aeries] Re: Rookie building a simple AJAX call to demo site
Is the certificate issued from our IIS or through Aeries.net?
--
You received this message because you are subscribed to the Google Groups "Interfacing With Aeries" group.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/d325f542-1875-45b6-b5c6-23ed54dfe4a2%40googlegroups.com.
It's not a real "Certificate". It's just a unique, random character string you use in your requests. Coding that in a request header is a lot easier than trying to install a real certificate, deal with trusting CAs, and creating code to use a real cert.
Camden Iliff |
Aeries SIS - Eagle Software |
From: interfacing...@googlegroups.com [mailto:interfacing...@googlegroups.com] On Behalf Of mop...@fuhsd.net
Sent: Tuesday, October 06, 2015 7:41 AM
To: Interfacing With Aeries
Subject: [interfacing-with-aeries] Re: Rookie building a simple AJAX call to demo site
Ok, found it. I have created a test certificate and see the certificate key. Can this be exported as a.cer file?
--
You received this message because you are subscribed to the Google Groups "Interfacing With Aeries" group.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/32205b09-d7a6-4f5a-aae3-3900ae8e1b7a%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-aeries+unsub...@googlegroups.com.
Your header information is wrong. You named the certificate information the wrong name. Please see the documentation for the proper name.
Camden Iliff Aeries® SIS / Eagle Software |
Have you seen the new Aeries Teacher Resource Center? Visit http://teacher.aeries.com/ to see all of the great resources available to teachers.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/32205b09-d7a6-4f5a-aae3-3900ae8e1b7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Interfacing With Aeries" group.
To unsubscribe from this group and stop receiving emails from it, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/22d59898-8900-492a-840d-23562dfdbfbf%40googlegroups.com.
Windows authentication could also be a problem. This is why we recommend that you use your parent/student portal for API access, not your internal admin/teacher instance of Aeries.net.
Camden Iliff Aeries® SIS / Eagle Software |
Have you seen the new Aeries Teacher Resource Center? Visit http://teacher.aeries.com/ to see all of the great resources available to teachers.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/D8B56C7E0874A443BBA668158094AA5B0F6C3A02BD%40comservices.
--
You received this message because you are subscribed to a topic in the Google Groups "Interfacing With Aeries" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/interfacing-with-aeries/-A0L9u9KgEU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to interfacing-with-...@googlegroups.com.
To post to this group, send email to interfacing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/interfacing-with-aeries/D8B56C7E0874A443BBA668158094AA5B0F6C3A02BF%40comservices.