MENU
      구독

        구독


        기사 요약

        여기에 구독 정보를 조회하기 위한 API의 설명과 사용 방법을 정리하였습니다. 이 API는 채널에 대한 구독 정보를 조회하는 데 사용됩니다.

        구독 조회 API

        이 API는 사용자의 구독 정보를 조회합니다.

        요청 URL

        GET https://dashboard-api.ncloudchat.naverncp.com/v1/api/subscriptions
        Plain text

        요청 헤더

        HeaderDescription
        x-project-id- 대시보드 > 설정 > 일반 > 프로젝트 ID
        x-api-key- 대시보드 > 설정 > 일반 > API 키

        요청 Path 파라미터

        파라미터타입필수 여부설명
        filterStringO필터링할 조건을 JSON 문자열로 전달합니다. 기본값은 {}입니다. 필터는 특정 필드에 대한 검색이 가능합니다.
        sortStringX정렬 기준을 JSON 문자열로 정의합니다. 예를 들어, {"createdAt":"-1"}은 내림차순, {"createdAt":"1"}은 오름차순입니다.
        optionStringX추가 옵션을 JSON 문자열로 제공합니다.

        Option 안내

        파라미터타입필수 여부설명
        offsetNumberX목록의 시작점
        per_pageNumberX페이지 당 보여줄 항목 수
        countBooleanX목록 대신 전체 수를 반환

        요청 예시

        curl -X 'GET' \
          'https://dashboard-api.ncloudchat.naverncp.com/v1/api/subscriptions?filter=%7B%22online%22%3Atrue%7D' \
          -H 'accept: application/json' \
          -H 'x-project-id: 339c2b1c-d35b-47f2-828d-xxxxxxxxx' \
          -H 'x-api-key: 4302925661f70ce7c14xxxxxxxxxxxxxxxxxxxx'
        Plain text

        응답 예시 (정상)

        응답은 구독 정보 목록을 JSON 배열 형태로 반환합니다.

        [
          {
            "id": "5dd63a13-dad6-4a22-8a6c-xxxxxx",
            "project_id": "339c2b1c-d35b-47f2-828d-xxxxxx",
            "channel_id": "45ee8860-fa76-4861-9dc0-xxxxxx",
            "user_id": "userId",
            "online": true,
            "language": "en",
            "push": true,
            "mute": false,
            "user": {
              "name": "nickname_576976",
              "profile": "https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=25"
            },
            "mark": {
              "user_id": null,
              "message_id": null,
              "sort_id": null,
              "unread": null
            }
          },
          ...
        ]
        Plain text

        응답

        HTTP 상태 코드와 함께 응답이 반환됩니다.

        HTTP 상태 코드응답 메시지설명
        200OK요청이 성공적으로 처리됨
        400Bad Request요청이 잘못되었을 경우 반환
        500Internal Server Error서버 내부 오류가 발생했을 경우 반환

        이 문서가 도움이 되었습니까?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.