Получение информации о флэш-слое
Получение информации о флэш-слое
Запрос
GET /v1/flashlayer/info/{:id}
Свойство
Тип
Описание
id
uint
Идентификатор флэш-слоя
Тело запроса
{}
Ответ
{
"flashlayer": {
"name": "freetrial",
"status": "STATUS_ACTIVE",
"settings": {
"blockTime": 2,
"gasless": true,
"fcfs": true,
"genesisAccounts": [],
"tokenDecimals": "18",
"tokenSymbol": "OAS",
"blockGasLimit": "30000000"
},
"resources": {
"rpc": "https://freetrial.alt.technology",
"explorer": "https://flashlayername-explorer.alt.technology",
"chainId": "5000460",
"rpcWs": "wss://freetrial.alt.technology"
},
"createdAt": "2023-08-14T13:12:17.595174Z",
"id": "1",
"tier": "FLASHLAYER_TIER_FREE_TRIAL"
}
}
## /v1/flashlayer/info/{id}
curl "https://dashboard-api.alt.technology/v1/flashlayer/info/{id}" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d $'{}'
package main
import (
"fmt"
"io"
"net/http"
"bytes"
)
func sendV1FlashlayerInfoId() {
// /v1/flashlayer/info/{id} (GET https://dashboard-api.alt.technology/v1/flashlayer/info/{id})
json := []byte(`{}`)
body := bytes.NewBuffer(json)
// Создание клиента
client := &http.Client{}
// Создание запроса
req, err := http.NewRequest("GET", "https://dashboard-api.alt.technology/v1/flashlayer/info/{id}", body)
// Заголовки
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer {access_token}")
// Запрос на получение данных
resp, err := client.Do(req)
if err != nil {
fmt.Println("Failure : ", err)
}
// Считывание тела ответа
respBody, _ := io.ReadAll(resp.Body)
// Отображение результатов
fmt.Println("response Status : ", resp.Status)
fmt.Println("response Headers : ", resp.Header)
fmt.Println("response Body : ", string(respBody))
}
# Установите библиотеку Python Requests:
# `pip install requests`
#!/usr/bin/python3
import requests
import json
def send_request():
# /v1/flashlayer/info/{id}
# GET https://dashboard-api.alt.technology/v1/flashlayer/info/{id}
try:
response = requests.get(
url="https://dashboard-api.alt.technology/v1/flashlayer/info/{id}",
headers={
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access_token}"
},
data=json.dumps({
})
)
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
Last updated