You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9.8 KiB
9.8 KiB
API Documentation
BlockScoutWeb.Account.Api.V1.UserController
info
Get info about user
Request
- Method: GET
- Path: /api/account/v1/user/info
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNDk2ODM4NzYtM2ZkYS00MWEzLWFhOTYtZTQzZTMxYTExMzA2IiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDYiLCJ0eXAiOiJhY2Nlc3MifQ.SbA3-DSbRC0FXrIymavxevcR1wZL15Dr-ILqzICV_SRet3pya4rywBsIVHXITp1_kHUMQdCgSi2mKsKutP5oHQ
Response
- Status: 200
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03AbC0Qu51EPAAAASD
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
{
"nickname": "test_user6",
"name": "User Test6",
"email": "test_user-6@blockscout.com",
"avatar": "https://example.com/avatar/test_user6"
}
create_tag_address
Create private address tag
Request
- Method: POST
- Path: /api/account/v1/user/tags/address
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZDhkZGY3NDUtYTI5YS00ZTVhLThiMWItNmUxZTBkOWU3NTk1IiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDQiLCJ0eXAiOiJhY2Nlc3MifQ.iomU7m4tS4Bjuvry4eY0PE93oLXJhlIP2wg5ohNhtXwS939DavPdpkcr_kQX8fQDommt29Lj0tgOKEHy_Jlg9Q
content-type: multipart/mixed; boundary=plug_conn_test
- Request body:
{
"name": "MyName",
"address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b"
}
Response
- Status: 200
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03Aa-l1pQf1qUAAAOj
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
{
"name": "MyName",
"id": 70,
"address_hash": "0x3e9ac8f16c92bc4f093357933b5befbf1e16987b"
}
tags_address
Get private addresses tags
Request
- Method: GET
- Path: /api/account/v1/user/tags/address
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiMWQ3NmNmNzEtYjAzZi00NjE3LThmYWQtNDIwYjU5OGRlNDVkIiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDAiLCJ0eXAiOiJhY2Nlc3MifQ.1skgqID9Tc8Yo-QXP969CZjR4RjXSpoxs1WAwonxvxgufOGh7RXJctDobXQPTcREl6kX9SRZeE8ozz_ni8C_BA
Response
- Status: 200
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03AapFqH90MQ4AAAXk
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
[
{
"name": "name0",
"id": 64,
"address_hash": "0x0000000000000000000000000000000000000001"
},
{
"name": "name1",
"id": 65,
"address_hash": "0x0000000000000000000000000000000000000002"
},
{
"name": "name2",
"id": 66,
"address_hash": "0x0000000000000000000000000000000000000003"
}
]
create_tag_transaction
Error on try to create private transaction tag for tx does not exist
Request
- Method: POST
- Path: /api/account/v1/user/tags/transaction
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZDAxY2VkMjItYzQwNS00NGZhLWI5NGUtODY2MmE5MzgwY2MyIiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.KozzoCCYxm-IplVfHxMt9D6Y3OlBC3oQc--lFvS-iUNzXZFldrxt2Gb0nFDDBVrJTeigYInbzzlJrMpyI_ca9A
content-type: multipart/mixed; boundary=plug_conn_test
- Request body:
{
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000006",
"name": "MyName"
}
Response
- Status: 422
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03AbLZLRHMT8QAABxh
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
{
"errors": {
"tx_hash": [
"Transaction does not exist"
]
}
}
Create private transaction tag
Request
- Method: POST
- Path: /api/account/v1/user/tags/transaction
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiZDAxY2VkMjItYzQwNS00NGZhLWI5NGUtODY2MmE5MzgwY2MyIiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDgiLCJ0eXAiOiJhY2Nlc3MifQ.KozzoCCYxm-IplVfHxMt9D6Y3OlBC3oQc--lFvS-iUNzXZFldrxt2Gb0nFDDBVrJTeigYInbzzlJrMpyI_ca9A
content-type: multipart/mixed; boundary=plug_conn_test
- Request body:
{
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007",
"name": "MyName"
}
Response
- Status: 200
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03AbL6z-jMT8QAAByB
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
{
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000007",
"name": "MyName",
"id": 58
}
tags_transaction
Get private transactions tags
Request
- Method: GET
- Path: /api/account/v1/user/tags/transaction
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiNWUyMGFlNGYtNDViMi00MDk3LTk5MzItNmY4ZWNhYzQxOTcxIiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDciLCJ0eXAiOiJhY2Nlc3MifQ.8aONMNSke-aARWRtOc8Xtnad0ogoKcbtMFmS0oLpyWaYUsbdqWk5TB2Lz8bHZiQEM6orSMri60CGP1ZKuZxNEA
Response
- Status: 200
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03AbJVqMZqFagAABxB
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
[
{
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000003",
"name": "name0",
"id": 54
},
{
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000004",
"name": "name1",
"id": 55
},
{
"transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000005",
"name": "name2",
"id": 56
}
]
create_watchlist
Add address to watchlist
Request
- Method: POST
- Path: /api/account/v1/user/watchlist
- Request headers:
authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJibG9ja19zY291dF93ZWIiLCJleHAiOjE2NTg5NTk5MTgsImlhdCI6MTY1NjU0MDcxOCwiaXNzIjoiYmxvY2tfc2NvdXRfd2ViIiwianRpIjoiYjNmYWRlYmUtZDVkMy00NzM5LTg5NjMtZWE5ZmNhMDc3OTRiIiwibmJmIjoxNjU2NTQwNzE3LCJzdWIiOiJibG9ja3Njb3V0fDAwMDEiLCJ0eXAiOiJhY2Nlc3MifQ.-77CX9iIIYJmxW8b9qQRBWOSK7JbjbX0P3RoUoAPXaKQxBDnLJO4t-_9IUIlJocUV2gM5SroBXwWiYkPXVbAbw
content-type: multipart/mixed; boundary=plug_conn_test
- Request body:
{
"notification_settings": {
"native": {
"outcoming": true,
"incoming": true
},
"ERC-721": {
"outcoming": true,
"incoming": true
},
"ERC-20": {
"outcoming": true,
"incoming": true
}
},
"notification_methods": {
"email": true
},
"name": "test0",
"address_hash": "0x0000000000000000000000000000000000000004"
}
Response
- Status: 200
- Response headers:
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: Fv03AaqVm0sYOtYAAAFi
access-control-allow-origin: *
access-control-expose-headers:
access-control-allow-credentials: true
- Response body:
{
"notification_settings": {
"native": {
"outcoming": true,
"incoming": true
},
"ERC-721": {
"outcoming": true,
"incoming": true
},
"ERC-20": {
"outcoming": true,
"incoming": true
}
},
"notification_methods": {
"email": true
},
"name": "test0",
"id": 13,
"exchange_rate": null,
"address_hash": "0x0000000000000000000000000000000000000004",
"address_balance": null
}