Skip to content
Docs

Lists all Shared Environment Variables for a team

GEThttps://api.vercel.com/v1/env
Lists all Shared Environment Variables for a team, taking into account optional filters.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.environment.listSharedEnvVariable({
projectId: "prj_2WjyKQmM8ZnGcJsPWMrHRHrE",
ids: "env_2WjyKQmM8ZnGcJsPWMrHRHrE,env_2WjyKQmM8ZnGcJsPWMrHRCRV",
excludeIdsQueryParameter: "env_2WjyKQmM8ZnGcJsPWMrHRHrE,env_2WjyKQmM8ZnGcJsPWMrHRCRV",
excludeIdsQueryParameter1: "env_2WjyKQmM8ZnGcJsPWMrHRHrE,env_2WjyKQmM8ZnGcJsPWMrHRCRV",
excludeProjectIdQueryParameter: "prj_2WjyKQmM8ZnGcJsPWMrHRHrE",
excludeProjectIdQueryParameter1: "prj_2WjyKQmM8ZnGcJsPWMrHRHrE",
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"data": [
{
"applyToAllCustomEnvironments": "false",
"comment": "string",
"created": "2021-02-10T13:11:49.180Z",
"createdAt": "1609492210000",
"createdBy": "2qDDuGFTWXBLDNnqZfWPDp1A",
"customEnvironmentIds": [],
"decrypted": "false",
"deletedAt": "1609492210000",
"deletedBy": "2qDDuGFTWXBLDNnqZfWPDp1A",
"id": "env_XCG7t7AIHuO2SBA8667zNUiM",
"key": "my-api-key",
"lastEditedByDisplayName": "Example Name",
"lastEditedByPrincipal": {
"avatar": "string",
"id": "icfg_1234567890",
"name": "Example Name",
"type": "user",
"username": "string"
},
"ownerId": "team_LLHUOMOoDlqOp8wPE4kFo9pE",
"projectId": [],
"securityIssues": [],
"target": [],
"type": "encrypted",
"updatedAt": "1609492210000",
"updatedBy": "2qDDuGFTWXBLDNnqZfWPDp1A",
"value": "string"
}
],
"pagination": {
"count": "20",
"next": "1540095775951",
"prev": "1540095775951"
}
}
AuthorizationbearerToken

Default authentication mechanism

projectIdstringOptional
Filter SharedEnvVariables that belong to a project
idsstringOptional
Filter SharedEnvVariables based on comma separated ids
exclude_idsstringOptional
Filter SharedEnvVariables based on comma separated ids
exclude-idsstringOptional
Filter SharedEnvVariables based on comma separated ids
exclude_projectIdstringOptional
Filter SharedEnvVariables that belong to a project
exclude-projectIdstringOptional
Filter SharedEnvVariables that belong to a project
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Success
dataarrayRequired
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error