Create a new project

/projects

This call creates a new project.

https://cgc-api.sbgenomics.com/v2/projects

Request

Example request

POST /v2/projects HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
content-type: application/json
curl --data '{"name": "My New Project", "description": "A project for testing my apps", "billing_group": "ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7", "tags": ["tcga"]}' -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X POST "https://cgc-api.sbgenomics.com/v2/projects"

Header Fields

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

Query parameters

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

Request body

In the body, you should enter a list of key-value pairs. The keys, and the values they take, are described in the following table.

KeyDatatype of valueDescription of value
name
required
stringThe name of the project you are creating.
billing_group
required
stringThe ID of the billing group for the project.

List all billing groups to find your billing group ID.
use_memoizationbooleanSet to false by default. Set to true to enable memoization.
intermediate_filesdictionarySpecifies intermediate files retention 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.
tagsstring, enclosed in '[ ]Optionally, enter the tag "tcga" if you want to make a Controlled Data project.
If you omit the tags key, the project will be an Open Data project.
settingsobjectThis dictionary contains various project settings - see rows below for further information.
lockedBooleanThis field can be true or false.

Set this field to true to lock down a project. Locking down a project prevents any CGC team member from viewing any information about the task.
controlledBooleanSet to true to indicate a Controlled Data project. Learn more about Controlled Data projects.
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.

Example request body

{
    "name": "My New Project", 
  "description": "A project for testing my apps", 
  "billing_group": "ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7", 
  "tags": ["tcga"],
  "settings":{
    "locked": true,
     "use_interruptible_instances": false,
     "use_memoization": true,
     "allow_network_access": true,
     "intermediate_files": {
      "retention":"LIMITED",
      "duration":24
     },
    "controlled": true
  }
}

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/my-new-project",
  "id": "RFranklin/my-new-project",
  "name": "My New Project",
  "type": "v2",
  "description": "A project for testing my apps",
  "tags": ["tcga"],
  "settings":{
    "locked": true,
    "use_interruptible_instances": false,
    "controlled":true,
    "use_memoization": true,
    "allow_network_access": true,
    "intermediate_files": {
      "retention":"LIMITED",
      "duration":24
     }
  },
  "billing_group": "ec1dc1e3-12a3-4b56-789c-e3f2dca0c6f7"
}

Interpreting the response body

  • The field locked is set to true, which means you've created a locked project. Locking down a project prevents any CGC team member from viewing any information about the task.
  • The field controlled is set to true, which indicates you've created a Controlled Data project.
Language