Edit a project

projects/{project_owner}/{project}

This call edits the details of a project on the CGC. You can use it to change the name, description, or billing group of the project.

https://cgc-api.sbgenomics.com/v2/projects/{project_owner}/{project}

👍

Referring to your project

Note that project_owner is always case-sensitive, and that project is not the project's name but its ID, or short name. For full details of identifying objects using the API, please see the API overview.

##Request

Example request

PATCH /v2/projects/RFranklin/sandbox HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl  --data '{"name": "New name for my project", "description": "Updated with the results of the latest experiments"}' -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X PATCH "https://cgc-api.sbgenomics.com/v2/projects/RFranklin/sandbox"

Request body

The request body should contain a set of key-value pairs. The keys, and the values they take, are described in the following table. Enter a key-value pair if you want to re-set the existing value for the project.

📘

Changing a project's name

Note that once the project has been created, you cannot change its short name. However, you can edit a project's given name at any time using the call on this page.

KeyDatatype of valueDescription of value
namestringThe name of the project you are editing.
billing_groupstringThe ID of the billing group for the project.

List all billing groups to locate your billing group ID.
use_memoizationbooleanSet to false by default. Set to true to enable memoization.
intermediate_filesdictionarySpecifies intermediate filesretention period.

To do this, specify a dictionary with the following format:
{ "retention": "LIMITED", "duration": 24 }
The minimum value is 1 h. The maximum value is 120 h and the default value is 24 h.
descriptionstringA description of the project.
settingsdictionaryThis dictionary contains various project settings - see rows below for details.
lockedBooleanThis field can be true or false.

Set this field to true to lock down a project. Locking down a project prevents any Seven Bridges team member from viewing any information about the task.
use_interruptible_instancesBooleanThis field can be true or false to enable or disable the use of spot/preemptible instances.
use_elastic_diskBooleanSet to true to enable Elastic disk.
allow_network_accessBooleanAllows you to control network access for executions within the project.

👍

Controlled Data project versus Open Data project

Note that you can change a project's name, billing group, and description, but you can't change whether or not it is a Controlled Data project after the project has been created.

Example request body

{
    "name": "New name for my project",
    "description": "Updated with the results of the latest experiments",
  	"settings": {
        "locked":true,
        "use_interruptible_instances":false,
        "use_memoization": true,
        "intermediate_files": {
            "retention":"LIMITED",
            "duration":24
        }
    }
}

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CGC authentication token.

Path parameters

NameDescription
projectThe short name of the project you are editing.
project_ownerThe owner of the project you are editing.

Query parameters

NameData typeDescription
fieldsstringSelector specifying a subset of fields to include in the response.

Response

See a list of CGC-specific response codes that may be contained in the body of the response.

Example response body

{
  "href": "https://cgc-api.sbgenomics.com/v2/projects/RFranklin/sandbox",
  "id": "RFranklin/sandbox",
  "name": "New name for my project",
  "type": "v2",
  "description": "Updated with the results of the latest experiments",
  "tags": [],
  "settings": {
        "locked":true,
        "use_interruptible_instances": false,
        "use_memoization": true,
        "allow_network_access": true,
        "intermediate_files": {
          "retention":"LIMITED",
          "duration":24
        }
      },
  "billing_group": "ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7"
}
Language