OpenAPI spec: https://validator.spaceapi.io/openapi.json
There are two main endpoints, to validate raw JSON and to validate URLs:
The full API specification in OpenAPI format can be found at https://validator.spaceapi.io/openapi.json.
Use this if your endpoint is already online.
Example (curl):
curl -X POST -H "Content-Type: application/json" \
https://validator.spaceapi.io/v2/validateURL \
-d'{"url": "https://status.crdmp.ch/"}'
Example (httpie):
http post \
https://validator.spaceapi.io/v2/validateURL \
url=https://status.crdmp.ch/
Response:
{
"valid": true,
"message": "",
"isHttps": true,
"httpsForward": false,
"reachable": true,
"cors": true,
"contentType": true,
"certValid": true,
"validatedJson": { … },
"schemaErrors": [ … ]
}
If you want to validate JSON data directly, use this endpoint. However, in contrast to the URL endpoint, only the content will be validated, but not the server configuration (e.g. whether CORS is set up properly or whether a valid certificate is being used).
Example (curl):
curl -X POST -H "Content-Type: application/json" \
https://validator.spaceapi.io/v2/validateJSON \
-d @mydata.json
Example (httpie):
cat mydata.json | http post https://validator.spaceapi.io/v2/validateJSON
Response:
{
"message": "",
"valid": true,
"validatedJson": { … },
"schemaErrors": [ … ]
}
See DEVELOPMENT.md
.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.