Update a file group
curl --request PUT \
--url https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "<string>",
"_rev": "<string>",
"name": "<string>",
"project": "<string>",
"archived": "<string>",
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}"
payload = {
"_id": "<string>",
"_rev": "<string>",
"name": "<string>",
"project": "<string>",
"archived": "<string>",
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
_rev: '<string>',
name: '<string>',
project: '<string>',
archived: '<string>',
dates: {creationDate: '2023-11-07T05:31:56Z', lastModifiedDate: '2023-11-07T05:31:56Z'}
})
};
fetch('https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{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://web.edcontrols.com/api/v2/data/fileGroup/{database}/{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([
'_id' => '<string>',
'_rev' => '<string>',
'name' => '<string>',
'project' => '<string>',
'archived' => '<string>',
'dates' => [
'creationDate' => '2023-11-07T05:31:56Z',
'lastModifiedDate' => '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://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"archived\": \"<string>\",\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"archived\": \"<string>\",\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"archived\": \"<string>\",\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"_rev": "<string>",
"name": "<string>",
"project": "<string>",
"archived": "<string>",
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}File Groups
Update a file group
Send the fields you change; {"name": "…"} is enough to rename. The
name is required, is trimmed, and is at most 50 characters; a missing
or blank name is a 400. Whatever you leave out is kept from the
stored group, including its author, creation date and archived state.
A deleted group answers 404. The answer is the group with its new
_rev.
A new name also renames the map group with the old name, and every
map in it, so the drawings show under the new group name. One call is
enough: you do not need PUT /mapGroup/{database}/updateName as well.
A file group without a map group of that name is renamed on its own.
Allowed for contract administrators and the Accountable.
PUT
/
api
/
v2
/
data
/
fileGroup
/
{database}
/
{id}
Update a file group
curl --request PUT \
--url https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "<string>",
"_rev": "<string>",
"name": "<string>",
"project": "<string>",
"archived": "<string>",
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}
}
'import requests
url = "https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}"
payload = {
"_id": "<string>",
"_rev": "<string>",
"name": "<string>",
"project": "<string>",
"archived": "<string>",
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
_rev: '<string>',
name: '<string>',
project: '<string>',
archived: '<string>',
dates: {creationDate: '2023-11-07T05:31:56Z', lastModifiedDate: '2023-11-07T05:31:56Z'}
})
};
fetch('https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{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://web.edcontrols.com/api/v2/data/fileGroup/{database}/{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([
'_id' => '<string>',
'_rev' => '<string>',
'name' => '<string>',
'project' => '<string>',
'archived' => '<string>',
'dates' => [
'creationDate' => '2023-11-07T05:31:56Z',
'lastModifiedDate' => '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://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"archived\": \"<string>\",\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"archived\": \"<string>\",\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web.edcontrols.com/api/v2/data/fileGroup/{database}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"_rev\": \"<string>\",\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"archived\": \"<string>\",\n \"dates\": {\n \"creationDate\": \"2023-11-07T05:31:56Z\",\n \"lastModifiedDate\": \"2023-11-07T05:31:56Z\"\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"_rev": "<string>",
"name": "<string>",
"project": "<string>",
"archived": "<string>",
"dates": {
"creationDate": "2023-11-07T05:31:56Z",
"lastModifiedDate": "2023-11-07T05:31:56Z"
}
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}{
"type": "about:blank",
"title": "Unprocessable Entity",
"status": 422,
"detail": "content.title is required"
}Authorizations
Path Parameters
Body
application/json
