grant 一覧
curl --request GET \
--url https://api.example.com/v1/data-apps/{app_id}/grantsimport requests
url = "https://api.example.com/v1/data-apps/{app_id}/grants"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/data-apps/{app_id}/grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/data-apps/{app_id}/grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/data-apps/{app_id}/grants"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/data-apps/{app_id}/grants")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"username": "<string>",
"granted_at": "<string>"
}
]
}公開
grant 一覧
App の 1 対 1 共有 grant リストを表示。
GET
/
v1
/
data-apps
/
{app_id}
/
grants
grant 一覧
curl --request GET \
--url https://api.example.com/v1/data-apps/{app_id}/grantsimport requests
url = "https://api.example.com/v1/data-apps/{app_id}/grants"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/data-apps/{app_id}/grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/data-apps/{app_id}/grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/data-apps/{app_id}/grants"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/data-apps/{app_id}/grants")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"username": "<string>",
"granted_at": "<string>"
}
]
}GET https://api-datahub.octoparse.com/v1/data-apps/{app_id}/grants
認証:APIキー必須(Authorization: Bearer <API Key>)。App 作者のみ。他者は 404。
scope=shared のときに有効になる grant リスト。作者のみ。Release が 0 件の App でも利用できる。このリストが詳細ペイロードや作者以外へのレスポンスに現れることはない。ユーザー名は表示時に解決されるため、grantee が改名した場合は新しい名前が表示される。
リクエスト
パスパラメータ
string
必須
App の参照。
リクエスト例
curl \
-H "Authorization: Bearer $OCTOPARSE_API_KEY" \
"https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/grants"
レスポンス
200 成功
{
"data": {
"items": []
}
}
data に包まれます。フィールド:
エラー
| HTTP | code | category | 説明 |
|---|---|---|---|
| 401 | unauthorized | forbidden | API キー欠落または無効。 |
{"error": {code, category, message, retryable}} です。エラー を参照。