메모 엔드포인트

Reactor API에서 참고는 특정 리소스에 추가할 수 있는 텍스트 주석입니다. 참고는 기본적으로 해당 리소스에 대한 주석입니다. 참고의 내용은 리소스 동작에 영향을 주지 않으며, 다음을 포함한 다양한 사용 사례에 사용할 수 있습니다.

  • 배경 정보 제공
  • 할 일 목록으로 작동
  • 리소스 사용 조언 전달
  • 다른 팀원에게 지침 제공
  • 기록 컨텍스트 기록

Reactor API의 /notes 끝점을 사용하면 이러한 메모를 프로그래밍 방식으로 관리할 수 있습니다.

참고는 다음 리소스에 적용할 수 있습니다.

이 6가지 유형을 통칭하여 "주목할 만한" 리소스라고 합니다. 주목할 만한 리소스를 삭제하면 연결된 참고도 삭제됩니다.

NOTE
여러 개의 수정 버전이 있을 수 있는 리소스의 경우 현재(헤드) 수정 버전에 모든 메모를 만들어야 합니다. 다른 수정 사항에 첨부할 수 없습니다.
그러나 참고는 여전히 수정 버전에서 읽을 수 있습니다. 이러한 경우 API는 개정 생성 전에 존재했던 참고만 반환합니다. 이 스냅샷은 수정본을 잘라낼 때의 주석 스냅샷을 제공합니다. 반면 현재(헤드) 수정본에서 메모를 읽으면 해당 메모가 모두 반환됩니다.

시작하기

이 가이드에 사용된 끝점은 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

WARNING
새 메모를 작성하기 전에 메모를 편집할 수 없으며 삭제할 수 있는 유일한 방법은 해당 리소스를 삭제하는 것입니다.

해당 리소스에 대한 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
(필수) 메모를 구성하는 텍스트입니다. 각 참고는 512개의 유니코드 문자로 제한됩니다.

응답

성공적인 응답은 새로 생성된 노트의 세부 정보를 반환합니다.

{
  "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"
    }
  }
}
recommendation-more-help
12b4e4a9-5028-4d88-8ce6-64a580811743