Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

스케줄 영향 대상 조회(Get Affected Resources Schedule) (V2)

스케줄의 영향 대상 리소스를 조회합니다. 응답의 datasets는 선택적인 BuildableRid 목록입니다. 이름이 datasets여도 그 자료형은 데이터셋, 미디어 집합이나 제한 뷰처럼 빌드 가능한 리소스의 RID입니다.

대상 범위와 권한이 바뀌면 실제 빌드 대상도 달라질 수 있으므로 실행 전의 범위 확인에 사용합니다.

이 엔드포인트는 미리보기 기능이며 언제든 변경되거나 제거될 수 있습니다. 사용하려면 preview=true를 지정합니다.

HTTP 요청

POST /api/v2/orchestration/schedules/{scheduleRid}/getAffectedResources

작업 식별자는 v2.getAffectedResourcesSchedule입니다. OAuth2로 호출하는 타사 애플리케이션에는 api:orchestration-read 권한 범위가 필요합니다. 각 요청에 Authorization: Bearer <접근 토큰>을 전달합니다.

경로 매개변수

이름자료형필수 여부의미와 조건예시 값
scheduleRidstring필수스케줄의 RID입니다.ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871

쿼리 매개변수

이름자료형필수 여부의미와 조건예시 값
previewboolean선택미리보기 기능 사용을 활성화합니다.true

요청 본문

요청 본문을 사용하지 않습니다.

응답

응답 형식은 AffectedResourcesResponse입니다.

이름자료형필수 여부의미와 조건예시 값
datasetslist<BuildableRid>선택

datasets의 구조

배열 항목은 BuildableRid이며 자료형은 string입니다.

빌드할 수 있는 리소스의 RID입니다. 데이터셋, 미디어 집합 또는 제한 뷰 RID 등이 해당합니다.

개별 오류

오류 이름오류 코드HTTP의미와 조건추가 매개변수
GetAffectedResourcesSchedulePermissionDeniedPERMISSION_DENIED403스케줄의 영향 대상 리소스를 조회할 권한이 없습니다.scheduleRid

요청 예제

FOUNDRY_HOST에는 https://를 제외한 Foundry 호스트를, FOUNDRY_TOKEN에는 유효한 토큰을 환경 변수로 제공합니다. 예시 식별자와 매개변수 값은 실제 작업 대상에 맞게 바꿉니다.

cURL

curl -X POST \
	-H "Authorization: Bearer ${FOUNDRY_TOKEN}" \
	"https://${FOUNDRY_HOST}/api/v2/orchestration/schedules/ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871/getAffectedResources?preview=true"

Python

Requests 라이브러리가 설치된 Python 환경에서 사용합니다.

import os
import requests

HOSTNAME = os.environ["FOUNDRY_HOST"]
TOKEN = os.environ["FOUNDRY_TOKEN"]
headers = {
    "authorization": "Bearer {}".format(TOKEN)
}

response = requests.post('https://{}/api/v2/orchestration/schedules/ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871/getAffectedResources?preview=true'.format(HOSTNAME), headers=headers)
print(response)

Java

Apache HttpClient 4.5 API와 try-with-resources를 사용합니다. 클래스 이름에 맞는 GetAffectedResourcesScheduleExample.java 파일에서 사용합니다.

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;

public class GetAffectedResourcesScheduleExample {
    public static void main(String[] args) throws Exception {
        String HOSTNAME = System.getenv("FOUNDRY_HOST");
        String TOKEN = System.getenv("FOUNDRY_TOKEN");

        try (CloseableHttpClient httpClient = HttpClientBuilder.create().build()) {
            HttpPost request = new HttpPost("https://" + HOSTNAME + "/api/v2/orchestration/schedules/ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871/getAffectedResources?preview=true");
            request.addHeader("authorization", String.format("Bearer %s", TOKEN));
            try (CloseableHttpResponse response = httpClient.execute(request)) {
                System.out.println(response);
            }
        }
    }
}

JavaScript

fetch를 제공하는 Node.js 환경에서 사용합니다. 서비스 사용자 토큰을 브라우저로 전달하지 않습니다.

const HOSTNAME = process.env.FOUNDRY_HOST;
const TOKEN = process.env.FOUNDRY_TOKEN;

fetch(`https://${HOSTNAME}/api/v2/orchestration/schedules/ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871/getAffectedResources?preview=true`, {
    method: 'POST',
    headers: {
        'Authorization': `Bearer ${TOKEN}`,
    }
}).then((response) => {
    console.log(response)
});

PowerShell

$ErrorActionPreference = 'Stop'
$TOKEN = $env:FOUNDRY_TOKEN
$HOSTNAME = $env:FOUNDRY_HOST

$headers = @{
    "authorization" = "Bearer $TOKEN"
}

$response = Invoke-WebRequest -Uri "https://$HOSTNAME/api/v2/orchestration/schedules/ri.scheduler.main.schedule.5ad5c340-59f3-4a60-9fc6-161bb984f871/getAffectedResources?preview=true" `
	-Method Post `
	-Headers $headers

$response.content