PUT
/
cloud
/
v1
/
projects
/
{project_id}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
project = client.cloud.projects.replace(
    project_id=0,
    name="New Project",
)
print(project.id)
{
  "client_id": 1,
  "created_at": "2019-12-31T23:59:59",
  "deleted_at": "2020-12-31T23:59:59",
  "description": "Project description",
  "id": 1,
  "is_default": true,
  "name": "default",
  "state": "ACTIVE",
  "task_id": "7244e161-664c-4afd-a34e-7003eac4d949"
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Body

application/json
name
string
required

Name of the entity, following a specific format.

Examples:

"New Project"

description
string | null

Description of the project.

Maximum length: 255
Examples:

"Project description"

Response

200 - application/json

Changed project

client_id
integer
required

ID associated with the client.

Examples:

1

created_at
string<date-time>
required

Datetime of creation, which is automatically generated.

Examples:

"2019-12-31T23:59:59"

id
integer
required

Project ID, which is automatically generated upon creation.

Examples:

1

is_default
boolean
required

Indicates if the project is the default one. Each client always has one default project.

Examples:

true

name
string
required

Unique project name for a client.

Examples:

"default"

state
string
required

The state of the project.

Examples:

"ACTIVE"

deleted_at
string<date-time> | null

Datetime of deletion, which is automatically generated if the project is deleted.

Examples:

"2020-12-31T23:59:59"

description
string | null

Description of the project.

Maximum length: 255
Examples:

"Project description"

task_id
string | null

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

Examples:

"7244e161-664c-4afd-a34e-7003eac4d949"