import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeams({
limit: 20,
since: 1540095775951,
until: 1540095775951,
});
console.log(result);
}
run();
{
"teams": [
{
"connect": {
"enabled": true
},
"creatorId": "R6efeCJQ2HKXywuasPDc0fOWB",
"updatedAt": 1611796915677,
"emailDomain": "example.com",
"saml": {
"connection": {
"type": "OktaSAML",
"status": "linked",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677
},
"directory": {
"type": "OktaSAML",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677
},
"enforced": true,
"defaultRedirectUri": "vercel.com",
"roles": {}
},
"inviteCode": "hasihf9e89",
"description": "Our mission is to make cloud computing accessible to everyone.",
"stagingPrefix": "<string>",
"resourceConfig": {
"concurrentBuilds": 123,
"elasticConcurrencyEnabled": true,
"edgeConfigSize": 123,
"edgeConfigs": 123,
"kvDatabases": 123,
"blobStores": 123,
"postgresDatabases": 123,
"buildEntitlements": {
"enhancedBuilds": true
}
},
"previewDeploymentSuffix": "example.dev",
"platform": true,
"disableHardAutoBlocks": 123,
"remoteCaching": {
"enabled": true
},
"defaultDeploymentProtection": {
"passwordProtection": {
"deploymentType": "<string>"
},
"ssoProtection": {
"deploymentType": "<string>"
}
},
"defaultExpirationSettings": {
"expiration": "<string>",
"expirationProduction": "<string>",
"expirationCanceled": "<string>",
"expirationErrored": "<string>"
},
"enablePreviewFeedback": "default",
"enableProductionFeedback": "default",
"sensitiveEnvironmentVariablePolicy": "default",
"hideIpAddresses": true,
"hideIpAddressesInLogDrains": true,
"ipBuckets": [
{
"bucket": "<string>",
"supportUntil": 123
}
],
"id": "team_nllPyCtREAqxxdyFKbbMDlxd",
"slug": "my-team",
"name": "My Team",
"avatar": "6eb07268bcfadd309905ffb1579354084c24655c",
"membership": {
"uid": "<string>",
"entitlements": [
{
"entitlement": "<string>"
}
],
"teamId": "<string>",
"confirmed": true,
"accessRequestedAt": 123,
"role": "OWNER",
"teamRoles": [
"OWNER"
],
"teamPermissions": [
"IntegrationManager"
],
"createdAt": 123,
"created": 123,
"joinedFrom": {
"origin": "link",
"commitId": "<string>",
"repoId": "<string>",
"repoPath": "<string>",
"gitUserId": "<string>",
"gitUserLogin": "<string>",
"ssoUserId": "<string>",
"ssoConnectedAt": 123,
"idpUserId": "<string>",
"dsyncUserId": "<string>",
"dsyncConnectedAt": 123
}
},
"createdAt": 1630748523395
}
],
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
}
}
Get a paginated list of all the Teams the authenticated User is a member of.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.teams.getTeams({
limit: 20,
since: 1540095775951,
until: 1540095775951,
});
console.log(result);
}
run();
{
"teams": [
{
"connect": {
"enabled": true
},
"creatorId": "R6efeCJQ2HKXywuasPDc0fOWB",
"updatedAt": 1611796915677,
"emailDomain": "example.com",
"saml": {
"connection": {
"type": "OktaSAML",
"status": "linked",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677
},
"directory": {
"type": "OktaSAML",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677
},
"enforced": true,
"defaultRedirectUri": "vercel.com",
"roles": {}
},
"inviteCode": "hasihf9e89",
"description": "Our mission is to make cloud computing accessible to everyone.",
"stagingPrefix": "<string>",
"resourceConfig": {
"concurrentBuilds": 123,
"elasticConcurrencyEnabled": true,
"edgeConfigSize": 123,
"edgeConfigs": 123,
"kvDatabases": 123,
"blobStores": 123,
"postgresDatabases": 123,
"buildEntitlements": {
"enhancedBuilds": true
}
},
"previewDeploymentSuffix": "example.dev",
"platform": true,
"disableHardAutoBlocks": 123,
"remoteCaching": {
"enabled": true
},
"defaultDeploymentProtection": {
"passwordProtection": {
"deploymentType": "<string>"
},
"ssoProtection": {
"deploymentType": "<string>"
}
},
"defaultExpirationSettings": {
"expiration": "<string>",
"expirationProduction": "<string>",
"expirationCanceled": "<string>",
"expirationErrored": "<string>"
},
"enablePreviewFeedback": "default",
"enableProductionFeedback": "default",
"sensitiveEnvironmentVariablePolicy": "default",
"hideIpAddresses": true,
"hideIpAddressesInLogDrains": true,
"ipBuckets": [
{
"bucket": "<string>",
"supportUntil": 123
}
],
"id": "team_nllPyCtREAqxxdyFKbbMDlxd",
"slug": "my-team",
"name": "My Team",
"avatar": "6eb07268bcfadd309905ffb1579354084c24655c",
"membership": {
"uid": "<string>",
"entitlements": [
{
"entitlement": "<string>"
}
],
"teamId": "<string>",
"confirmed": true,
"accessRequestedAt": 123,
"role": "OWNER",
"teamRoles": [
"OWNER"
],
"teamPermissions": [
"IntegrationManager"
],
"createdAt": 123,
"created": 123,
"joinedFrom": {
"origin": "link",
"commitId": "<string>",
"repoId": "<string>",
"repoPath": "<string>",
"gitUserId": "<string>",
"gitUserLogin": "<string>",
"ssoUserId": "<string>",
"ssoConnectedAt": 123,
"idpUserId": "<string>",
"dsyncUserId": "<string>",
"dsyncConnectedAt": 123
}
},
"createdAt": 1630748523395
}
],
"pagination": {
"count": 20,
"next": 1540095775951,
"prev": 1540095775951
}
}
Default authentication mechanism
Maximum number of Teams which may be returned.
20
Timestamp (in milliseconds) to only include Teams created since then.
1540095775951
Timestamp (in milliseconds) to only include Teams created until then.
1540095775951
A paginated list of teams.