Retrieve
client.teams.retrieve(stringteamID, RequestOptionsoptions?): TeamRetrieveResponse { team }
GET/teams/{teamId}
Retrieve
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
const team = await client.teams.retrieve('teamId');
console.log(team.team);{
"team": {
"id": "id",
"createdAt": "createdAt",
"invitations": [
{
"createdAt": "createdAt",
"email": "email",
"role": "admin",
"status": "accepted",
"url": "url",
"projectIds": [
"string"
]
}
],
"keys": [
{
"id": "id",
"apiKeyId": "apiKeyId",
"apiKeyStatus": "active",
"createdAt": "createdAt",
"name": "name",
"scope": "project",
"updatedAt": "updatedAt",
"authorId": "authorId",
"consumption": 0,
"lastUsedAt": "lastUsedAt",
"maxConsumption": 0,
"ownerId": "ownerId",
"projects": [
{
"projectId": "projectId",
"role": "role"
}
],
"role": "role"
}
],
"name": "name",
"paymentStatus": "failed",
"plan": "cu-basic",
"projects": [
{
"id": "id",
"createdAt": "createdAt",
"name": "name",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"disableIpDetection": true,
"qualityGateAutoDetect": true
}
],
"searchHost": "searchHost",
"searchIndexes": {
"assets": {
"private": "private",
"public": "public"
},
"models": {
"private": "private",
"public": "public"
},
"workflows": {
"private": "private",
"public": "public"
}
},
"type": "personal",
"updatedAt": "updatedAt",
"users": [
{
"id": "id",
"createdAt": "createdAt",
"email": "email",
"role": "admin",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"consumption": 0,
"maxConsumption": 0
}
],
"avatar": {
"assetId": "assetId",
"url": "url"
},
"byok": {
"markupMultiplier": 0,
"updatedAt": "updatedAt",
"updatedBy": "updatedBy"
},
"defaultUserMaxConsumption": 0,
"ipDetectionEnforcement": "active-fail-closed",
"qualityGateAutoDetect": true,
"settings": {
"homepage": {
"foo": "bar"
}
},
"subscriptionStatus": "active"
}
}Returns Examples
{
"team": {
"id": "id",
"createdAt": "createdAt",
"invitations": [
{
"createdAt": "createdAt",
"email": "email",
"role": "admin",
"status": "accepted",
"url": "url",
"projectIds": [
"string"
]
}
],
"keys": [
{
"id": "id",
"apiKeyId": "apiKeyId",
"apiKeyStatus": "active",
"createdAt": "createdAt",
"name": "name",
"scope": "project",
"updatedAt": "updatedAt",
"authorId": "authorId",
"consumption": 0,
"lastUsedAt": "lastUsedAt",
"maxConsumption": 0,
"ownerId": "ownerId",
"projects": [
{
"projectId": "projectId",
"role": "role"
}
],
"role": "role"
}
],
"name": "name",
"paymentStatus": "failed",
"plan": "cu-basic",
"projects": [
{
"id": "id",
"createdAt": "createdAt",
"name": "name",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"disableIpDetection": true,
"qualityGateAutoDetect": true
}
],
"searchHost": "searchHost",
"searchIndexes": {
"assets": {
"private": "private",
"public": "public"
},
"models": {
"private": "private",
"public": "public"
},
"workflows": {
"private": "private",
"public": "public"
}
},
"type": "personal",
"updatedAt": "updatedAt",
"users": [
{
"id": "id",
"createdAt": "createdAt",
"email": "email",
"role": "admin",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"consumption": 0,
"maxConsumption": 0
}
],
"avatar": {
"assetId": "assetId",
"url": "url"
},
"byok": {
"markupMultiplier": 0,
"updatedAt": "updatedAt",
"updatedBy": "updatedBy"
},
"defaultUserMaxConsumption": 0,
"ipDetectionEnforcement": "active-fail-closed",
"qualityGateAutoDetect": true,
"settings": {
"homepage": {
"foo": "bar"
}
},
"subscriptionStatus": "active"
}
}