접근 부여
curl --request PUT \
--url https://api.example.com/v1/data-apps/{app_id}/grants/{username}import requests
url = "https://api.example.com/v1/data-apps/{app_id}/grants/{username}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/data-apps/{app_id}/grants/{username}', 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/{username}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$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/{username}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/v1/data-apps/{app_id}/grants/{username}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/grants/{username}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body{
"ok": true
}Publishing
접근 부여
특정 사용자에게 1:1 공유. 멱등.
PUT
/
v1
/
data-apps
/
{app_id}
/
grants
/
{username}
접근 부여
curl --request PUT \
--url https://api.example.com/v1/data-apps/{app_id}/grants/{username}import requests
url = "https://api.example.com/v1/data-apps/{app_id}/grants/{username}"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/v1/data-apps/{app_id}/grants/{username}', 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/{username}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$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/{username}"
req, _ := http.NewRequest("PUT", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/v1/data-apps/{app_id}/grants/{username}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/data-apps/{app_id}/grants/{username}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_body{
"ok": true
}PUT https://api-datahub.octoparse.com/v1/data-apps/{app_id}/grants/{username}
인증: API 키 필요(Authorization: Bearer <API Key>). App 작성자만. 그 외 404.
특정 사용자에게 App 개방(멱등). scope=shared일 때만 유효. 부여 사용자는 상세 조회·실행 가능.
요청
경로 파라미터
string
필수
App 참조.
string
필수
부여 대상 사용자 이름.
요청 예시
curl -X PUT \
-H "Authorization: Bearer $OCTOPARSE_API_KEY" \
"https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/grants/dave"
응답
200 성공
{
"data": {
"ok": true
}
}
data로 감쌉니다. 필드:
boolean
항상
true.오류
| HTTP | code | category | 설명 |
|---|---|---|---|
| 401 | unauthorized | forbidden | API 키 누락 또는 무효. |
{"error": {code, category, message, retryable}}입니다. 오류 참고.