Add privacy policy and terms of service endpoints (#1594)
* Add privacy policy and terms of service endpoints * Shorten the example privacy policy response
This commit is contained in:
parent
5f9cf32ce2
commit
481d6455cb
2 changed files with 105 additions and 0 deletions
|
@ -515,6 +515,63 @@ Obtain an extended description of this server
|
|||
|
||||
---
|
||||
|
||||
## View privacy policy {#privacy_policy}
|
||||
|
||||
```http
|
||||
GET /api/v1/instance/privacy_policy HTTP/1.1
|
||||
```
|
||||
|
||||
Obtain the contents of this server's privacy policy.
|
||||
|
||||
**Returns:** [PrivacyPolicy]({{< relref "entities/PrivacyPolicy" >}})\
|
||||
**OAuth:** Public\
|
||||
**Version history:**\
|
||||
4.0.0 - added
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200: OK
|
||||
|
||||
```json
|
||||
{
|
||||
"updated_at": "2022-10-07T00:00:00+00:00",
|
||||
"content": "<p>This privacy policy describes how example.com ("example.com", "we", "us") collects,\nprotects and uses the personally identifiable information you may provide\nthrough the example.com website or its API.</p>\n\n<h1>What information do we collect?</h1>\n\n<ul>\n<li><strong>Basic account information</strong>: If you register on this server, you may be\nasked to enter a username, an e-mail address and a password.</li>\n<li><strong>Posts, following and other public information</strong>: The list of people you\nfollow is listed publicly, the same is true for your followers.</li>\n<li><strong>Direct and followers-only posts</strong>: All posts are stored and processed on the\nserver. You may\ntoggle an option to approve and reject new followers manually in the settings.\n<strong>Please keep in mind that the operators of the server and any receiving\nserver may view such messages</strong>, and that recipients may screenshot, copy or\notherwise re-share them. <strong>Do not share any sensitive information over\nMastodon.</strong></li>\n<li><strong>IPs and other metadata</strong>: When you log in, we record the IP address you log\nin from, as well as the name of your browser application.</li>\n</ul>\n\n<hr>\n\n<p>This document is CC-BY-SA. Originally adapted from the <a href=\"https://github.com/discourse/discourse\">Discourse privacy\npolicy</a>.</p>\n"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## View terms of service {#terms_of_service}
|
||||
|
||||
```http
|
||||
GET /api/v1/instance/terms_of_service HTTP/1.1
|
||||
```
|
||||
|
||||
Obtain the contents of this server's terms of service, if configured.
|
||||
|
||||
**Returns:** [PrivacyPolicy]({{< relref "entities/PrivacyPolicy" >}})\
|
||||
**OAuth:** Public\
|
||||
**Version history:**\
|
||||
4.4.0 - added
|
||||
|
||||
#### Response
|
||||
|
||||
##### 200: OK
|
||||
|
||||
|
||||
|
||||
##### 404: Not Found
|
||||
|
||||
No terms of service have been configured for this instance.
|
||||
|
||||
```json
|
||||
{
|
||||
"error": "Record not found"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## View translation languages {#translation_languages}
|
||||
|
||||
```http
|
||||
|
@ -707,3 +764,7 @@ Obtain general information about the server. See [api/v2/instance]({{< relref "m
|
|||
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/peers_controller.rb" caption="app/controllers/api/v1/instances/peers_controller.rb" >}}
|
||||
|
||||
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/rules_controller.rb" caption="app/controllers/api/v1/instances/rules_controller.rb" >}}
|
||||
|
||||
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/privacy_policies_controller.rb" caption="app/controllers/api/v1/instances/privacy_policies_controller.rb" >}}
|
||||
|
||||
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/instances/terms_of_services_controller.rb" caption="app/controllers/api/v1/instances/terms_of_services_controller.rb" >}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue