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": [
{
"creatorId": "R6efeCJQ2HKXywuasPDc0fOWB",
"updatedAt": 1611796915677,
"description": "Our mission is to make cloud computing accessible to everyone.",
"stagingPrefix": "<string>",
"id": "team_nllPyCtREAqxxdyFKbbMDlxd",
"slug": "my-team",
"name": "My Team",
"avatar": "6eb07268bcfadd309905ffb1579354084c24655c",
"membership": {
"confirmed": true,
"role": "OWNER",
"createdAt": 123,
"created": 123,
"uid": "<string>",
"entitlements": [
{
"entitlement": "<string>"
}
],
"teamId": "<string>",
"accessRequestedAt": 123,
"teamRoles": [
"OWNER"
],
"teamPermissions": [
"IntegrationManager"
],
"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,
"connect": {
"enabled": true
},
"emailDomain": "example.com",
"saml": {
"enforced": true,
"connection": {
"type": "OktaSAML",
"status": "linked",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677,
"lastSyncedAt": 1611796915677
},
"directory": {
"type": "OktaSAML",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677,
"lastSyncedAt": 1611796915677
},
"defaultRedirectUri": "vercel.com",
"roles": {}
},
"inviteCode": "hasihf9e89",
"defaultRoles": {
"teamRoles": [
"OWNER"
],
"teamPermissions": [
"IntegrationManager"
]
},
"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": {
"expirationDays": 123,
"expirationDaysProduction": 123,
"expirationDaysCanceled": 123,
"expirationDaysErrored": 123,
"deploymentsToKeep": 123
},
"enablePreviewFeedback": "default",
"enableProductionFeedback": "default",
"sensitiveEnvironmentVariablePolicy": "default",
"hideIpAddresses": true,
"hideIpAddressesInLogDrains": true,
"ipBuckets": [
{
"bucket": "<string>",
"supportUntil": 123
}
]
}
],
"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": [
{
"creatorId": "R6efeCJQ2HKXywuasPDc0fOWB",
"updatedAt": 1611796915677,
"description": "Our mission is to make cloud computing accessible to everyone.",
"stagingPrefix": "<string>",
"id": "team_nllPyCtREAqxxdyFKbbMDlxd",
"slug": "my-team",
"name": "My Team",
"avatar": "6eb07268bcfadd309905ffb1579354084c24655c",
"membership": {
"confirmed": true,
"role": "OWNER",
"createdAt": 123,
"created": 123,
"uid": "<string>",
"entitlements": [
{
"entitlement": "<string>"
}
],
"teamId": "<string>",
"accessRequestedAt": 123,
"teamRoles": [
"OWNER"
],
"teamPermissions": [
"IntegrationManager"
],
"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,
"connect": {
"enabled": true
},
"emailDomain": "example.com",
"saml": {
"enforced": true,
"connection": {
"type": "OktaSAML",
"status": "linked",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677,
"lastSyncedAt": 1611796915677
},
"directory": {
"type": "OktaSAML",
"state": "active",
"connectedAt": 1611796915677,
"lastReceivedWebhookEvent": 1611796915677,
"lastSyncedAt": 1611796915677
},
"defaultRedirectUri": "vercel.com",
"roles": {}
},
"inviteCode": "hasihf9e89",
"defaultRoles": {
"teamRoles": [
"OWNER"
],
"teamPermissions": [
"IntegrationManager"
]
},
"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": {
"expirationDays": 123,
"expirationDaysProduction": 123,
"expirationDaysCanceled": 123,
"expirationDaysErrored": 123,
"deploymentsToKeep": 123
},
"enablePreviewFeedback": "default",
"enableProductionFeedback": "default",
"sensitiveEnvironmentVariablePolicy": "default",
"hideIpAddresses": true,
"hideIpAddressesInLogDrains": true,
"ipBuckets": [
{
"bucket": "<string>",
"supportUntil": 123
}
]
}
],
"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.
A paginated list of teams.
Data representing a Team.
Show child attributes
The ID of the user who created the Team.
"R6efeCJQ2HKXywuasPDc0fOWB"
Timestamp (in milliseconds) of when the Team was last updated.
1611796915677
A short description of the Team.
"Our mission is to make cloud computing accessible to everyone."
The prefix that is prepended to automatic aliases.
The Team's unique identifier.
"team_nllPyCtREAqxxdyFKbbMDlxd"
The Team's slug, which is unique across the Vercel platform.
"my-team"
Name associated with the Team account, or null if none has been provided.
"My Team"
The ID of the file used as avatar for this Team.
"6eb07268bcfadd309905ffb1579354084c24655c"
The membership of the authenticated User in relation to the Team.
Show child attributes
OWNER, MEMBER, DEVELOPER, SECURITY, BILLING, VIEWER, VIEWER_FOR_PLUS, CONTRIBUTOR OWNER, MEMBER, DEVELOPER, SECURITY, BILLING, VIEWER, VIEWER_FOR_PLUS, CONTRIBUTOR IntegrationManager, CreateProject, FullProductionDeployment, UsageViewer, EnvVariableManager, EnvironmentManager, V0Builder, V0Chatter, V0Viewer Show child attributes
link, saml, mail, import, teams, github, gitlab, bitbucket, dsync, feedback, organization-teams UNIX timestamp (in milliseconds) when the Team was created.
1630748523395
Hostname that'll be matched with emails on sign-up to automatically join the Team.
"example.com"
When "Single Sign-On (SAML)" is configured, this object contains information regarding the configuration of the Identity Provider (IdP).
Show child attributes
When true, interactions with the Team must be done with an authentication token that has been authenticated with the Team's SAML Single Sign-On provider.
Information for the SAML Single Sign-On configuration.
Show child attributes
The Identity Provider "type", for example Okta.
"OktaSAML"
Current status of the connection.
"linked"
Current state of the connection.
"active"
Timestamp (in milliseconds) of when the configuration was connected.
1611796915677
Timestamp (in milliseconds) of when the last webhook event was received from WorkOS.
1611796915677
Timestamp (in milliseconds) of when the last directory sync was performed.
1611796915677
Information for the Directory Sync configuration.
Show child attributes
The Identity Provider "type", for example Okta.
"OktaSAML"
Current state of the connection.
"active"
Timestamp (in milliseconds) of when the configuration was connected.
1611796915677
Timestamp (in milliseconds) of when the last webhook event was received from WorkOS.
1611796915677
Timestamp (in milliseconds) of when the last directory sync was performed.
1611796915677
The default redirect URI to use after successful SAML authentication.
vercel.com, v0.dev, v0.app When "Directory Sync" is configured, this object contains a mapping of which Directory Group (by ID) should be assigned to which Vercel Team "role".
Code that can be used to join this Team. Only visible to Team owners.
"hasihf9e89"
Default roles for the team.
Show child attributes
OWNER, MEMBER, DEVELOPER, SECURITY, BILLING, VIEWER, VIEWER_FOR_PLUS, CONTRIBUTOR IntegrationManager, CreateProject, FullProductionDeployment, UsageViewer, EnvVariableManager, EnvironmentManager, V0Builder, V0Chatter, V0Viewer Show child attributes
The total amount of concurrent builds that can be used.
Whether every build for this team / user has elastic concurrency enabled automatically.
The maximum size in kilobytes of an Edge Config. Only specified if a custom limit is set.
The maximum number of edge configs an account can create.
The maximum number of kv databases an account can create.
The maximum number of blob stores an account can create.
The maximum number of postgres databases an account can create.
The hostname that is current set as preview deployment suffix.
"example.dev"
Whether the team is a platform team.
true
Default deployment protection for this team
Show child attributes
Default deployment expiration settings for this team
Show child attributes
Number of days to keep non-production deployments (mostly preview deployments) before soft deletion.
Number of days to keep production deployments before soft deletion.
Number of days to keep canceled deployments before soft deletion.
Number of days to keep errored deployments before soft deletion.
Minimum number of production deployments to keep for this project, even if they are over the production expiration limit.
Whether toolbar is enabled on preview deployments
default, on, off, on-force, off-force, default-force Whether toolbar is enabled on production deployments
default, on, off, on-force, off-force, default-force Sensitive environment variable policy for this team
default, on, off Indicates if IP addresses should be accessible in observability (o11y) tooling
Indicates if IP addresses should be accessible in log drains
This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data.
Show child attributes
Amount of items in the current page.
20
Timestamp that must be used to request the next page.
1540095775951
Timestamp that must be used to request the previous page.
1540095775951