curl --request PUT \
--url https://api-staging.pixwel.com/api/users/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"preferences": {
"blacklist": {
"projects": [
"507f1f77bcf86cd799439011"
]
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"mail": {
"enabled": true,
"projects": 123,
"assets": 123,
"files": 123,
"work_requests": 123,
"shares": 123,
"ingest": 123,
"offline_comments": 123,
"others": 123,
"work_request_comments": 123,
"workflow": 123,
"work_request_graphics_materials": 123,
"work_request_graphics_materials_comments": 123
},
"contactLists": "<unknown>",
"reports": {
"exceptions": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"groupSpending": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"$links": {
"self": "//example.com/path/to/object"
}
},
"created": 123,
"$links": {
"self": "//example.com/path/to/object",
"territory": "//example.com/path/to/object"
},
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"addresses": "<unknown>",
"studios": [
"507f1f77bcf86cd799439011"
],
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
],
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"downloads": [
"507f1f77bcf86cd799439011"
],
"queue": "<unknown>"
}
'import requests
url = "https://api-staging.pixwel.com/api/users/{id}"
payload = {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": True,
"approved": True,
"registered": True,
"confirmed": True
},
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"preferences": {
"blacklist": { "projects": ["507f1f77bcf86cd799439011"] },
"ingest": {
"skipScratchPreview": True,
"maxUploads": 123
},
"mail": {
"enabled": True,
"projects": 123,
"assets": 123,
"files": 123,
"work_requests": 123,
"shares": 123,
"ingest": 123,
"offline_comments": 123,
"others": 123,
"work_request_comments": 123,
"workflow": 123,
"work_request_graphics_materials": 123,
"work_request_graphics_materials_comments": 123
},
"contactLists": "<unknown>",
"reports": {
"exceptions": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] },
"groupSpending": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] },
"workRequests": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] }
}
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"$links": { "self": "//example.com/path/to/object" }
},
"created": 123,
"$links": {
"self": "//example.com/path/to/object",
"territory": "//example.com/path/to/object"
},
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"addresses": "<unknown>",
"studios": ["507f1f77bcf86cd799439011"],
"type": "<string>",
"users": ["507f1f77bcf86cd799439011"],
"$links": { "self": "//example.com/path/to/object" }
}
],
"downloads": ["507f1f77bcf86cd799439011"],
"queue": "<unknown>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '507f1f77bcf86cd799439011',
status: {invited: true, approved: true, registered: true, confirmed: true},
name: '<string>',
username: 'user@example.com',
emailNormal: 'user@example.com',
invite: 'https://example.com/path/to/object',
preferences: {
blacklist: {projects: ['507f1f77bcf86cd799439011']},
ingest: {skipScratchPreview: true, maxUploads: 123},
mail: {
enabled: true,
projects: 123,
assets: 123,
files: 123,
work_requests: 123,
shares: 123,
ingest: 123,
offline_comments: 123,
others: 123,
work_request_comments: 123,
workflow: 123,
work_request_graphics_materials: 123,
work_request_graphics_materials_comments: 123
},
contactLists: '<unknown>',
reports: {
exceptions: {presets: [{name: '<string>', columns: ['<string>'], active: true}]},
groupSpending: {presets: [{name: '<string>', columns: ['<string>'], active: true}]},
workRequests: {presets: [{name: '<string>', columns: ['<string>'], active: true}]}
}
},
territory: {
_id: '507f1f77bcf86cd799439011',
name: '<string>',
$links: {self: '//example.com/path/to/object'}
},
created: 123,
$links: {
self: '//example.com/path/to/object',
territory: '//example.com/path/to/object'
},
groups: [
{
_id: '507f1f77bcf86cd799439011',
name: '<string>',
addresses: '<unknown>',
studios: ['507f1f77bcf86cd799439011'],
type: '<string>',
users: ['507f1f77bcf86cd799439011'],
$links: {self: '//example.com/path/to/object'}
}
],
downloads: ['507f1f77bcf86cd799439011'],
queue: '<unknown>'
})
};
fetch('https://api-staging.pixwel.com/api/users/{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-staging.pixwel.com/api/users/{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' => '507f1f77bcf86cd799439011',
'status' => [
'invited' => true,
'approved' => true,
'registered' => true,
'confirmed' => true
],
'name' => '<string>',
'username' => 'user@example.com',
'emailNormal' => 'user@example.com',
'invite' => 'https://example.com/path/to/object',
'preferences' => [
'blacklist' => [
'projects' => [
'507f1f77bcf86cd799439011'
]
],
'ingest' => [
'skipScratchPreview' => true,
'maxUploads' => 123
],
'mail' => [
'enabled' => true,
'projects' => 123,
'assets' => 123,
'files' => 123,
'work_requests' => 123,
'shares' => 123,
'ingest' => 123,
'offline_comments' => 123,
'others' => 123,
'work_request_comments' => 123,
'workflow' => 123,
'work_request_graphics_materials' => 123,
'work_request_graphics_materials_comments' => 123
],
'contactLists' => '<unknown>',
'reports' => [
'exceptions' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
],
'groupSpending' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
],
'workRequests' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
]
]
],
'territory' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'$links' => [
'self' => '//example.com/path/to/object'
]
],
'created' => 123,
'$links' => [
'self' => '//example.com/path/to/object',
'territory' => '//example.com/path/to/object'
],
'groups' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'addresses' => '<unknown>',
'studios' => [
'507f1f77bcf86cd799439011'
],
'type' => '<string>',
'users' => [
'507f1f77bcf86cd799439011'
],
'$links' => [
'self' => '//example.com/path/to/object'
]
]
],
'downloads' => [
'507f1f77bcf86cd799439011'
],
'queue' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api-staging.pixwel.com/api/users/{id}"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"mail\": {\n \"enabled\": true,\n \"projects\": 123,\n \"assets\": 123,\n \"files\": 123,\n \"work_requests\": 123,\n \"shares\": 123,\n \"ingest\": 123,\n \"offline_comments\": 123,\n \"others\": 123,\n \"work_request_comments\": 123,\n \"workflow\": 123,\n \"work_request_graphics_materials\": 123,\n \"work_request_graphics_materials_comments\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"exceptions\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"groupSpending\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"territory\": \"//example.com/path/to/object\"\n },\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"addresses\": \"<unknown>\",\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"downloads\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"queue\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-staging.pixwel.com/api/users/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"mail\": {\n \"enabled\": true,\n \"projects\": 123,\n \"assets\": 123,\n \"files\": 123,\n \"work_requests\": 123,\n \"shares\": 123,\n \"ingest\": 123,\n \"offline_comments\": 123,\n \"others\": 123,\n \"work_request_comments\": 123,\n \"workflow\": 123,\n \"work_request_graphics_materials\": 123,\n \"work_request_graphics_materials_comments\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"exceptions\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"groupSpending\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"territory\": \"//example.com/path/to/object\"\n },\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"addresses\": \"<unknown>\",\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"downloads\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"queue\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"mail\": {\n \"enabled\": true,\n \"projects\": 123,\n \"assets\": 123,\n \"files\": 123,\n \"work_requests\": 123,\n \"shares\": 123,\n \"ingest\": 123,\n \"offline_comments\": 123,\n \"others\": 123,\n \"work_request_comments\": 123,\n \"workflow\": 123,\n \"work_request_graphics_materials\": 123,\n \"work_request_graphics_materials_comments\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"exceptions\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"groupSpending\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"territory\": \"//example.com/path/to/object\"\n },\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"addresses\": \"<unknown>\",\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"downloads\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"queue\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"preferences": {
"blacklist": {
"projects": [
"507f1f77bcf86cd799439011"
]
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"mail": {
"enabled": true,
"projects": 123,
"assets": 123,
"files": 123,
"work_requests": 123,
"shares": 123,
"ingest": 123,
"offline_comments": 123,
"others": 123,
"work_request_comments": 123,
"workflow": 123,
"work_request_graphics_materials": 123,
"work_request_graphics_materials_comments": 123
},
"contactLists": "<unknown>",
"reports": {
"exceptions": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"groupSpending": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"$links": {
"self": "//example.com/path/to/object"
}
},
"created": 123,
"$links": {
"self": "//example.com/path/to/object",
"territory": "//example.com/path/to/object"
},
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"addresses": "<unknown>",
"studios": [
"507f1f77bcf86cd799439011"
],
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
],
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"downloads": [
"507f1f77bcf86cd799439011"
],
"queue": "<unknown>"
}Update a user
curl --request PUT \
--url https://api-staging.pixwel.com/api/users/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"preferences": {
"blacklist": {
"projects": [
"507f1f77bcf86cd799439011"
]
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"mail": {
"enabled": true,
"projects": 123,
"assets": 123,
"files": 123,
"work_requests": 123,
"shares": 123,
"ingest": 123,
"offline_comments": 123,
"others": 123,
"work_request_comments": 123,
"workflow": 123,
"work_request_graphics_materials": 123,
"work_request_graphics_materials_comments": 123
},
"contactLists": "<unknown>",
"reports": {
"exceptions": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"groupSpending": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"$links": {
"self": "//example.com/path/to/object"
}
},
"created": 123,
"$links": {
"self": "//example.com/path/to/object",
"territory": "//example.com/path/to/object"
},
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"addresses": "<unknown>",
"studios": [
"507f1f77bcf86cd799439011"
],
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
],
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"downloads": [
"507f1f77bcf86cd799439011"
],
"queue": "<unknown>"
}
'import requests
url = "https://api-staging.pixwel.com/api/users/{id}"
payload = {
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": True,
"approved": True,
"registered": True,
"confirmed": True
},
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"preferences": {
"blacklist": { "projects": ["507f1f77bcf86cd799439011"] },
"ingest": {
"skipScratchPreview": True,
"maxUploads": 123
},
"mail": {
"enabled": True,
"projects": 123,
"assets": 123,
"files": 123,
"work_requests": 123,
"shares": 123,
"ingest": 123,
"offline_comments": 123,
"others": 123,
"work_request_comments": 123,
"workflow": 123,
"work_request_graphics_materials": 123,
"work_request_graphics_materials_comments": 123
},
"contactLists": "<unknown>",
"reports": {
"exceptions": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] },
"groupSpending": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] },
"workRequests": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] }
}
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"$links": { "self": "//example.com/path/to/object" }
},
"created": 123,
"$links": {
"self": "//example.com/path/to/object",
"territory": "//example.com/path/to/object"
},
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"addresses": "<unknown>",
"studios": ["507f1f77bcf86cd799439011"],
"type": "<string>",
"users": ["507f1f77bcf86cd799439011"],
"$links": { "self": "//example.com/path/to/object" }
}
],
"downloads": ["507f1f77bcf86cd799439011"],
"queue": "<unknown>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '507f1f77bcf86cd799439011',
status: {invited: true, approved: true, registered: true, confirmed: true},
name: '<string>',
username: 'user@example.com',
emailNormal: 'user@example.com',
invite: 'https://example.com/path/to/object',
preferences: {
blacklist: {projects: ['507f1f77bcf86cd799439011']},
ingest: {skipScratchPreview: true, maxUploads: 123},
mail: {
enabled: true,
projects: 123,
assets: 123,
files: 123,
work_requests: 123,
shares: 123,
ingest: 123,
offline_comments: 123,
others: 123,
work_request_comments: 123,
workflow: 123,
work_request_graphics_materials: 123,
work_request_graphics_materials_comments: 123
},
contactLists: '<unknown>',
reports: {
exceptions: {presets: [{name: '<string>', columns: ['<string>'], active: true}]},
groupSpending: {presets: [{name: '<string>', columns: ['<string>'], active: true}]},
workRequests: {presets: [{name: '<string>', columns: ['<string>'], active: true}]}
}
},
territory: {
_id: '507f1f77bcf86cd799439011',
name: '<string>',
$links: {self: '//example.com/path/to/object'}
},
created: 123,
$links: {
self: '//example.com/path/to/object',
territory: '//example.com/path/to/object'
},
groups: [
{
_id: '507f1f77bcf86cd799439011',
name: '<string>',
addresses: '<unknown>',
studios: ['507f1f77bcf86cd799439011'],
type: '<string>',
users: ['507f1f77bcf86cd799439011'],
$links: {self: '//example.com/path/to/object'}
}
],
downloads: ['507f1f77bcf86cd799439011'],
queue: '<unknown>'
})
};
fetch('https://api-staging.pixwel.com/api/users/{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-staging.pixwel.com/api/users/{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' => '507f1f77bcf86cd799439011',
'status' => [
'invited' => true,
'approved' => true,
'registered' => true,
'confirmed' => true
],
'name' => '<string>',
'username' => 'user@example.com',
'emailNormal' => 'user@example.com',
'invite' => 'https://example.com/path/to/object',
'preferences' => [
'blacklist' => [
'projects' => [
'507f1f77bcf86cd799439011'
]
],
'ingest' => [
'skipScratchPreview' => true,
'maxUploads' => 123
],
'mail' => [
'enabled' => true,
'projects' => 123,
'assets' => 123,
'files' => 123,
'work_requests' => 123,
'shares' => 123,
'ingest' => 123,
'offline_comments' => 123,
'others' => 123,
'work_request_comments' => 123,
'workflow' => 123,
'work_request_graphics_materials' => 123,
'work_request_graphics_materials_comments' => 123
],
'contactLists' => '<unknown>',
'reports' => [
'exceptions' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
],
'groupSpending' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
],
'workRequests' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
]
]
],
'territory' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'$links' => [
'self' => '//example.com/path/to/object'
]
],
'created' => 123,
'$links' => [
'self' => '//example.com/path/to/object',
'territory' => '//example.com/path/to/object'
],
'groups' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'addresses' => '<unknown>',
'studios' => [
'507f1f77bcf86cd799439011'
],
'type' => '<string>',
'users' => [
'507f1f77bcf86cd799439011'
],
'$links' => [
'self' => '//example.com/path/to/object'
]
]
],
'downloads' => [
'507f1f77bcf86cd799439011'
],
'queue' => '<unknown>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://api-staging.pixwel.com/api/users/{id}"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"mail\": {\n \"enabled\": true,\n \"projects\": 123,\n \"assets\": 123,\n \"files\": 123,\n \"work_requests\": 123,\n \"shares\": 123,\n \"ingest\": 123,\n \"offline_comments\": 123,\n \"others\": 123,\n \"work_request_comments\": 123,\n \"workflow\": 123,\n \"work_request_graphics_materials\": 123,\n \"work_request_graphics_materials_comments\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"exceptions\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"groupSpending\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"territory\": \"//example.com/path/to/object\"\n },\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"addresses\": \"<unknown>\",\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"downloads\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"queue\": \"<unknown>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-staging.pixwel.com/api/users/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"mail\": {\n \"enabled\": true,\n \"projects\": 123,\n \"assets\": 123,\n \"files\": 123,\n \"work_requests\": 123,\n \"shares\": 123,\n \"ingest\": 123,\n \"offline_comments\": 123,\n \"others\": 123,\n \"work_request_comments\": 123,\n \"workflow\": 123,\n \"work_request_graphics_materials\": 123,\n \"work_request_graphics_materials_comments\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"exceptions\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"groupSpending\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"territory\": \"//example.com/path/to/object\"\n },\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"addresses\": \"<unknown>\",\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"downloads\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"queue\": \"<unknown>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/users/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"name\": \"<string>\",\n \"username\": \"user@example.com\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"mail\": {\n \"enabled\": true,\n \"projects\": 123,\n \"assets\": 123,\n \"files\": 123,\n \"work_requests\": 123,\n \"shares\": 123,\n \"ingest\": 123,\n \"offline_comments\": 123,\n \"others\": 123,\n \"work_request_comments\": 123,\n \"workflow\": 123,\n \"work_request_graphics_materials\": 123,\n \"work_request_graphics_materials_comments\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"exceptions\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"groupSpending\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n },\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"created\": 123,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"territory\": \"//example.com/path/to/object\"\n },\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"addresses\": \"<unknown>\",\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"downloads\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"queue\": \"<unknown>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"name": "<string>",
"username": "user@example.com",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"preferences": {
"blacklist": {
"projects": [
"507f1f77bcf86cd799439011"
]
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"mail": {
"enabled": true,
"projects": 123,
"assets": 123,
"files": 123,
"work_requests": 123,
"shares": 123,
"ingest": 123,
"offline_comments": 123,
"others": 123,
"work_request_comments": 123,
"workflow": 123,
"work_request_graphics_materials": 123,
"work_request_graphics_materials_comments": 123
},
"contactLists": "<unknown>",
"reports": {
"exceptions": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"groupSpending": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
},
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"$links": {
"self": "//example.com/path/to/object"
}
},
"created": 123,
"$links": {
"self": "//example.com/path/to/object",
"territory": "//example.com/path/to/object"
},
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"addresses": "<unknown>",
"studios": [
"507f1f77bcf86cd799439011"
],
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
],
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"downloads": [
"507f1f77bcf86cd799439011"
],
"queue": "<unknown>"
}Authorizations
Email address and password. A personal access token (pat_…) or session token (token-…) may also be sent in the password field, with any non-empty value as the username — a blank username short-circuits to a 401 before the token is read.
Path Parameters
Body
"507f1f77bcf86cd799439011"
Show child attributes
Show child attributes
"user@example.com"
"user@example.com"
"https://example.com/path/to/object"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Response
OK
"507f1f77bcf86cd799439011"
Show child attributes
Show child attributes
"user@example.com"
"user@example.com"
"https://example.com/path/to/object"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries