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>"
}
]
}Publishing
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}}입니다. 오류 참고.