Edit a project

projects/{project_owner}/{project}

For general information on the API, including formatting, parameters, and pagination, please see the API Overview.

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

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

šŸš§

PATCH

If your client does not support PATCH requests, you can use POST to send this request, along with the query parameter _method=PATCH:

i.e. https://cavatica-api.sbgenomics.com/v2/projects/{project_owner}/{project}?_method=PATCH

šŸ‘

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: cavatica-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://cavatica-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. Note that although you may change the name of the project, this does not affect its short name, which is immutable.

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 find 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 one field, locked.
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 instances.
allow_network_accessBooleanAllows you to control network access for executions within the project.

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,
        "allow_network_access": true,
        "intermediate_files": {
            "retention":"LIMITED",
            "duration":24
        }
    }
}

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CAVATICA 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 CAVATICA-specific response codes that may be contained in the body of the response.

Example response body

{
  "href": "https://cavatica-api.sbgenomics.com/v2/projects/RFranklin/my-new-project",
  "id": "RFranklin/my-new-project",
  "name": "My New Project",
  "type": "v2",
  "tags": [],
  "description": "A project for testing my apps",
  "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