Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

액션 유형 목록(List Action Types) (V2)

온톨로지의 액션 유형을 페이지 단위로 조회합니다. pageSize의 기본값은 500이며 반환 페이지는 요청한 크기보다 작을 수 있습니다. 결과가 더 남아 있다면 적어도 한 항목을 반환합니다. 다음 페이지에는 이전 응답의 nextPageToken을 전달합니다.

HTTP 요청

GET /api/v2/ontologies/{ontology}/actionTypes

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

경로 매개변수

이름자료형필수 여부의미와 조건예시 값
ontologystring필수온톨로지의 API 이름 또는 RID입니다. List Ontologies 또는 Ontology Manager에서 확인합니다.palantir

쿼리 매개변수

이름자료형필수 여부의미와 조건예시 값
branchstring선택조회할 Foundry 브랜치입니다. 생략하면 기본 브랜치를 사용합니다. 브랜치는 실험적 기능이며 모든 작업 경로를 지원하지 않습니다.ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252
pageSizeinteger선택요청할 페이지 크기이며 기본값은 500입니다.
pageTokenstring선택페이지 조회를 시작할 위치입니다. 첫 요청에서는 생략하고, 다음 요청에서는 직전 응답의 nextPageToken을 pageToken으로 전달합니다.

요청 본문

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

응답

응답 형식은 ListActionTypesResponseV2입니다.

성공 응답입니다.

이름자료형필수 여부의미와 조건예시 값
nextPageTokenstring선택다음 페이지를 요청할 때 pageToken에 전달할 토큰입니다. 다음 토큰이 없으면 마지막 페이지입니다.
datalist<ActionTypeV2>선택

data의 구조

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

온톨로지의 액션 유형 정의입니다.

전체 필드는 액션 유형 메타데이터를 따릅니다.

액션 유형 목록의 응답 예시입니다.

{
  "nextPageToken": "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z",
  "data": [
    {
      "apiName": "promote-employee",
      "description": "Update an employee's title and compensation",
      "parameters": {
        "employeeId": {
          "dataType": {
            "type": "integer"
          },
          "displayName": "employeeId",
          "required": true
        },
        "newTitle": {
          "dataType": {
            "type": "string"
          },
          "displayName": "newTitle",
          "required": true
        },
        "newCompensation": {
          "dataType": {
            "type": "double"
          },
          "displayName": "newCompensation",
          "required": true
        }
      },
      "rid": "ri.ontology.main.action-type.7ed72754-7491-428a-bb18-4d7296eb2167",
      "status": "ACTIVE"
    },
    {
      "apiName": "move-office",
      "description": "Update an office's physical location",
      "parameters": {
        "officeId": {
          "dataType": {
            "type": "string"
          },
          "displayName": "officeId",
          "required": true
        },
        "newAddress": {
          "description": "The office's new physical address (not necessarily shipping address)",
          "dataType": {
            "type": "string"
          },
          "displayName": "newAddress",
          "required": true
        },
        "newCapacity": {
          "description": "The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)",
          "dataType": {
            "type": "integer"
          },
          "displayName": "newCapacity",
          "required": true
        }
      },
      "rid": "ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2",
      "status": "ACTIVE"
    }
  ]
}

개별 오류

오류 응답 처리는 공통 API 오류 계약을 따릅니다.

요청 예제

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

브랜치 RID는 실제 대상으로 바꿉니다. 기본 브랜치를 조회할 때는 branch를 생략합니다.

cURL

curl \
	-H "Authorization: Bearer ${FOUNDRY_TOKEN}" \
	"https://${FOUNDRY_HOST}/api/v2/ontologies/palantir/actionTypes?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252"

Python

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

import os
import requests

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

response = requests.get('https://{}/api/v2/ontologies/palantir/actionTypes?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252'.format(HOSTNAME), headers=headers)
print(response)

Java

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

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

public class ListActionTypesV2Example {
    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()) {
            HttpGet request = new HttpGet("https://" + HOSTNAME + "/api/v2/ontologies/palantir/actionTypes?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252");
            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/ontologies/palantir/actionTypes?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252`, {
    method: 'GET',
    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/ontologies/palantir/actionTypes?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252" `
	-Headers $headers

$response.content