share Upsum API

ClaimReview API

API Documentation | JSON-schema

See the README file for more futher examples, including how to generate API keys.

Retrieve schema

This does not require an API Key as it is a read only request.

Returns JSON-schema.

HTTP GET /ClaimReview
curl https://api.upsum.news/ClaimReview

Create

For create requests an API key must be passed via the x-api-key header.

HTTP POST /ClaimReview
Example
curl -X POST \
-d '{ "name": "Example ClaimReview", "description": "Description..." }' \
-H "Content-Type: application/json" \
-H "x-api-key: TZX1T-LZTWM-7BW82-89XQT-8A4M2-YQU48" \
https://api.upsum.news/ClaimReview

Retrieve

This does not require an API Key as it is a read only request.

HTTP GET /ClaimReview/:id
Example
curl https://api.upsum.news/ClaimReview/9cb1a2bf7f5e321cf8ef0d15

You can also request a JSON-LD response:

curl -H "Accept: application/ld+json" \
https://api.upsum.news/ClaimReview/9cb1a2bf7f5e321cf8ef0d15

Update

For update requests an API key must be passed via the x-api-key header.

HTTP PUT /ClaimReview/:id
Example
curl -X PUT \
-d '{ "name": "Example ClaimReview", "description": "Description..." }' \
-H "Content-Type: application/json" \
-H "x-api-key: TZX1T-LZTWM-7BW82-89XQT-8A4M2-YQU48" \
https://api.upsum.news/ClaimReview/9cb1a2bf7f5e321cf8ef0d15

Delete

Removes an entry from the database.

For delete requests an API key must be passed via the x-api-key header.

HTTP DELETE /ClaimReview/:id
Example
curl -X DELETE \
  -H "x-api-key: TZX1T-LZTWM-7BW82-89XQT-8A4M2-YQU48" \
  https://api.upsum.news/ClaimReview/9cb1a2bf7f5e321cf8ef0d15

Search

This does not require an API Key as it is a read only request.

You can search for text in fields (e.g "?name=foo" or "?description=bar").

You can also sort by one or more fields in forward or reverse order by passing a 'sort' argument (e.g "?sort=name", "?sort=-name", "?sort=name,description").

HTTP GET /ClaimReview/search?:params
Example

Returns all entries with 'foo' in the name sorted by their name:

curl https://api.upsum.news/ClaimReview?sort=name&name=foo

You can also request a JSON-LD response:

curl -H "Accept: application/ld+json" \
https://api.upsum.news/ClaimReview?name=foo