메모 엔드포인트
Reactor API에서 참고는 특정 리소스에 추가할 수 있는 텍스트 주석입니다. 참고는 기본적으로 해당 리소스에 대한 주석입니다. 참고의 내용은 리소스 동작에 영향을 주지 않으며, 다음을 포함한 다양한 사용 사례에 사용할 수 있습니다.
- 배경 정보 제공
- 할 일 목록으로 작동
- 리소스 사용 조언 전달
- 다른 팀원에게 지침 제공
- 기록 컨텍스트 기록
Reactor API의 /notes
끝점을 사용하면 이러한 메모를 프로그래밍 방식으로 관리할 수 있습니다.
참고는 다음 리소스에 적용할 수 있습니다.
이 6가지 유형을 통칭하여 "주목할 만한" 리소스라고 합니다. 주목할 만한 리소스를 삭제하면 연결된 참고도 삭제됩니다.
시작하기
이 가이드에 사용된 끝점은 Reactor API의 일부입니다. 계속하기 전에 시작 안내서에서 API 인증 방법에 대한 중요한 정보를 검토하십시오.
메모 목록 검색 list
해당 리소스에 대한 GET 요청의 경로에 /notes
을(를) 추가하여 리소스에 대한 참고 목록을 검색할 수 있습니다.
API 형식
GET /{RESOURCE_TYPE}/{RESOURCE_ID}/notes
RESOURCE_TYPE
메모를 가져오는 리소스의 유형입니다. 다음 값 중 하나여야 합니다.
data_elements
extensions
libraries
properties
rule_components
rules
RESOURCE_ID
id
입니다.요청
다음 요청은 라이브러리에 첨부된 메모를 나열합니다.
curl -X GET \
https://reactor.adobe.io/libraries/LBcffea1a38c52408cae2398868625a12d/notes \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
응답
성공한 응답은 지정된 리소스에 첨부된 참고 목록을 반환합니다.
{
"data": [
{
"id": "NTa40de8d76bfd4e40835830900ce83b7b",
"type": "notes",
"attributes": {
"author_display_name": "John Smith",
"author_email": "jsmith@example.com",
"created_at": "2020-12-14T17:51:00.411Z",
"text": "this is a note on a library"
},
"relationships": {
"resource": {
"links": {
"related": "https://reactor.adobe.io/libraries/LBcffea1a38c52408cae2398868625a12d"
},
"data": {
"id": "LBcffea1a38c52408cae2398868625a12d",
"type": "libraries"
}
}
},
"links": {
"resource": "https://reactor.adobe.io/libraries/LBcffea1a38c52408cae2398868625a12d",
"self": "https://reactor.adobe.io/notes/NTa40de8d76bfd4e40835830900ce83b7b"
}
}
],
"meta": {
"pagination": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"total_count": 1
}
}
}
메모 조회 lookup
GET 요청 경로에 해당 ID를 제공하여 메모를 조회할 수 있습니다.
API 형식
GET /notes/{NOTE_ID}
NOTE_ID
id
입니다.요청
curl -X GET \
https://reactor.adobe.io/notes/NT550b7a17ab304d49ba289a2978d673e5 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
응답
성공적인 응답은 메모의 세부 사항을 반환합니다.
{
"data": {
"id": "NT550b7a17ab304d49ba289a2978d673e5",
"type": "notes",
"attributes": {
"author_display_name": "John Smith",
"author_email": "jsmith@example.com",
"created_at": "2020-12-14T17:51:10.316Z",
"text": "this is a note on a property"
},
"relationships": {
"resource": {
"links": {
"related": "https://reactor.adobe.io/properties/PR4537ac6f1f204ffd864ec47c4b27c2e8"
},
"data": {
"id": "PR4537ac6f1f204ffd864ec47c4b27c2e8",
"type": "properties"
}
}
},
"links": {
"resource": "https://reactor.adobe.io/properties/PR4537ac6f1f204ffd864ec47c4b27c2e8",
"self": "https://reactor.adobe.io/notes/NT550b7a17ab304d49ba289a2978d673e5"
}
}
}
참고 만들기 create
해당 리소스에 대한 POST 요청의 경로에 /notes
을(를) 추가하여 새 메모를 만들 수 있습니다.
API 형식
POST /{RESOURCE_TYPE}/{RESOURCE_ID}/notes
RESOURCE_TYPE
메모를 작성 중인 리소스의 유형입니다. 다음 값 중 하나여야 합니다.
data_elements
extensions
libraries
properties
rule_components
rules
RESOURCE_ID
id
입니다.요청
다음 요청은 속성에 대한 새 메모를 만듭니다.
curl -X POST \
https://reactor.adobe.io/properties/PRb25a704c0b7c4562835ccdf96d3afd31/notes \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"type": "notes",
"attributes": {
"text": "this is a note on a property"
}
}
}'
type
notes
이어야 합니다.attributes.text
응답
성공적인 응답은 새로 생성된 노트의 세부 정보를 반환합니다.
{
"data": {
"id": "NT550b7a17ab304d49ba289a2978d673e5",
"type": "notes",
"attributes": {
"author_display_name": "John Smith",
"author_email": "jsmith@example.com",
"created_at": "2020-12-14T17:51:10.316Z",
"text": "This is a note on a property"
},
"relationships": {
"resource": {
"links": {
"related": "https://reactor.adobe.io/properties/PR4537ac6f1f204ffd864ec47c4b27c2e8"
},
"data": {
"id": "PR4537ac6f1f204ffd864ec47c4b27c2e8",
"type": "properties"
}
}
},
"links": {
"resource": "https://reactor.adobe.io/properties/PR4537ac6f1f204ffd864ec47c4b27c2e8",
"self": "https://reactor.adobe.io/notes/NT550b7a17ab304d49ba289a2978d673e5"
}
}
}