/api/disclaimer
GETReturns the software disclaimer and license information from the Perfect Money Foundation.
Description
The `/api/disclaimer` endpoint returns the official software disclaimer text from the Perfect Money Foundation. This disclaimer follows the MIT License style "AS IS" warranty disclaimer, which states that the software is provided free of charge without any warranties or guarantees.
This endpoint is perfect for:
- Legal compliance and terms of service displays
- Showing disclaimer text before user acceptance in UI
- About/License information screens
- First-run setup wizards and EULA dialogs
- Legal documentation and compliance auditing
Parameters
This endpoint does not require any parameters.
Response
Returns a JSON object containing the complete disclaimer text.
Response Properties
Example Response
{
"status": "success",
"operation": "disclaimer",
"text": "THE SOFTWARE IS PROVIDED FOR FREE \"AS IS\" FROM THE PERFECT MONEY FOUNDATION, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
}
Disclaimer Text
The disclaimer text follows the standard MIT License "AS IS" warranty disclaimer format. It explicitly states:
- No Cost: The software is provided for free
- No Warranties: No express or implied warranties of any kind
- No Liability: Authors and copyright holders are not liable for any claims, damages, or other liability
- Use at Own Risk: Users accept all risks associated with using the software
This disclaimer should be displayed to users before they begin using the CloudCoin Console software. It is recommended to require user acknowledgment during initial setup or first use.
Examples
JavaScript (fetch)
const API_HOST = 'http://localhost:8080';
async function getDisclaimer() {
try {
const response = await fetch(`${API_HOST}/api/disclaimer`);
const result = await response.json();
// Display in UI element
const disclaimerElement = document.getElementById('disclaimer-text');
if (disclaimerElement) {
disclaimerElement.textContent = result.text;
}
console.log('Disclaimer:', result.text);
} catch (error) {
console.error('Error fetching disclaimer:', error);
}
}
// Display disclaimer in modal on first run
async function showDisclaimerDialog() {
const response = await fetch(`${API_HOST}/api/disclaimer`);
const result = await response.json();
const accepted = confirm(
'Please read and accept the disclaimer:\n\n' +
result.text +
'\n\nDo you accept these terms?'
);
if (accepted) {
localStorage.setItem('disclaimer_accepted', 'true');
console.log('User accepted disclaimer');
} else {
console.log('User declined disclaimer');
}
}
getDisclaimer();
cURL
# Get disclaimer text
curl -X GET "http://localhost:8080/api/disclaimer"
# Get disclaimer and format output
curl -X GET "http://localhost:8080/api/disclaimer" | jq -r '.text'
# Save disclaimer to file
curl -X GET "http://localhost:8080/api/disclaimer" | jq -r '.text' > disclaimer.txt
Go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
const ApiHost = "http://localhost:8080"
type DisclaimerResponse struct {
Status string `json:"status"`
Operation string `json:"operation"`
Text string `json:"text"`
}
func GetDisclaimer() (string, error) {
resp, err := http.Get(fmt.Sprintf("%s/api/disclaimer", ApiHost))
if err != nil {
return "", err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return "", err
}
var result DisclaimerResponse
if err := json.Unmarshal(body, &result); err != nil {
return "", err
}
return result.Text, nil
}
func main() {
disclaimer, err := GetDisclaimer()
if err != nil {
panic(err)
}
fmt.Println("CloudCoin Console Disclaimer:")
fmt.Println("==============================")
fmt.Println(disclaimer)
}