Update README.md

This commit is contained in:
JoshS 2024-03-14 16:26:02 -04:00
parent 5de4027d64
commit 63602265fb

View file

@ -1,4 +1,60 @@
# Revela-API
To generate an API key run: `npm run genkey`
to start the API run: `npm start`
to start the API run: `npm start`
## Curl commands for Windows:
```
curl -X GET "https://api.revela.network/urls" ^
-A "useragent" ^
-H "Content-Type: application/json" ^
-H "api-key: apikey"
curl -X POST "https://api.revela.network/urls" ^
-A "useragent" ^
-H "Content-Type: application/json" ^
-H "api-key: apikey" ^
-d "{\"domain\":\"domain.tld\", \"is_public\":<true or false>}"
curl -X DELETE "https://api.revela.network/urls" ^
-A "useragent" ^
-H "Content-Type: application/json" ^
-H "api-key: apikey" ^
-d "{\"domain\":\"domain.tld\", \"is_public\":<true or false>}"
curl -X PATCH "https://api.revela.network/urls" ^
-A "useragent" ^
-H "Content-Type: application/json" ^
-H "api-key: apikey" ^
-d "{\"domain\":\"domain2.tld\", \"is_public\":<true or false>}"
```
## Curl commands for Unix:
```
curl -X GET "https://api.revela.network/urls" /
-A "useragent" /
-H "Content-Type: application/json" /
-H "api-key: apikey"
curl -X POST "https://api.revela.network/urls" /
-A "useragent" /
-H "Content-Type: application/json" /
-H "api-key: apikey" /
-d "{\"domain\":\"domain.tld\", \"is_public\":<true or false>}"
curl -X DELETE "https://api.revela.network/urls" /
-A "useragent" /
-H "Content-Type: application/json" /
-H "api-key: apikey" /
-d "{\"domain\":\"domain.tld\", \"is_public\":<true or false>}"
curl -X PATCH "https://api.revela.network/urls" /
-A "useragent" /
-H "Content-Type: application/json" /
-H "api-key: apikey" /
-d "{\"domain\":\"domain2.tld\", \"is_public\":<true or false>}"
```