Information Services Application - API Guide

 

How to test connectivity from your machine

End point: https://api.asxonline.com/mia/1/mia-api

Method: GET / POST

If successful, you will see the following message:

Expected Message
You have successfully pinged this API endpoint


How to obtain an authorisation token:

Log into MIA Web Application and navigate to: https://www.asxonline.com/mia/a/auth_token

Please note: You can only have one active token per user. If you regenerate your token, the exisitng token will expire.

Making authorised request calls -

  • first obtain an authorisation token
  • set it in HTTP header as below
How to supply Authentication Token Header Name Value
Set HTTP header as follows Authorization 3e3b5...your token

Testing API Authentication

Test authentication via AUTH Token
Attribute Type Operation Example
METHOD POST  
Sample URL https://api.asxonline.com/mia/1/mia-api/a/test_authentication
Requires authentication/token must be supplied

 

Expected Output

 

 

 If Authorization check is unsuccessful

HTTP Status 401

Authorization Failure - Invalid Authorization Token

  

If Authorization check is successful

HTTP Status 200

Authentication Successful you are authorized as: <Full Name i.e.> - Joe Citizen

Operation to fetch list of files for a particular product code

Attribute Type Operation Example
Method POST  
Parameter product_code BBSW
Sample URL https://api.asxonline.com/mia/1/mia-api/a/subscribed_products
Requires authentication/token must be supplied 

 



Expected Output

 

 

If output is successful HTTP Status CODE 200

 

[{"file_id":1026236,"file_name":"WAIVE.PDF","file_type":"PDF","production_date":"20170904","file_url":"/1/mia-api/a/fetch_product?product_code=ACH_WAIVE&file_id=1026236"}]

 


If Not successful


HTTP Status code 200

+ Error message will be returned

 

Sample Error Messages:

 

The specified file ID [{0}] is not associated with product - product code [{1}].

Product code [{0}] cannot be downloaded, please contact ASX Administrator.

Unfortunately you do not have a subscription to product - product code [{0}]. Unable to download files.

Unfortunately your subscription (subscription ID [{1}]) to product - product code [{0}] has expired. Unable to download files.

Unfortunately your subscription (subscription ID [{1}]) to product - product code [{0}] is suspended. Unable to download files.

Operation Fetching Product File

Attribute Type Operation Example
Method GET / POST  
Parameter product_code BBSW
Parameter file_id 1026236
Sample URL https://api.asxonline.com/mia/1/mia-api/a/fetch_product
Requiresauthentication/token must be supplied

 

Expected Output

If Successful

HTTP Status code 200

Binary Array of the actual file data / with "HTTP Content Disposition : attachment; fileName=?"

  

If Not successful

  

HTTP Status code 200

Sample Error Messages:

  

The specified file ID [{0}] is not associated with product - product code [{1}].

Product code [{0}] cannot be downloaded, please contact ASX Administrator.

Unfortunately you do not have a subscription to product - product code [{0}]. Unable to download files.

Unfortunately your subscription (subscription ID [{1}]) to product - product code [{0}] has expired. Unable to download files.

Unfortunately your subscription (subscription ID [{1}]) to product - product code [{0}] is suspended. Unable to download files.