curl --request POST \
--url https://api-staging.pixwel.com/api/session \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"name": "<string>",
"password": "<string>",
"preferences": {
"blacklist": {
"projects": "<unknown>"
},
"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
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"contactLists": "<unknown>",
"reports": {
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"queue": "<unknown>",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"code": "<string>",
"standard": "<string>",
"countries": [
{
"name": "<string>",
"code": "<string>"
}
],
"languages": [
{
"name": "<string>",
"code": "<string>",
"dcpCode": "<string>"
}
],
"assignedLanguages": [
"507f1f77bcf86cd799439011"
]
},
"username": "user@example.com",
"orderQueue": "<unknown>",
"shareQueue": [
"507f1f77bcf86cd799439011"
],
"id": "507f1f77bcf86cd799439011",
"flags": "<unknown>",
"twofactorVerified": true,
"permissions": "<unknown>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"addresses": [
{
"name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
],
"name": "<string>",
"studios": "<unknown>",
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
]
}
],
"roles": [
"<string>"
],
"studios": "<unknown>",
"$links": {
"self": "//example.com/path/to/object"
},
"hasEnforced2fa": true
}
'import requests
url = "https://api-staging.pixwel.com/api/session"
payload = {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"name": "<string>",
"password": "<string>",
"preferences": {
"blacklist": { "projects": "<unknown>" },
"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
},
"ingest": {
"skipScratchPreview": True,
"maxUploads": 123
},
"contactLists": "<unknown>",
"reports": { "workRequests": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] } }
},
"queue": "<unknown>",
"status": {
"invited": True,
"approved": True,
"registered": True,
"confirmed": True
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"code": "<string>",
"standard": "<string>",
"countries": [
{
"name": "<string>",
"code": "<string>"
}
],
"languages": [
{
"name": "<string>",
"code": "<string>",
"dcpCode": "<string>"
}
],
"assignedLanguages": ["507f1f77bcf86cd799439011"]
},
"username": "user@example.com",
"orderQueue": "<unknown>",
"shareQueue": ["507f1f77bcf86cd799439011"],
"id": "507f1f77bcf86cd799439011",
"flags": "<unknown>",
"twofactorVerified": True,
"permissions": "<unknown>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"addresses": [
{
"name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
],
"name": "<string>",
"studios": "<unknown>",
"type": "<string>",
"users": ["507f1f77bcf86cd799439011"]
}
],
"roles": ["<string>"],
"studios": "<unknown>",
"$links": { "self": "//example.com/path/to/object" },
"hasEnforced2fa": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '507f1f77bcf86cd799439011',
emailNormal: 'user@example.com',
invite: 'https://example.com/path/to/object',
name: '<string>',
password: '<string>',
preferences: {
blacklist: {projects: '<unknown>'},
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
},
ingest: {skipScratchPreview: true, maxUploads: 123},
contactLists: '<unknown>',
reports: {
workRequests: {presets: [{name: '<string>', columns: ['<string>'], active: true}]}
}
},
queue: '<unknown>',
status: {invited: true, approved: true, registered: true, confirmed: true},
territory: {
_id: '507f1f77bcf86cd799439011',
name: '<string>',
code: '<string>',
standard: '<string>',
countries: [{name: '<string>', code: '<string>'}],
languages: [{name: '<string>', code: '<string>', dcpCode: '<string>'}],
assignedLanguages: ['507f1f77bcf86cd799439011']
},
username: 'user@example.com',
orderQueue: '<unknown>',
shareQueue: ['507f1f77bcf86cd799439011'],
id: '507f1f77bcf86cd799439011',
flags: '<unknown>',
twofactorVerified: true,
permissions: '<unknown>',
groups: [
{
_id: '507f1f77bcf86cd799439011',
addresses: [
{
name: '<string>',
address: '<string>',
city: '<string>',
state: '<string>',
postalCode: '<string>',
country: '<string>'
}
],
name: '<string>',
studios: '<unknown>',
type: '<string>',
users: ['507f1f77bcf86cd799439011']
}
],
roles: ['<string>'],
studios: '<unknown>',
$links: {self: '//example.com/path/to/object'},
hasEnforced2fa: true
})
};
fetch('https://api-staging.pixwel.com/api/session', 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/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '507f1f77bcf86cd799439011',
'emailNormal' => 'user@example.com',
'invite' => 'https://example.com/path/to/object',
'name' => '<string>',
'password' => '<string>',
'preferences' => [
'blacklist' => [
'projects' => '<unknown>'
],
'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
],
'ingest' => [
'skipScratchPreview' => true,
'maxUploads' => 123
],
'contactLists' => '<unknown>',
'reports' => [
'workRequests' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
]
]
],
'queue' => '<unknown>',
'status' => [
'invited' => true,
'approved' => true,
'registered' => true,
'confirmed' => true
],
'territory' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'code' => '<string>',
'standard' => '<string>',
'countries' => [
[
'name' => '<string>',
'code' => '<string>'
]
],
'languages' => [
[
'name' => '<string>',
'code' => '<string>',
'dcpCode' => '<string>'
]
],
'assignedLanguages' => [
'507f1f77bcf86cd799439011'
]
],
'username' => 'user@example.com',
'orderQueue' => '<unknown>',
'shareQueue' => [
'507f1f77bcf86cd799439011'
],
'id' => '507f1f77bcf86cd799439011',
'flags' => '<unknown>',
'twofactorVerified' => true,
'permissions' => '<unknown>',
'groups' => [
[
'_id' => '507f1f77bcf86cd799439011',
'addresses' => [
[
'name' => '<string>',
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'postalCode' => '<string>',
'country' => '<string>'
]
],
'name' => '<string>',
'studios' => '<unknown>',
'type' => '<string>',
'users' => [
'507f1f77bcf86cd799439011'
]
]
],
'roles' => [
'<string>'
],
'studios' => '<unknown>',
'$links' => [
'self' => '//example.com/path/to/object'
],
'hasEnforced2fa' => true
]),
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/session"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": \"<unknown>\"\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 \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"queue\": \"<unknown>\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"standard\": \"<string>\",\n \"countries\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"languages\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"dcpCode\": \"<string>\"\n }\n ],\n \"assignedLanguages\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"username\": \"user@example.com\",\n \"orderQueue\": \"<unknown>\",\n \"shareQueue\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"id\": \"507f1f77bcf86cd799439011\",\n \"flags\": \"<unknown>\",\n \"twofactorVerified\": true,\n \"permissions\": \"<unknown>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"addresses\": [\n {\n \"name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"studios\": \"<unknown>\",\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ]\n }\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"studios\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n },\n \"hasEnforced2fa\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-staging.pixwel.com/api/session")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": \"<unknown>\"\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 \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"queue\": \"<unknown>\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"standard\": \"<string>\",\n \"countries\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"languages\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"dcpCode\": \"<string>\"\n }\n ],\n \"assignedLanguages\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"username\": \"user@example.com\",\n \"orderQueue\": \"<unknown>\",\n \"shareQueue\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"id\": \"507f1f77bcf86cd799439011\",\n \"flags\": \"<unknown>\",\n \"twofactorVerified\": true,\n \"permissions\": \"<unknown>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"addresses\": [\n {\n \"name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"studios\": \"<unknown>\",\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ]\n }\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"studios\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n },\n \"hasEnforced2fa\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": \"<unknown>\"\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 \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"queue\": \"<unknown>\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"standard\": \"<string>\",\n \"countries\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"languages\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"dcpCode\": \"<string>\"\n }\n ],\n \"assignedLanguages\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"username\": \"user@example.com\",\n \"orderQueue\": \"<unknown>\",\n \"shareQueue\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"id\": \"507f1f77bcf86cd799439011\",\n \"flags\": \"<unknown>\",\n \"twofactorVerified\": true,\n \"permissions\": \"<unknown>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"addresses\": [\n {\n \"name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"studios\": \"<unknown>\",\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ]\n }\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"studios\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n },\n \"hasEnforced2fa\": true\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"name": "<string>",
"password": "<string>",
"preferences": {
"blacklist": {
"projects": "<unknown>"
},
"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
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"contactLists": "<unknown>",
"reports": {
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"queue": "<unknown>",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"code": "<string>",
"standard": "<string>",
"countries": [
{
"name": "<string>",
"code": "<string>"
}
],
"languages": [
{
"name": "<string>",
"code": "<string>",
"dcpCode": "<string>"
}
],
"assignedLanguages": [
"507f1f77bcf86cd799439011"
]
},
"username": "user@example.com",
"orderQueue": "<unknown>",
"shareQueue": [
"507f1f77bcf86cd799439011"
],
"id": "507f1f77bcf86cd799439011",
"flags": "<unknown>",
"twofactorVerified": true,
"permissions": "<unknown>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"addresses": [
{
"name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
],
"name": "<string>",
"studios": "<unknown>",
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
]
}
],
"roles": [
"<string>"
],
"studios": "<unknown>",
"$links": {
"self": "//example.com/path/to/object"
},
"hasEnforced2fa": true
}Create a session
curl --request POST \
--url https://api-staging.pixwel.com/api/session \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"name": "<string>",
"password": "<string>",
"preferences": {
"blacklist": {
"projects": "<unknown>"
},
"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
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"contactLists": "<unknown>",
"reports": {
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"queue": "<unknown>",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"code": "<string>",
"standard": "<string>",
"countries": [
{
"name": "<string>",
"code": "<string>"
}
],
"languages": [
{
"name": "<string>",
"code": "<string>",
"dcpCode": "<string>"
}
],
"assignedLanguages": [
"507f1f77bcf86cd799439011"
]
},
"username": "user@example.com",
"orderQueue": "<unknown>",
"shareQueue": [
"507f1f77bcf86cd799439011"
],
"id": "507f1f77bcf86cd799439011",
"flags": "<unknown>",
"twofactorVerified": true,
"permissions": "<unknown>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"addresses": [
{
"name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
],
"name": "<string>",
"studios": "<unknown>",
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
]
}
],
"roles": [
"<string>"
],
"studios": "<unknown>",
"$links": {
"self": "//example.com/path/to/object"
},
"hasEnforced2fa": true
}
'import requests
url = "https://api-staging.pixwel.com/api/session"
payload = {
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"name": "<string>",
"password": "<string>",
"preferences": {
"blacklist": { "projects": "<unknown>" },
"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
},
"ingest": {
"skipScratchPreview": True,
"maxUploads": 123
},
"contactLists": "<unknown>",
"reports": { "workRequests": { "presets": [
{
"name": "<string>",
"columns": ["<string>"],
"active": True
}
] } }
},
"queue": "<unknown>",
"status": {
"invited": True,
"approved": True,
"registered": True,
"confirmed": True
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"code": "<string>",
"standard": "<string>",
"countries": [
{
"name": "<string>",
"code": "<string>"
}
],
"languages": [
{
"name": "<string>",
"code": "<string>",
"dcpCode": "<string>"
}
],
"assignedLanguages": ["507f1f77bcf86cd799439011"]
},
"username": "user@example.com",
"orderQueue": "<unknown>",
"shareQueue": ["507f1f77bcf86cd799439011"],
"id": "507f1f77bcf86cd799439011",
"flags": "<unknown>",
"twofactorVerified": True,
"permissions": "<unknown>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"addresses": [
{
"name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
],
"name": "<string>",
"studios": "<unknown>",
"type": "<string>",
"users": ["507f1f77bcf86cd799439011"]
}
],
"roles": ["<string>"],
"studios": "<unknown>",
"$links": { "self": "//example.com/path/to/object" },
"hasEnforced2fa": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '507f1f77bcf86cd799439011',
emailNormal: 'user@example.com',
invite: 'https://example.com/path/to/object',
name: '<string>',
password: '<string>',
preferences: {
blacklist: {projects: '<unknown>'},
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
},
ingest: {skipScratchPreview: true, maxUploads: 123},
contactLists: '<unknown>',
reports: {
workRequests: {presets: [{name: '<string>', columns: ['<string>'], active: true}]}
}
},
queue: '<unknown>',
status: {invited: true, approved: true, registered: true, confirmed: true},
territory: {
_id: '507f1f77bcf86cd799439011',
name: '<string>',
code: '<string>',
standard: '<string>',
countries: [{name: '<string>', code: '<string>'}],
languages: [{name: '<string>', code: '<string>', dcpCode: '<string>'}],
assignedLanguages: ['507f1f77bcf86cd799439011']
},
username: 'user@example.com',
orderQueue: '<unknown>',
shareQueue: ['507f1f77bcf86cd799439011'],
id: '507f1f77bcf86cd799439011',
flags: '<unknown>',
twofactorVerified: true,
permissions: '<unknown>',
groups: [
{
_id: '507f1f77bcf86cd799439011',
addresses: [
{
name: '<string>',
address: '<string>',
city: '<string>',
state: '<string>',
postalCode: '<string>',
country: '<string>'
}
],
name: '<string>',
studios: '<unknown>',
type: '<string>',
users: ['507f1f77bcf86cd799439011']
}
],
roles: ['<string>'],
studios: '<unknown>',
$links: {self: '//example.com/path/to/object'},
hasEnforced2fa: true
})
};
fetch('https://api-staging.pixwel.com/api/session', 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/session",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '507f1f77bcf86cd799439011',
'emailNormal' => 'user@example.com',
'invite' => 'https://example.com/path/to/object',
'name' => '<string>',
'password' => '<string>',
'preferences' => [
'blacklist' => [
'projects' => '<unknown>'
],
'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
],
'ingest' => [
'skipScratchPreview' => true,
'maxUploads' => 123
],
'contactLists' => '<unknown>',
'reports' => [
'workRequests' => [
'presets' => [
[
'name' => '<string>',
'columns' => [
'<string>'
],
'active' => true
]
]
]
]
],
'queue' => '<unknown>',
'status' => [
'invited' => true,
'approved' => true,
'registered' => true,
'confirmed' => true
],
'territory' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'code' => '<string>',
'standard' => '<string>',
'countries' => [
[
'name' => '<string>',
'code' => '<string>'
]
],
'languages' => [
[
'name' => '<string>',
'code' => '<string>',
'dcpCode' => '<string>'
]
],
'assignedLanguages' => [
'507f1f77bcf86cd799439011'
]
],
'username' => 'user@example.com',
'orderQueue' => '<unknown>',
'shareQueue' => [
'507f1f77bcf86cd799439011'
],
'id' => '507f1f77bcf86cd799439011',
'flags' => '<unknown>',
'twofactorVerified' => true,
'permissions' => '<unknown>',
'groups' => [
[
'_id' => '507f1f77bcf86cd799439011',
'addresses' => [
[
'name' => '<string>',
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'postalCode' => '<string>',
'country' => '<string>'
]
],
'name' => '<string>',
'studios' => '<unknown>',
'type' => '<string>',
'users' => [
'507f1f77bcf86cd799439011'
]
]
],
'roles' => [
'<string>'
],
'studios' => '<unknown>',
'$links' => [
'self' => '//example.com/path/to/object'
],
'hasEnforced2fa' => true
]),
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/session"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": \"<unknown>\"\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 \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"queue\": \"<unknown>\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"standard\": \"<string>\",\n \"countries\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"languages\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"dcpCode\": \"<string>\"\n }\n ],\n \"assignedLanguages\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"username\": \"user@example.com\",\n \"orderQueue\": \"<unknown>\",\n \"shareQueue\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"id\": \"507f1f77bcf86cd799439011\",\n \"flags\": \"<unknown>\",\n \"twofactorVerified\": true,\n \"permissions\": \"<unknown>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"addresses\": [\n {\n \"name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"studios\": \"<unknown>\",\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ]\n }\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"studios\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n },\n \"hasEnforced2fa\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-staging.pixwel.com/api/session")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": \"<unknown>\"\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 \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"queue\": \"<unknown>\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"standard\": \"<string>\",\n \"countries\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"languages\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"dcpCode\": \"<string>\"\n }\n ],\n \"assignedLanguages\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"username\": \"user@example.com\",\n \"orderQueue\": \"<unknown>\",\n \"shareQueue\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"id\": \"507f1f77bcf86cd799439011\",\n \"flags\": \"<unknown>\",\n \"twofactorVerified\": true,\n \"permissions\": \"<unknown>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"addresses\": [\n {\n \"name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"studios\": \"<unknown>\",\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ]\n }\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"studios\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n },\n \"hasEnforced2fa\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"emailNormal\": \"user@example.com\",\n \"invite\": \"https://example.com/path/to/object\",\n \"name\": \"<string>\",\n \"password\": \"<string>\",\n \"preferences\": {\n \"blacklist\": {\n \"projects\": \"<unknown>\"\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 \"ingest\": {\n \"skipScratchPreview\": true,\n \"maxUploads\": 123\n },\n \"contactLists\": \"<unknown>\",\n \"reports\": {\n \"workRequests\": {\n \"presets\": [\n {\n \"name\": \"<string>\",\n \"columns\": [\n \"<string>\"\n ],\n \"active\": true\n }\n ]\n }\n }\n },\n \"queue\": \"<unknown>\",\n \"status\": {\n \"invited\": true,\n \"approved\": true,\n \"registered\": true,\n \"confirmed\": true\n },\n \"territory\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"standard\": \"<string>\",\n \"countries\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\"\n }\n ],\n \"languages\": [\n {\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"dcpCode\": \"<string>\"\n }\n ],\n \"assignedLanguages\": [\n \"507f1f77bcf86cd799439011\"\n ]\n },\n \"username\": \"user@example.com\",\n \"orderQueue\": \"<unknown>\",\n \"shareQueue\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"id\": \"507f1f77bcf86cd799439011\",\n \"flags\": \"<unknown>\",\n \"twofactorVerified\": true,\n \"permissions\": \"<unknown>\",\n \"groups\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"addresses\": [\n {\n \"name\": \"<string>\",\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"country\": \"<string>\"\n }\n ],\n \"name\": \"<string>\",\n \"studios\": \"<unknown>\",\n \"type\": \"<string>\",\n \"users\": [\n \"507f1f77bcf86cd799439011\"\n ]\n }\n ],\n \"roles\": [\n \"<string>\"\n ],\n \"studios\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n },\n \"hasEnforced2fa\": true\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"emailNormal": "user@example.com",
"invite": "https://example.com/path/to/object",
"name": "<string>",
"password": "<string>",
"preferences": {
"blacklist": {
"projects": "<unknown>"
},
"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
},
"ingest": {
"skipScratchPreview": true,
"maxUploads": 123
},
"contactLists": "<unknown>",
"reports": {
"workRequests": {
"presets": [
{
"name": "<string>",
"columns": [
"<string>"
],
"active": true
}
]
}
}
},
"queue": "<unknown>",
"status": {
"invited": true,
"approved": true,
"registered": true,
"confirmed": true
},
"territory": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"code": "<string>",
"standard": "<string>",
"countries": [
{
"name": "<string>",
"code": "<string>"
}
],
"languages": [
{
"name": "<string>",
"code": "<string>",
"dcpCode": "<string>"
}
],
"assignedLanguages": [
"507f1f77bcf86cd799439011"
]
},
"username": "user@example.com",
"orderQueue": "<unknown>",
"shareQueue": [
"507f1f77bcf86cd799439011"
],
"id": "507f1f77bcf86cd799439011",
"flags": "<unknown>",
"twofactorVerified": true,
"permissions": "<unknown>",
"groups": [
{
"_id": "507f1f77bcf86cd799439011",
"addresses": [
{
"name": "<string>",
"address": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>"
}
],
"name": "<string>",
"studios": "<unknown>",
"type": "<string>",
"users": [
"507f1f77bcf86cd799439011"
]
}
],
"roles": [
"<string>"
],
"studios": "<unknown>",
"$links": {
"self": "//example.com/path/to/object"
},
"hasEnforced2fa": true
}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.
Body
"507f1f77bcf86cd799439011"
"user@example.com"
"https://example.com/path/to/object"
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"user@example.com"
Shape not inferred — the sampled response had no entries
"507f1f77bcf86cd799439011"
Shape not inferred — the sampled response had no entries
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Response
OK
"507f1f77bcf86cd799439011"
"user@example.com"
"https://example.com/path/to/object"
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Show child attributes
Show child attributes
"user@example.com"
Shape not inferred — the sampled response had no entries
"507f1f77bcf86cd799439011"
Shape not inferred — the sampled response had no entries
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes