|
| 1 | +# Hosts |
| 2 | + |
| 3 | +1. TOC |
| 4 | +{:toc} |
| 5 | + |
| 6 | +### Parameters |
| 7 | +<ul class="nav nav-pills" role="tablist"> |
| 8 | +<li class="disabled"><a>OAuth Scopes:</a></li> |
| 9 | +<li class="active"><a href="#inbox_read" role="tab" data-toggle="pill">inbox_read</a></li> |
| 10 | +<li><a href="#inbox_write" role="tab" data-toggle="pill">inbox_write</a></li> |
| 11 | +</ul> |
| 12 | +<div class="tab-content" markdown="1"> |
| 13 | +<div class="tab-pane active" id="inbox_read" markdown="1"> |
| 14 | +Name | Type | Read/Write | Description |
| 15 | +-------------------------|---------|------------|------------ |
| 16 | +id | Integer | Read | Host's id. |
| 17 | +-------------------------|---------|------------|------------ |
| 18 | +firstname | String | Read | Host's first name. |
| 19 | +lastname | String | Read | Host's last name. |
| 20 | +email | String | Read | Host's email. |
| 21 | +-------------------------|---------|------------|------------ |
| 22 | +created_at | [Time](/reference/enums#formats) | Read | Host's create time. |
| 23 | +updated_at | [Time](/reference/enums#formats) | Read | Host's update time. |
| 24 | +forget_me_at | [Time](/reference/enums#formats) | Read | Host's forget time. |
| 25 | +processing_restricted_at | [Time](/reference/enums#formats) | Read | Host's processing restriction time. |
| 26 | +{: class="table table-bordered"} |
| 27 | +</div> |
| 28 | +<div class="tab-pane" id="inbox_write" markdown="1"> |
| 29 | +Name | Type | Read/Write | Description |
| 30 | +-------------------------|---------|------------|------------ |
| 31 | +id | Integer | Read | Host's id. |
| 32 | +user_id | Integer | Read/Write | Host's user id. |
| 33 | +source_id | Integer | Read/Write | Host's source id. |
| 34 | +-------------------------|---------|------------|------------ |
| 35 | +firstname | String | Read/Write | Host's first name. |
| 36 | +lastname | String | Read/Write | Host's last name. |
| 37 | +email | String | Read/Write | Host's email. |
| 38 | +-------------------------|---------|------------|------------ |
| 39 | +created_at | [Time](/reference/enums#formats) | Read | Host's create time. |
| 40 | +updated_at | [Time](/reference/enums#formats) | Read | Host's update time. |
| 41 | +forget_me_at | [Time](/reference/enums#formats) | Read | Host's forget time. |
| 42 | +processing_restricted_at | [Time](/reference/enums#formats) | Read | Host's processing restriction time. |
| 43 | +{: class="table table-bordered"} |
| 44 | +</div> |
| 45 | +</div> |
| 46 | + |
| 47 | +## List Hosts |
| 48 | + |
| 49 | +~~~ |
| 50 | +GET /hosts |
| 51 | +~~~ |
| 52 | + |
| 53 | +<%= render 'json_response', endpoint: "hosts", scopes: %w(inbox_read-inbox_write) %> |
| 54 | + |
| 55 | +## Get a single Host |
| 56 | + |
| 57 | +Returns a single host identified by ID. |
| 58 | + |
| 59 | +~~~ |
| 60 | +GET /hosts/:host_id |
| 61 | +~~~ |
| 62 | + |
| 63 | +<%= render 'json_response', endpoint: "hosts", scopes: %w(inbox_read-inbox_write) %> |
| 64 | + |
| 65 | +## Create a new Host |
| 66 | + |
| 67 | +Creates an host. |
| 68 | + |
| 69 | +~~~~ |
| 70 | +POST /hosts |
| 71 | +~~~~ |
| 72 | + |
| 73 | +<%= render 'json_response', endpoint: "hosts", request: "create", scopes: %w(inbox_write) %> |
| 74 | + |
| 75 | +## Update a Host |
| 76 | + |
| 77 | +Returns an updated host identified by ID. |
| 78 | + |
| 79 | +~~~ |
| 80 | +PUT /hosts/:host_id |
| 81 | +~~~ |
| 82 | + |
| 83 | +<%= render 'json_response', endpoint: "hosts", request: "update", scopes: %w(inbox_write) %> |
0 commit comments