Update Assignment
curl --request PUT \
--url https://api.everhour.com/resource-planner/assignments/{assignment_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"user": 79786,
"project": "as:981141080110246",
"task": "<string>",
"client": 123,
"type": "project",
"startDate": "2019-01-21",
"endDate": "2019-02-01",
"time": 252000,
"note": "<string>",
"includeWeekends": true,
"color": "<string>",
"sendNotification": true,
"forceOverride": true,
"timeOffType": "<string>"
}
'import requests
url = "https://api.everhour.com/resource-planner/assignments/{assignment_id}"
payload = {
"user": 79786,
"project": "as:981141080110246",
"task": "<string>",
"client": 123,
"type": "project",
"startDate": "2019-01-21",
"endDate": "2019-02-01",
"time": 252000,
"note": "<string>",
"includeWeekends": True,
"color": "<string>",
"sendNotification": True,
"forceOverride": True,
"timeOffType": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: 79786,
project: 'as:981141080110246',
task: '<string>',
client: 123,
type: 'project',
startDate: '2019-01-21',
endDate: '2019-02-01',
time: 252000,
note: '<string>',
includeWeekends: true,
color: '<string>',
sendNotification: true,
forceOverride: true,
timeOffType: '<string>'
})
};
fetch('https://api.everhour.com/resource-planner/assignments/{assignment_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://api.everhour.com/resource-planner/assignments/{assignment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'user' => 79786,
'project' => 'as:981141080110246',
'task' => '<string>',
'client' => 123,
'type' => 'project',
'startDate' => '2019-01-21',
'endDate' => '2019-02-01',
'time' => 252000,
'note' => '<string>',
'includeWeekends' => true,
'color' => '<string>',
'sendNotification' => true,
'forceOverride' => true,
'timeOffType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://api.everhour.com/resource-planner/assignments/{assignment_id}"
payload := strings.NewReader("{\n \"user\": 79786,\n \"project\": \"as:981141080110246\",\n \"task\": \"<string>\",\n \"client\": 123,\n \"type\": \"project\",\n \"startDate\": \"2019-01-21\",\n \"endDate\": \"2019-02-01\",\n \"time\": 252000,\n \"note\": \"<string>\",\n \"includeWeekends\": true,\n \"color\": \"<string>\",\n \"sendNotification\": true,\n \"forceOverride\": true,\n \"timeOffType\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.put("https://api.everhour.com/resource-planner/assignments/{assignment_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": 79786,\n \"project\": \"as:981141080110246\",\n \"task\": \"<string>\",\n \"client\": 123,\n \"type\": \"project\",\n \"startDate\": \"2019-01-21\",\n \"endDate\": \"2019-02-01\",\n \"time\": 252000,\n \"note\": \"<string>\",\n \"includeWeekends\": true,\n \"color\": \"<string>\",\n \"sendNotification\": true,\n \"forceOverride\": true,\n \"timeOffType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/resource-planner/assignments/{assignment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": 79786,\n \"project\": \"as:981141080110246\",\n \"task\": \"<string>\",\n \"client\": 123,\n \"type\": \"project\",\n \"startDate\": \"2019-01-21\",\n \"endDate\": \"2019-02-01\",\n \"time\": 252000,\n \"note\": \"<string>\",\n \"includeWeekends\": true,\n \"color\": \"<string>\",\n \"sendNotification\": true,\n \"forceOverride\": true,\n \"timeOffType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"days": 10,
"endDate": "2019-02-01",
"id": 41827,
"project": "as:981141080110246",
"startDate": "2019-01-21",
"time": 252000,
"type": "project",
"user": 79786
}Schedule
Update Assignment
Update an existing schedule assignment.
PUT
/
resource-planner
/
assignments
/
{assignment_id}
Update Assignment
curl --request PUT \
--url https://api.everhour.com/resource-planner/assignments/{assignment_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"user": 79786,
"project": "as:981141080110246",
"task": "<string>",
"client": 123,
"type": "project",
"startDate": "2019-01-21",
"endDate": "2019-02-01",
"time": 252000,
"note": "<string>",
"includeWeekends": true,
"color": "<string>",
"sendNotification": true,
"forceOverride": true,
"timeOffType": "<string>"
}
'import requests
url = "https://api.everhour.com/resource-planner/assignments/{assignment_id}"
payload = {
"user": 79786,
"project": "as:981141080110246",
"task": "<string>",
"client": 123,
"type": "project",
"startDate": "2019-01-21",
"endDate": "2019-02-01",
"time": 252000,
"note": "<string>",
"includeWeekends": True,
"color": "<string>",
"sendNotification": True,
"forceOverride": True,
"timeOffType": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: 79786,
project: 'as:981141080110246',
task: '<string>',
client: 123,
type: 'project',
startDate: '2019-01-21',
endDate: '2019-02-01',
time: 252000,
note: '<string>',
includeWeekends: true,
color: '<string>',
sendNotification: true,
forceOverride: true,
timeOffType: '<string>'
})
};
fetch('https://api.everhour.com/resource-planner/assignments/{assignment_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://api.everhour.com/resource-planner/assignments/{assignment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'user' => 79786,
'project' => 'as:981141080110246',
'task' => '<string>',
'client' => 123,
'type' => 'project',
'startDate' => '2019-01-21',
'endDate' => '2019-02-01',
'time' => 252000,
'note' => '<string>',
'includeWeekends' => true,
'color' => '<string>',
'sendNotification' => true,
'forceOverride' => true,
'timeOffType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://api.everhour.com/resource-planner/assignments/{assignment_id}"
payload := strings.NewReader("{\n \"user\": 79786,\n \"project\": \"as:981141080110246\",\n \"task\": \"<string>\",\n \"client\": 123,\n \"type\": \"project\",\n \"startDate\": \"2019-01-21\",\n \"endDate\": \"2019-02-01\",\n \"time\": 252000,\n \"note\": \"<string>\",\n \"includeWeekends\": true,\n \"color\": \"<string>\",\n \"sendNotification\": true,\n \"forceOverride\": true,\n \"timeOffType\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.put("https://api.everhour.com/resource-planner/assignments/{assignment_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": 79786,\n \"project\": \"as:981141080110246\",\n \"task\": \"<string>\",\n \"client\": 123,\n \"type\": \"project\",\n \"startDate\": \"2019-01-21\",\n \"endDate\": \"2019-02-01\",\n \"time\": 252000,\n \"note\": \"<string>\",\n \"includeWeekends\": true,\n \"color\": \"<string>\",\n \"sendNotification\": true,\n \"forceOverride\": true,\n \"timeOffType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/resource-planner/assignments/{assignment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": 79786,\n \"project\": \"as:981141080110246\",\n \"task\": \"<string>\",\n \"client\": 123,\n \"type\": \"project\",\n \"startDate\": \"2019-01-21\",\n \"endDate\": \"2019-02-01\",\n \"time\": 252000,\n \"note\": \"<string>\",\n \"includeWeekends\": true,\n \"color\": \"<string>\",\n \"sendNotification\": true,\n \"forceOverride\": true,\n \"timeOffType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"days": 10,
"endDate": "2019-02-01",
"id": 41827,
"project": "as:981141080110246",
"startDate": "2019-01-21",
"time": 252000,
"type": "project",
"user": 79786
}Authorizations
Path Parameters
Assignment ID
Example:
8495
Body
application/json
Example:
79786
Project encoded ID
Example:
"as:981141080110246"
Task encoded ID
Client ID
Available options:
project, client, task, time-off Example:
"project"
Format: Y-m-d
Example:
"2019-01-21"
Format: Y-m-d
Example:
"2019-02-01"
Scheduled time in seconds
Example:
252000
Max 1000 chars
Hex color #rrggbb
Example:
true
Time-off type (only when type is time-off).
Time-off period (only when type is time-off).
Available options:
full-day, half-of-day, quarter-of-day, half-and-quarter-of-day Time-off approval status (only when type is time-off).
Available options:
pending, approved Response
OK
Number of workdays
Example:
10
Example:
"2019-02-01"
Example:
41827
Example:
"as:981141080110246"
Example:
"2019-01-21"
Scheduled time in seconds
Example:
252000
Available options:
project, time-off Example:
"project"
Example:
79786
⌘I
