Loading

How to Get a Cloudhub 2.0 Private Space's ID via API?

게시 일자: Mar 2, 2024
단계

CONTENTS

You are using Cloudhub 2.0. You need to get the internal ID of a Cloudhub 2.0 private space via API.

STEPS TO FOLLOW

1. Here is the official documentation link

2. First, please get a connected app bearer token or a user token without MFA enabled: 

Creating connected app and getting the bearer token example 

How to generate your Authorization Bearer token for Anypoint Platform

3. Please call the API per below:
 

curl -X GET -H 'Authorization: Bearer <token from step 2>' -H 'Content-Type: application/json'  
https://anypoint.mulesoft.com/runtimefabric/api/organizations/{orgId}/privatespaces
4. You should see something like this:
{
  "content": [
    {
      "id": "abcd323-8ab1-43e2-aa61-2342342343",
      "name": "test-west2-external",
      "organizationId": "12312312-e6c4-475c-8711-234234234",
      "rootOrganizationId": "12312312-e6c4-475c-8711-23423423432",
      "region": "us-west-2",
      "status": "Active",
      "connections": {
        "transitGateways": [
          {
            "id": "tgw-23423423",
            "name": "test-tgw-2",
            "spec": {
              "resourceShare": {
                "id": "5b11a277-c4af-4bd4-bd92-23423423243"
              }
            },
            "status": {
              "routes": [
                "1.1.1.1/32"
              ]
            }
          }
        ]
      }
    },
    {
      "id": "23423423-f932-43cb-aada-423423432",
      "name": "test-west2-private",
      "organizationId": "23423423-e6c4-475c-8711-234324",
      "rootOrganizationId": "23423423-e6c4-475c-8711-23423",
      "region": "us-west-2",
      "status": "Active",
      "connections": {
        "transitGateways": [
          {
            "id": "tgw-234234",
            "name": "test-tgw-2",
            "spec": {
              "resourceShare": {
                "id": "5b11a277-c4af-4bd4-bd92-23423423423"
              }
            },
            "status": {
              "routes": [
                "10.66.77.0/24"
              ]
            }
          }
        ]
      }
    }
  ],
  "pageable": {
    "sort": {
      "empty": true,
      "sorted": false,
      "unsorted": true
    },
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 100,
    "paged": true,
    "unpaged": false
  },
  "totalPages": 1,
  "totalElements": 2,
  "last": true,
  "number": 0,
  "sort": {
    "empty": true,
    "sorted": false,
    "unsorted": true
  },
  "size": 100,
  "numberOfElements": 2,
  "first": true,
  "empty": false
}

Each "id" will represent the corresponding private space's ID.
Knowledge 기사 번호

001115487

 
로드 중
Salesforce Help | Article