Data.JSON URL Checker is a standalone PowerShell script to test the validity of URLs in the Data.JSON file.
- Scans Data.JSON file structure using project open data schema v1.1 (https://project-open-data.cio.gov/v1.1/schema/)
- Reads all possible field with type of URLs according to schema
- Checks if the field contains a value of url
- Collects all urls with fields name
- Test each url by executing HTTP request and Collects responses of HTTP request
- Generates .CSV file as a report of all urls tested, field location and responses.
For federal government agencies required to deliver data.JSON file, this scripts helps agency test URLs from their Data.JSON files before publishing.
Data.JSON URL Checker is a PowerShell script. Please see following steps to execute the url checker.
- Please download, copy and paste this script in the same directory as data.json file.
- Optional: If you are using http proxy to execute http requests. open the script with any text editor and apply value to $proxy variable on the top for the proxy link and save the file.
- Execute the script by right click and select to run with PowerShell.
- This script will log url testing activity status on command prompt.
- Once script is finished executing it will generate the report with .csv file
- Log status code of each url along with status code and format.
Data.JSON URL Checker is maintained by the Open Source Staff at SSA.