Update
projects.update(strproject_id, ProjectUpdateParams**kwargs) -> ProjectUpdateResponse
PUT/projects/{projectId}
Update the name of a Project
Parameters
description: Optional[str]
High-level markdown description of the project Set to null to clear the description
maxLength2000
Switch IP detection off for this project only. The team’s posture (see PUT /teams/{teamId}) applies to every project by default; set this to true to opt this project out of it, false to opt it back in. A project cannot choose a posture of its own. Team-admin only.
max_consumption: Optional[float]
Max consumption (CU) for this project over the billing period.
Set to null to remove the cap. Team admins only, or a team API key holding
team.members.manage, which may then send this field alone.
Toggle the privacyMode mode When enabled, users can only see their own generated assets (except admins)
Update
import os
from scenario_sdk import Scenario
client = Scenario(
api_key=os.environ.get("SCENARIO_SDK_API_KEY"), # This is the default and can be omitted
api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"), # This is the default and can be omitted
)
project = client.projects.update(
project_id="projectId",
)
print(project.project){
"project": {
"id": "id",
"createdAt": "createdAt",
"keys": [
{
"id": "id",
"apiKeyId": "apiKeyId",
"apiKeyStatus": "active",
"createdAt": "createdAt",
"name": "name",
"role": "role",
"scope": "project",
"updatedAt": "updatedAt",
"authorId": "authorId",
"consumption": 0,
"lastUsedAt": "lastUsedAt",
"maxConsumption": 0,
"ownerId": "ownerId",
"projects": [
{
"projectId": "projectId",
"role": "role"
}
]
}
],
"name": "name",
"privacyMode": true,
"teamId": "teamId",
"updatedAt": "updatedAt",
"users": [
{
"id": "id",
"createdAt": "createdAt",
"email": "email",
"role": "role",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"consumption": 0,
"maxConsumption": 0
}
],
"avatar": {
"assetId": "assetId",
"url": "url"
},
"consumption": 0,
"description": "description",
"descriptionDate": "descriptionDate",
"disableIpDetection": true,
"maxConsumption": 0,
"qualityGateAutoDetect": true,
"settings": {
"homepage": {
"foo": "bar"
}
}
}
}Returns Examples
{
"project": {
"id": "id",
"createdAt": "createdAt",
"keys": [
{
"id": "id",
"apiKeyId": "apiKeyId",
"apiKeyStatus": "active",
"createdAt": "createdAt",
"name": "name",
"role": "role",
"scope": "project",
"updatedAt": "updatedAt",
"authorId": "authorId",
"consumption": 0,
"lastUsedAt": "lastUsedAt",
"maxConsumption": 0,
"ownerId": "ownerId",
"projects": [
{
"projectId": "projectId",
"role": "role"
}
]
}
],
"name": "name",
"privacyMode": true,
"teamId": "teamId",
"updatedAt": "updatedAt",
"users": [
{
"id": "id",
"createdAt": "createdAt",
"email": "email",
"role": "role",
"updatedAt": "updatedAt",
"avatar": {
"assetId": "assetId",
"url": "url"
},
"consumption": 0,
"maxConsumption": 0
}
],
"avatar": {
"assetId": "assetId",
"url": "url"
},
"consumption": 0,
"description": "description",
"descriptionDate": "descriptionDate",
"disableIpDetection": true,
"maxConsumption": 0,
"qualityGateAutoDetect": true,
"settings": {
"homepage": {
"foo": "bar"
}
}
}
}