Atualizar tarefa
curl --request PATCH \
--url https://app.synkrony.ai/api/v1/tasks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task": {
"name": "Implementar autenticação",
"project_id": 1,
"created_by_id": 1,
"description": "Implementar sistema de autenticação com JWT",
"status_id": 1,
"sprint_id": 1,
"project_module_id": 1,
"priority": "Alta",
"estimate": 8,
"assignee_ids": [
1,
2
]
}
}
'import requests
url = "https://app.synkrony.ai/api/v1/tasks/{id}"
payload = { "task": {
"name": "Implementar autenticação",
"project_id": 1,
"created_by_id": 1,
"description": "Implementar sistema de autenticação com JWT",
"status_id": 1,
"sprint_id": 1,
"project_module_id": 1,
"priority": "Alta",
"estimate": 8,
"assignee_ids": [1, 2]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
task: {
name: 'Implementar autenticação',
project_id: 1,
created_by_id: 1,
description: 'Implementar sistema de autenticação com JWT',
status_id: 1,
sprint_id: 1,
project_module_id: 1,
priority: 'Alta',
estimate: 8,
assignee_ids: [1, 2]
}
})
};
fetch('https://app.synkrony.ai/api/v1/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.synkrony.ai/api/v1/tasks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'task' => [
'name' => 'Implementar autenticação',
'project_id' => 1,
'created_by_id' => 1,
'description' => 'Implementar sistema de autenticação com JWT',
'status_id' => 1,
'sprint_id' => 1,
'project_module_id' => 1,
'priority' => 'Alta',
'estimate' => 8,
'assignee_ids' => [
1,
2
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.synkrony.ai/api/v1/tasks/{id}"
payload := strings.NewReader("{\n \"task\": {\n \"name\": \"Implementar autenticação\",\n \"project_id\": 1,\n \"created_by_id\": 1,\n \"description\": \"Implementar sistema de autenticação com JWT\",\n \"status_id\": 1,\n \"sprint_id\": 1,\n \"project_module_id\": 1,\n \"priority\": \"Alta\",\n \"estimate\": 8,\n \"assignee_ids\": [\n 1,\n 2\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.patch("https://app.synkrony.ai/api/v1/tasks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task\": {\n \"name\": \"Implementar autenticação\",\n \"project_id\": 1,\n \"created_by_id\": 1,\n \"description\": \"Implementar sistema de autenticação com JWT\",\n \"status_id\": 1,\n \"sprint_id\": 1,\n \"project_module_id\": 1,\n \"priority\": \"Alta\",\n \"estimate\": 8,\n \"assignee_ids\": [\n 1,\n 2\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.synkrony.ai/api/v1/tasks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task\": {\n \"name\": \"Implementar autenticação\",\n \"project_id\": 1,\n \"created_by_id\": 1,\n \"description\": \"Implementar sistema de autenticação com JWT\",\n \"status_id\": 1,\n \"sprint_id\": 1,\n \"project_module_id\": 1,\n \"priority\": \"Alta\",\n \"estimate\": 8,\n \"assignee_ids\": [\n 1,\n 2\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"status_id": 123,
"position": 123,
"created_by_id": 123,
"total_time_seconds": 123,
"slug": "<string>",
"pull_request_is_draft": true,
"base_branch": "<string>",
"has_sentry_link": true,
"tags": [
{
"id": 123,
"color": "<string>",
"bgColor": "<string>",
"label": "<string>"
}
],
"assignees": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"role": "<string>",
"authentication_setup_completed": true,
"sprint_goal_participation": true,
"status": "<string>",
"short_name": "<string>",
"avatar_color_id": 123,
"job_title": "<string>",
"cost_cents": 123,
"capacity": 123,
"removed_at": "<string>",
"agent_type": "<string>",
"profile_picture_url": "<string>"
}
],
"checklist_items": [
{
"id": "<string>",
"description": "<string>",
"completed": true,
"position": 123
}
],
"custom_field_values": [
"<unknown>"
],
"project": {
"id": 123,
"name": "<string>",
"client_name": "<string>",
"color": "<string>",
"icon": "<string>",
"repository_url": "<string>"
},
"project_module": {
"id": 123,
"project_id": 123,
"custom_class": "<string>",
"name": "<string>",
"progress": 123,
"order": 123,
"description": "<string>",
"start": "<string>",
"end": "<string>",
"dependencies": [
"<string>"
]
},
"epic": {
"id": 123,
"project_id": 123,
"custom_class": "<string>",
"name": "<string>",
"progress": 123,
"order": 123,
"description": "<string>",
"start": "<string>",
"end": "<string>",
"dependencies": [
"<string>"
]
},
"priority": "<string>",
"sprint_id": 123,
"github_repo": "<string>",
"pull_request_number": 123,
"pull_request_url": "<string>",
"pull_request_status": "<string>",
"estimate": 123,
"user_time_seconds": 123,
"pull_request_created_at": "<string>",
"task_execution_status": "<string>",
"task_execution_error_info": {},
"task_execution_updated_at": "<string>",
"task_execution_id": 123,
"sentry_issues": [
{}
]
}
}Tasks
Atualizar tarefa
PATCH
/
api
/
v1
/
tasks
/
{id}
Atualizar tarefa
curl --request PATCH \
--url https://app.synkrony.ai/api/v1/tasks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"task": {
"name": "Implementar autenticação",
"project_id": 1,
"created_by_id": 1,
"description": "Implementar sistema de autenticação com JWT",
"status_id": 1,
"sprint_id": 1,
"project_module_id": 1,
"priority": "Alta",
"estimate": 8,
"assignee_ids": [
1,
2
]
}
}
'import requests
url = "https://app.synkrony.ai/api/v1/tasks/{id}"
payload = { "task": {
"name": "Implementar autenticação",
"project_id": 1,
"created_by_id": 1,
"description": "Implementar sistema de autenticação com JWT",
"status_id": 1,
"sprint_id": 1,
"project_module_id": 1,
"priority": "Alta",
"estimate": 8,
"assignee_ids": [1, 2]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
task: {
name: 'Implementar autenticação',
project_id: 1,
created_by_id: 1,
description: 'Implementar sistema de autenticação com JWT',
status_id: 1,
sprint_id: 1,
project_module_id: 1,
priority: 'Alta',
estimate: 8,
assignee_ids: [1, 2]
}
})
};
fetch('https://app.synkrony.ai/api/v1/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.synkrony.ai/api/v1/tasks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'task' => [
'name' => 'Implementar autenticação',
'project_id' => 1,
'created_by_id' => 1,
'description' => 'Implementar sistema de autenticação com JWT',
'status_id' => 1,
'sprint_id' => 1,
'project_module_id' => 1,
'priority' => 'Alta',
'estimate' => 8,
'assignee_ids' => [
1,
2
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.synkrony.ai/api/v1/tasks/{id}"
payload := strings.NewReader("{\n \"task\": {\n \"name\": \"Implementar autenticação\",\n \"project_id\": 1,\n \"created_by_id\": 1,\n \"description\": \"Implementar sistema de autenticação com JWT\",\n \"status_id\": 1,\n \"sprint_id\": 1,\n \"project_module_id\": 1,\n \"priority\": \"Alta\",\n \"estimate\": 8,\n \"assignee_ids\": [\n 1,\n 2\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.patch("https://app.synkrony.ai/api/v1/tasks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"task\": {\n \"name\": \"Implementar autenticação\",\n \"project_id\": 1,\n \"created_by_id\": 1,\n \"description\": \"Implementar sistema de autenticação com JWT\",\n \"status_id\": 1,\n \"sprint_id\": 1,\n \"project_module_id\": 1,\n \"priority\": \"Alta\",\n \"estimate\": 8,\n \"assignee_ids\": [\n 1,\n 2\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.synkrony.ai/api/v1/tasks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"task\": {\n \"name\": \"Implementar autenticação\",\n \"project_id\": 1,\n \"created_by_id\": 1,\n \"description\": \"Implementar sistema de autenticação com JWT\",\n \"status_id\": 1,\n \"sprint_id\": 1,\n \"project_module_id\": 1,\n \"priority\": \"Alta\",\n \"estimate\": 8,\n \"assignee_ids\": [\n 1,\n 2\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"status_id": 123,
"position": 123,
"created_by_id": 123,
"total_time_seconds": 123,
"slug": "<string>",
"pull_request_is_draft": true,
"base_branch": "<string>",
"has_sentry_link": true,
"tags": [
{
"id": 123,
"color": "<string>",
"bgColor": "<string>",
"label": "<string>"
}
],
"assignees": [
{
"id": 123,
"name": "<string>",
"email": "<string>",
"role": "<string>",
"authentication_setup_completed": true,
"sprint_goal_participation": true,
"status": "<string>",
"short_name": "<string>",
"avatar_color_id": 123,
"job_title": "<string>",
"cost_cents": 123,
"capacity": 123,
"removed_at": "<string>",
"agent_type": "<string>",
"profile_picture_url": "<string>"
}
],
"checklist_items": [
{
"id": "<string>",
"description": "<string>",
"completed": true,
"position": 123
}
],
"custom_field_values": [
"<unknown>"
],
"project": {
"id": 123,
"name": "<string>",
"client_name": "<string>",
"color": "<string>",
"icon": "<string>",
"repository_url": "<string>"
},
"project_module": {
"id": 123,
"project_id": 123,
"custom_class": "<string>",
"name": "<string>",
"progress": 123,
"order": 123,
"description": "<string>",
"start": "<string>",
"end": "<string>",
"dependencies": [
"<string>"
]
},
"epic": {
"id": 123,
"project_id": 123,
"custom_class": "<string>",
"name": "<string>",
"progress": 123,
"order": 123,
"description": "<string>",
"start": "<string>",
"end": "<string>",
"dependencies": [
"<string>"
]
},
"priority": "<string>",
"sprint_id": 123,
"github_repo": "<string>",
"pull_request_number": 123,
"pull_request_url": "<string>",
"pull_request_status": "<string>",
"estimate": 123,
"user_time_seconds": 123,
"pull_request_created_at": "<string>",
"task_execution_status": "<string>",
"task_execution_error_info": {},
"task_execution_updated_at": "<string>",
"task_execution_id": 123,
"sentry_issues": [
{}
]
}
}⌘I