Organization 목록 조회

Prev Next

VPC 환경에서 이용 가능합니다.

블록체인 네트워크 내 MSP를 생성하고 관리하는 Organization의 목록을 조회합니다.

요청

요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.

메서드 URI
GET /networks/{networkId}/organizations

요청 헤더

Blockchain Service API에서 공통으로 사용하는 헤더에 대한 정보는 Blockchain Service 공통 헤더를 참조해 주십시오.

요청 경로 파라미터

파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
networkId Long Required 네트워크 아이디

요청 쿼리 파라미터

파라미터에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
page Integer Optional 페이지 번호
  • 0 (기본값)
size Integer Optional 조회 결과 목록 크기
  • 20 (기본값)

요청 예시

요청 예시는 다음과 같습니다.

curl --location --request GET 'https://blockchainservice.apigw.ntruss.com/api/v1/networks/{networkId}/organizations?page=0&size=20' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'

응답

응답 형식을 설명합니다.

응답 바디

응답 바디에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
content Array - Content 상세 정보
totalElements Long - 전체 Organization 수
totalPages Integer - 전체 페이지 수

content

content에 대한 설명은 다음과 같습니다.

필드 타입 필수 여부 설명
mspId String - MSP 아이디
mspName String - MSP 이름
importYn Boolean - MSP 가져오기(Import) 여부
  • Y | N (기본값)
    • Y: 다른 네트워크에서 가져온 MSP
    • N: 현재 네트워크의 MSP
exportNetworkId Long - 다른 네트워크에서 가져온 네트워크 아이디
  • importYnY일 때 표시
networkId Long - 네트워크 아이디

응답 상태 코드

Blockchain Service API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Blockchain Service 공통 응답 상태 코드를 참조해 주십시오.

응답 예시

응답 예시는 다음과 같습니다.

{
    "content": [
        {
            "mspId": "orderer-msp1",
            "mspName": "orderer-msp1",
            "importYn": "Y",
            "exportNetworkId": 1633,
            "networkId": 1634
        },
        {
            "mspId": "orderer2-msp2",
            "mspName": "orderer2-msp2",
            "importYn": "N",
            "networkId": 1634
        },
        {
            "mspId": "peer2-msp2",
            "mspName": "peer2-msp2",
            "importYn": "N",
            "networkId": 1634
        }
    ],
    "totalElements": 3,
    "totalPages": 1
}