Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
noellabo
docs
Commits
f5bec620
Commit
f5bec620
authored
Oct 05, 2018
by
Eugen Rochko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add accounts API
parent
7d449509
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
168 additions
and
2 deletions
+168
-2
accounts.md
content/en/api/rest/accounts.md
+168
-2
No files found.
content/en/api/rest/accounts.md
View file @
f5bec620
---
---
title
:
Accounts
API
title
:
Accounts
menu
:
menu
:
docs
:
docs
:
parent
:
api
parent
:
rest-
api
weight
:
10
weight
:
10
---
---
## GET /api/v1/accounts/:id
Returns
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"No"
user=
"No"
scope=
"read read:accounts"
version=
"0.0.0"
>
}}
## GET /api/v1/accounts/verify_credentials
User's own account.
Returns
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}}) with an extra
`source`
attribute.
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"Yes"
scope=
"read read:accounts"
version=
"0.0.0"
>
}}
## PATCH /api/v1/accounts/update_credentials
Update user's own account.
Returns
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"Yes"
scope=
"write write:accounts"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|
|----|-----------|:------:|
|
`display_name`
| Display name | Optional |
|
`note`
| Biography | Optional |
|
`avatar`
| Avatar encoded using
`multipart/form-data`
| Optional |
|
`header`
| Header image encoded using
`multipart/form-data`
| Optional |
|
`locked`
| Enable follow requests | Optional |
|
`source`
| Extra preferences | Optional |
|
`fields_attributes`
| Profile metadata | Optional |
## GET /api/v1/accounts/:id/followers
Accounts which follow the given account.
Returns array of
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"No"
scope=
"read read:accounts"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
|
`limit`
| Maximum number of results | Optional | 40 |
### Pagination
{{
<
api
_pagination
>
}}
## GET /api/v1/accounts/:id/following
Accounts which the given account is following.
Returns array of
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"No"
scope=
"read read:accounts"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
|
`limit`
| Maximum number of results | Optional | 40 |
### Pagination
{{
<
api
_pagination
>
}}
## GET /api/v1/accounts/:id/statuses
An account's statuses.
Returns array of
[
Status
](
{{
<
relref
"
entities
.
md
#
status
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"No"
scope=
"read read:statuses"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
|
`only_media`
| Only return statuses that have media attachments | Optional |false|
|
`pinned`
| Only return statuses that have been pinned | Optional |false|
|
`exclude_replies`
| Skip statuses that reply to other statuses | Optional |false|
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
### Pagination
{{
<
api
_dynamic_pagination
>
}}
## POST /api/v1/accounts/:id/follow
Follow an account.
Returns
[
Relationship
](
{{
<
relref
"
entities
.
md
#
relationship
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"Yes"
scope=
"write:follows follow"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
|
`reblogs`
| Whether the followed account's reblogs will show up in the home timeline | Optional | true |
## POST /api/v1/accounts/:id/unfollow
Unfollow an account.
Returns
[
Relationship
](
{{
<
relref
"
entities
.
md
#
relationship
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"Yes"
scope=
"write:follows follow"
version=
"0.0.0"
>
}}
## GET /api/v1/accounts/relationships
Relationship of the user to the given accounts in regards to following, blocking, muting, etc.
Returns array of
[
Relationship
](
{{
<
relref
"
entities
.
md
#
relationship
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"Yes"
scope=
"read read:follows"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|
|----|-----------|:------:|
|
`id`
| Array of account IDs | Required |
## GET /api/v1/accounts/search
Search for matching accounts by username, domain and display name.
Returns array of
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}})
### Resource information
{{
<
api
_method_info
auth=
"Yes"
user=
"Yes"
scope=
"read read:accounts"
version=
"0.0.0"
>
}}
### Parameters
|Name|Description|Required|Default|
|----|-----------|:------:|:-----:|
|
`q`
| What to search for | Required ||
|
`limit`
| Maximum number of results | Optional | 40 |
|
`resolve`
| Attempt WebFinger look-up | Optional | false |
|
`following`
| Only who the user is following | Optional | false |
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment