IDs and Credentials
export REPLICATED_API_TOKEN=...
export REPLICATED_APP_ID=2C0OQyxiiA4pc3blK0cKs5VQS3N # example
Get an API token by navigating to Account Settings and scrolling to the bottom to create a Personal API Token (PAT), or by creating a service account:
Get an App ID on the /settings
page. NOTE - an ID is required to use the REST API - application slugs are not supported for most endpoints.
Then, you can run the following cURL command to query customers.
curl -v -H "Authorization: $REPLICATED_API_TOKEN" "https://api.replicated.com/vendor/v3/app/$REPLICATED_APP_ID/customers?pageSize=50&sortDesc=true¤tPage=0"
{
"customers": [
{
"id": "2JBxR7eNpTA5vl2rkkmUbVozdLd",
"teamId": "Dq6-SEzp_hIUBfpMe5cv0OzaFIb8IDpv",
"name": "The Airplane Company",
"email": "dexter@replicated.com",
"createdAt": "2022-12-20T19:41:06Z",
"expiresAt": null,
"isArchived": false,
"type": "prod",
"installationId": "2JBxRAHOAKqnA80g4hoEDNwteiP",
"installationVersion": "79",
"appType": "",
"airgap": false,
"isGitopsSupported": true,
"isIdentityServiceSupported": false,
"isGeoaxisSupported": false,
"isSnapshotSupported": false,
"isSupportBundleUploadEnabled": true,
"installedReleaseSequence": 81,
"installedReleaseLabel": "1.12.2",
"channels": [
{
"id": "2C0OR5HUAAge0xo2ggEwGwOHSG4",
"appId": "2C0OQyxiiA4pc3blK0cKs5VQS3N",
"appSlug": "wordpress-enterprise",
"appName": "wordpress-enterprise",
"channelSlug": "stable",
"name": "Stable",
"description": "",
"channelIcon": "",
"isArchived": false,
"isDefault": true,
"created": "2022-07-16T01:47:03Z",
"updated": "2022-07-16T01:47:03Z",
"numReleases": 34,
"buildAirgapAutomatically": true,
"airgapDockerRegistryFormatEnabled": false,
"semverRequired": true,
"semverWarning": "",
"targetKotsVersion": "",
"enterprisePartnerChannelID": "",
"channelSequence": 34,
"currentVersion": "1.12.2",
"extraLintRules": null,
"gitHubRef": null,
"releaseNotes": "\"\"",
"releaseSequence": 79,
"replicatedRegistryDomain": "",
"adoptionRate": [],
"customers": {
"totalCustomers": 0,
"activeCustomers": 0,
"inactiveCustomers": 0
},
"releases": [],
"chartReleases": null
}
],
"instances": [
{
"licenseId": "REDACTED",
"instanceId": "2JK93avStGaNpwTfiHHUkc2iZ9p",
"clusterId": "bhbwxvgqnoqtajhbxyqvblpidqhmfuts",
"createdAt": "2022-12-23T17:15:09Z",
"lastActive": "2023-05-26T12:39:00.663Z",
"appStatus": "ready",
"active": true,
"versionHistory": [
{
"instanceId": "2JK93avStGaNpwTfiHHUkc2iZ9p",
"clusterId": "bhbwxvgqnoqtajhbxyqvblpidqhmfuts",
"versionLabel": "1.12.2",
"downstreamChannelId": "2C0OR5HUAAge0xo2ggEwGwOHSG4",
"downstreamReleaseSequence": 81,
"intervalStart": "2023-05-22T00:38:02.562Z",
"intervalLast": "2023-05-26T12:39:00.663Z",
"replHelmCount": 0,
"nativeHelmCount": 0
}
],
"kotsVersion": "1.92.1",
"cloud": "gce",
"isAirgap": false,
"isKurl": false,
"kurlNodeCountTotal": 0,
"kurlNodeCountReady": 0,
"k8sVersion": "v1.24.11-gke.1000",
"client": "",
"isDummyInstance": false
}
]
}