Given a transaction https://explorer.near.org/transactions/JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ
When I query NEAR rpc:
http post https://rpc.mainnet.near.org jsonrpc=2.0 method=tx params:='["JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ","wasmgit.near"]' id=dontcare
Then I expect to get the transaction status
Instead I get the following response:
{
"error": {
"code": -32000,
"data": "Transaction JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ doesn't exist",
"message": "Server error"
},
"id": "dontcare",
"jsonrpc": "2.0"
}
source: https://docs.near.org/docs/api/rpc#setup
Querying historical data (older than 5 epochs or ~2.5 days), you may
get responses that the data is not available anymore. In that case,
archival RPC nodes will come to your rescue:
mainnet https://archival-rpc.mainnet.near.org
testnet https://archival-rpc.testnet.near.org
You can see this interface defined in nearcore here.
via near-cli
near --nodeUrl https://archival-rpc.mainnet.near.org \
tx-status JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ \
--accountId wasmgit.near
via http
http post https://archival-rpc.mainnet.near.org \
jsonrpc=2.0 method=tx \
params:='["JBb2DDe3i1CtBwESisLuhxXkWVZpCKYL4J1AdYwAQPsQ","wasmgit.near"]' \
id=dontcare
Related
There are few blocks in near which are missing in mainnet but present in testnet and it shows as testnet specific blocks. Please suggest how do we consider these blocks or get these blocks using the api "https://archival-rpc.mainnet.near.org". Below is the scenario for one of the block
If I try to get the block details of the block 73685420 by using the below curl query:
curl --location --request POST 'https://archival-rpc.mainnet.near.org' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "block",
"params": {
"block_id": 73685420
}
}'
I get the below output
{
"jsonrpc": "2.0",
"error": {
"name": "HANDLER_ERROR",
"cause": {
"info": {},
"name": "UNKNOWN_BLOCK"
},
"code": -32000,
"message": "Server error",
"data": "DB Not Found Error: BLOCK HEIGHT: 73685420 \n Cause: Unknown"
},
"id": "dontcare"
}
But when I searched the above block in testnet explorer I was able to get it.
how to get the details from mainnet?
Testnet Explorer Block
maybe you can find the answer here: Why Blocks are Missing or Skipped on NEAR
Just a little explanation about the info inside the link:
The blocks are very fast in NEAR Protocol, and the transactions should resolve quickly, sometimes is the specifict validator answer late the block is skipped and the transactions resolved in next, this works as expected.
But thats the reason of the skipped blocks.
I want to fetch all the jobs that I posted on my Zoho recruit. And I want to fetch all those jobs on my website for that I use the below API.
curl "https://recruit.zoho.com/recruit/v2/jobopening"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Scope:
scope=ZohoRECRUIT.modules.jobopening.READ
I use all the necessary parameters but still it give the error like
{
"code": "INTERNAL_ERROR",
"details": {},
"message": "EXTRA_PARAM_FOUND",
"status": "error"
}
Every time I attempt to use the following simple bash script command on my Macbook Pro laptop, I get an 'Exceeded Quota' error. I do supply a valid API key and I'm under the impression that I don't need any other tokens because I am only requesting Public information (a simple list of songs).
Bash script:
#!/bin/bash
curl \
'https://youtube.googleapis.com/youtube/v3/search?part=snippet&q=music&type=video&key=[My API key]' \
--header 'Accept: application/json' \
--compressed
Reply:
{
"error": {
"code": 403,
"message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
"errors": [
{
"message": "The request cannot be completed because you have exceeded your \u003ca href=\"/youtube/v3/getting-started#quota\"\u003equota\u003c/a\u003e.",
"domain": "youtube.quota",
"reason": "quotaExceeded"
}
]
}
}
I don't have any quota problems pulling song lists via the YouTube Data API 'list' page:
https://developers.google.com/youtube/v3/docs/search/list
I was testing near apis and only a few endpoints are working as expected.
https://rpc.mainnet.near.org
I was trying to fetch the block by id and it was throwing this error.
{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Server error",
"data": "Block Missing (unavailable on the node): BBht2EZwfrGrucZKUuW91tMctfE3rMsUQJcFSduTRCGR \n Cause: Unknown"
},
"id": "dontcare"
}
The final block call is working and it is even working for few 50 blocks back but for old blocks it is throwing above error.
Is there any range of blocks this api supports?
Can I rely on this api to fetch historical data?
curl request
curl --location --request POST 'https://rpc.mainnet.near.org' --header 'Content-Type: application/json' --data-raw '{
"jsonrpc": "2.0",
"id": "dontcare",
"method": "block",
"params": {
"block_id": 33929500
}
}'
This block was garbage collected. Regular nodes only maintain blocks for the last 5 epochs, if you need historical data you should query instead archival nodes (https://archival-rpc.mainnet.near.org)
See this answer for more details https://stackoverflow.com/a/67199078/4950797
Description:
Requesting to endpoint: "/api/v1/users.register" is not responding on my self-hosted Rocket.Chat server running on docker.
The rest of the APIs seem to be fine and only this one is not sending back 200 OK HTTPS response and I face the request timed out.
Although the requested JSON data has been sent to the server and the requested user has been registered cause if I try to send the same request again I get the 400 Bad Request with the error: "Username is already in use".
Steps to reproduce:
curl -H "Content-type:application/json"
http://localhost:3000/api/v1/users.register
-d '{ "username": "rogersmith", "email": "roger#example.com", "pass": "passw0rd", "name": "Roger Smith"}'
Expected behavior:
HTTP status code: 200 Ok
JSON result:
{
"user": {
"_id": "nSYqWzZ4GsKTX4dyK",
"type": "user",
"status": "offline",
"active": true,
"name": "Example User",
"utcOffset": 0,
"username": "example"
},
"success": true
}
Actual behavior:
Literally nothing!
Server Setup Information:
Version of Rocket.Chat Server: 3.11.0
Operating System: Ubuntu Linux 18.04.2
Deployment Method: docker-compose
MongoDB Version: 4.0.0