Projects
Update project
Name, color, description and whether rules add new assets.
PATCH
/
api
/
projects
/
{id}
Update project
curl --request PATCH \
--url https://{baseUrl}/api/v1/api/projects/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Web Servers",
"hexColor": "#78716C",
"description": "<string>",
"autoAddAssets": true
}
'import requests
url = "https://{baseUrl}/api/v1/api/projects/{id}"
payload = {
"name": "Web Servers",
"hexColor": "#78716C",
"description": "<string>",
"autoAddAssets": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Web Servers',
hexColor: '#78716C',
description: '<string>',
autoAddAssets: true
})
};
fetch('https://{baseUrl}/api/v1/api/projects/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/projects/{id}"
payload := strings.NewReader("{\n \"name\": \"Web Servers\",\n \"hexColor\": \"#78716C\",\n \"description\": \"<string>\",\n \"autoAddAssets\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"autoAddAssets": true,
"totalAssets": 123,
"hexColor": "#78716C",
"description": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"projectWorkflows": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"workflow": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"content": {
"jobs": {},
"name": "<string>",
"on": {
"target": [
"<string>"
],
"schedule": [
{
"cron": "0 2 * * 1"
}
],
"assetsAdded": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
}
}
},
"filePath": "<string>",
"isCanDelete": true,
"isCanEdit": true
},
"workflowId": "<string>",
"triggers": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectWorkflowId": "<string>",
"type": "cron",
"config": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
},
"enabled": true,
"cron": "<string>",
"lastFiredAt": "2023-11-07T05:31:56Z"
}
],
"lastRun": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"totalJobs": 123,
"status": "pending",
"workflowName": "<string>",
"jobHistoryName": "<string>",
"jobRunType": "manual"
}
}
],
"lastRunAt": "2023-11-07T05:31:56Z"
}Body
application/json
Response
200 - application/json
⌘I
Update project
curl --request PATCH \
--url https://{baseUrl}/api/v1/api/projects/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Web Servers",
"hexColor": "#78716C",
"description": "<string>",
"autoAddAssets": true
}
'import requests
url = "https://{baseUrl}/api/v1/api/projects/{id}"
payload = {
"name": "Web Servers",
"hexColor": "#78716C",
"description": "<string>",
"autoAddAssets": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Web Servers',
hexColor: '#78716C',
description: '<string>',
autoAddAssets: true
})
};
fetch('https://{baseUrl}/api/v1/api/projects/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/projects/{id}"
payload := strings.NewReader("{\n \"name\": \"Web Servers\",\n \"hexColor\": \"#78716C\",\n \"description\": \"<string>\",\n \"autoAddAssets\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"autoAddAssets": true,
"totalAssets": 123,
"hexColor": "#78716C",
"description": "<string>",
"archivedAt": "2023-11-07T05:31:56Z",
"projectWorkflows": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectId": "<string>",
"workflow": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"name": "<string>",
"content": {
"jobs": {},
"name": "<string>",
"on": {
"target": [
"<string>"
],
"schedule": [
{
"cron": "0 2 * * 1"
}
],
"assetsAdded": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
}
}
},
"filePath": "<string>",
"isCanDelete": true,
"isCanEdit": true
},
"workflowId": "<string>",
"triggers": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"projectWorkflowId": "<string>",
"type": "cron",
"config": {
"windowMinutes": 720,
"maxAssets": 2500.5,
"targetTypes": [
"<string>"
]
},
"enabled": true,
"cron": "<string>",
"lastFiredAt": "2023-11-07T05:31:56Z"
}
],
"lastRun": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"totalJobs": 123,
"status": "pending",
"workflowName": "<string>",
"jobHistoryName": "<string>",
"jobRunType": "manual"
}
}
],
"lastRunAt": "2023-11-07T05:31:56Z"
}