Atualizar registro de tempo
curl --request PATCH \
--url https://app.synkrony.ai/api/v1/time_logs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"time_log": {
"user_id": 123,
"task_id": 123,
"project_id": 123,
"name": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://app.synkrony.ai/api/v1/time_logs/{id}"
payload = { "time_log": {
"user_id": 123,
"task_id": 123,
"project_id": 123,
"name": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
} }
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({
time_log: {
user_id: 123,
task_id: 123,
project_id: 123,
name: '<string>',
start_time: '2023-11-07T05:31:56Z',
end_time: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://app.synkrony.ai/api/v1/time_logs/{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/time_logs/{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([
'time_log' => [
'user_id' => 123,
'task_id' => 123,
'project_id' => 123,
'name' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'end_time' => '2023-11-07T05:31:56Z'
]
]),
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/time_logs/{id}"
payload := strings.NewReader("{\n \"time_log\": {\n \"user_id\": 123,\n \"task_id\": 123,\n \"project_id\": 123,\n \"name\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"end_time\": \"2023-11-07T05:31:56Z\"\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/time_logs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"time_log\": {\n \"user_id\": 123,\n \"task_id\": 123,\n \"project_id\": 123,\n \"name\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"end_time\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.synkrony.ai/api/v1/time_logs/{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 \"time_log\": {\n \"user_id\": 123,\n \"task_id\": 123,\n \"project_id\": 123,\n \"name\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"end_time\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"owner_id": 123,
"owner_type": "<string>",
"id": "<string>",
"task": "<string>",
"date": "<string>",
"type": "<string>",
"start_time": "<string>",
"assignee": {
"id": "<string>",
"name": "<string>",
"colorId": 123,
"profilePictureUrl": "<string>"
},
"tags": [
{
"id": 123,
"label": "<string>",
"color": "<string>",
"bgColor": "<string>"
}
],
"project_id": 123,
"duration": "<string>",
"end_time": "<string>",
"sprint_id": 123
}
}TimeLogs
Atualizar registro de tempo
PATCH
/
api
/
v1
/
time_logs
/
{id}
Atualizar registro de tempo
curl --request PATCH \
--url https://app.synkrony.ai/api/v1/time_logs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"time_log": {
"user_id": 123,
"task_id": 123,
"project_id": 123,
"name": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://app.synkrony.ai/api/v1/time_logs/{id}"
payload = { "time_log": {
"user_id": 123,
"task_id": 123,
"project_id": 123,
"name": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
} }
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({
time_log: {
user_id: 123,
task_id: 123,
project_id: 123,
name: '<string>',
start_time: '2023-11-07T05:31:56Z',
end_time: '2023-11-07T05:31:56Z'
}
})
};
fetch('https://app.synkrony.ai/api/v1/time_logs/{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/time_logs/{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([
'time_log' => [
'user_id' => 123,
'task_id' => 123,
'project_id' => 123,
'name' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'end_time' => '2023-11-07T05:31:56Z'
]
]),
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/time_logs/{id}"
payload := strings.NewReader("{\n \"time_log\": {\n \"user_id\": 123,\n \"task_id\": 123,\n \"project_id\": 123,\n \"name\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"end_time\": \"2023-11-07T05:31:56Z\"\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/time_logs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"time_log\": {\n \"user_id\": 123,\n \"task_id\": 123,\n \"project_id\": 123,\n \"name\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"end_time\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.synkrony.ai/api/v1/time_logs/{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 \"time_log\": {\n \"user_id\": 123,\n \"task_id\": 123,\n \"project_id\": 123,\n \"name\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"end_time\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"owner_id": 123,
"owner_type": "<string>",
"id": "<string>",
"task": "<string>",
"date": "<string>",
"type": "<string>",
"start_time": "<string>",
"assignee": {
"id": "<string>",
"name": "<string>",
"colorId": 123,
"profilePictureUrl": "<string>"
},
"tags": [
{
"id": 123,
"label": "<string>",
"color": "<string>",
"bgColor": "<string>"
}
],
"project_id": 123,
"duration": "<string>",
"end_time": "<string>",
"sprint_id": 123
}
}⌘I