WebDev/HTTP Beginner

I've done plenty of Ignition stuff but it's all been direct connection to PLC tags. I've now got a cloud tag with a url path that I need to connect to. How do I do this? Not even sure where to start. My url looks like this

https://storage.table.core.windows.net/GlobalTagExport?sv=2019-02-02&spr=https%2Chttp&si=Location&sig=FLIcrZhC%2B0IxJuMgxltPdoRSGvhit7s%3D&tn=GlobalTagExport&srk=LIT1_Display&spk=S265&epk=S265&erk=LIT1_Display

(fake link)

The link is using the Azure REST API to pull the tagValue property from a Table storage entity (essentially an SQL query)

Any help would be much appreciated.

Would this be the WebDev Module?

The link returns an XML value like this

<?xml version="1.0" encoding="utf-8"?>
<feed xml:base=https://storage.table.core.windows.net/ xmlns=http://www.w3.org/2005/Atom xmlns:d=http://schemas.microsoft.com/ado/2007/08/dataservices xmlns:m=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata xmlns:georss=http://www.georss.org/georss xmlns:gml=http://www.opengis.net/gml>
       <id>https://storage.table.core.windows.net/GlobalTagExport</id>
       <title type="text">GlobalTagExport</title>
       <updated>2026-07-23T16:33:56Z</updated>
       <link rel="self" title="GlobalTagExport" href="GlobalTagExport"/>
       <entry m:etag="W/&quot;datetime'2026-07-23T16%3A33%3A05.8189167Z'&quot;">
       <id>https://storage.table.core.windows.net/GlobalTagExport(PartitionKey='S265',RowKey='LIT1_Display')</id>
              <category term="storage.GlobalTagExport" scheme=http://schemas.microsoft.com/ado/2007/08/dataservices/scheme/>
              <link rel="edit" title="GlobalTagExport" href="GlobalTagExport(PartitionKey='S265',RowKey='LIT1_Display')"/>
              <title/>
              <updated>2026-07-23T16:33:56Z</updated>
              <author>
                     <name/>
              </author>
              <content type="application/xml">
                     <m:properties>
                           <d:PartitionKey>S265</d:PartitionKey>
                           <d:RowKey>LIT1_Display</d:RowKey>
                           <d:Timestamp m:type="Edm.DateTime">2026-07-23T16:33:05.8189167Z</d:Timestamp>
                           <d:lastCheckedUtc>2026-07-23T16:33:05.8202368Z</d:lastCheckedUtc>
                           <d:tagValue>15.8</d:tagValue>
                     </m:properties>
              </content>
       </entry>
</feed>

You could just use the HTTPClient in a project script to pull the value, parse the returned XML and then write the values to memory tags, a dataset tag, or whatever.

No need for Webdev for this.

Never used this either. Care to enlighten me?

Some lightly edited Claude output.

According to the robot, if you add an Accept: application/json header you'll get JSON back, instead of XML, which is a lot nicer to parse.

logger = system.util.getLogger('CloudTag')

def fetchCloudTag(row_key, partition_key='S265', timeout=5000):
	"""
	Fetch a single entity's tagValue from the Azure Table Storage export.
	"""
	# Base endpoint (no query string). Everything variable goes in `params`.
	base_url = 'https://storage.table.core.windows.net/GlobalTagExport'

	# The SAS token pieces. In production, use secrets instead of hardcoding
	sas_params = {
		'sv':  '2019-02-02',
		'spr': 'https,http',
		'si':  'Location',
		'sig': 'FLIcrZhC+0IxJuMgxltPdoRSGvhit7s=',
		'tn':  'GlobalTagExport',
	}

	# The "query" portion β€” which entity you want. These are the bits
	# you'll typically change from call to call.
	query_params = {
		'srk': row_key,          # start row key
		'erk': row_key,          # end row key (same β†’ single row)
		'spk': partition_key,    # start partition key
		'epk': partition_key,    # end partition key
	}

	params = {}
	params.update(sas_params)
	params.update(query_params)

	headers = {
		'Accept': 'application/json;odata=nometadata',
	}

	response = system.net.httpClient.get(base_url, params=params, headers=headers)

	if not response.good:
		logger.warn('HTTP %d fetching %s/%s: %s' % (
			response.statusCode, partition_key, row_key,
			response.text[:200] if response.text else ''))
		return None

	# Azure Table Storage returns {"value": [ {...entity...}, ... ]}
	payload = response.json
	entities = payload.get('value', []) if payload else []
	if not entities:
		logger.info('No entity found for %s/%s' % (partition_key, row_key))
		return None

	entity = entities[0]
	# Adjust the property name to whatever your table actually uses:
	return entity.get('tagValue')

# --- Try it ---
value = fetchCloudTag(row_key='LIT1_Display', partition_key='S265')
print 'Fetched value:', value

Thanks Paul. This is what I got to work just in the script console:

url = "..."

client = system.net.httpClient()
# Send a non-blocking request to an endpoint that will wait 3 seconds.
promise = client.getAsync(url, headers={"Accept": "application/json;odata=nometadata"})
# This will print before we get a response from the endpoint.
print "doing something while waiting..."
# do more work here...
# After the work on the previous lines, we can now block and wait for a response.
response = promise.get()
if response.good:
    print response.json['value'][0]['tagValue']