curl --request POST \
--url https://api-staging.pixwel.com/api/shares \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"from": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
},
"to": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"groups": "<unknown>",
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"length": 123,
"thumbnail": "507f1f77bcf86cd799439011",
"notes": "<string>",
"created": 123,
"mediaType": "<string>",
"creative": true,
"$links": {
"self": "//example.com/path/to/object",
"project": "//example.com/path/to/object",
"studio": "//example.com/path/to/object",
"type": "//example.com/path/to/object",
"thumbnail": "//example.com/path/to/object"
},
"$permissions": {
"canAutosub": true,
"sources": {
"requests": {
"languages": "<unknown>",
"countries": "<unknown>"
},
"autosubs": {
"languages": "<unknown>",
"countries": "<unknown>"
}
},
"access": [
"<string>"
],
"tags": {
"online": true,
"broadcast": true,
"dcp": true,
"cmyk": true,
"rgb": true
},
"ingest": [
"<string>"
]
},
"$feedback": {
"share": "<unknown>",
"vote": "<unknown>",
"summary": "<unknown>"
}
}
],
"assetsCount": 123,
"assetCategory": "<string>",
"projectNames": [
"<string>"
],
"studios": [
"507f1f77bcf86cd799439011"
],
"tags": [
[
"<string>"
]
],
"urls": {
"playlist": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object"
},
"approved": true,
"feedback": {
"enabled": true
},
"created": 123,
"questions": "<unknown>",
"$links": {
"self": "//example.com/path/to/object",
"from": "//example.com/path/to/object"
},
"permissions": [
{
"_id": "507f1f77bcf86cd799439011",
"sources": {
"download": {
"ov": true,
"countries": [
"<string>"
],
"languages": [
"<string>"
]
},
"manageWorkRequests": {
"groups": "<unknown>"
},
"previews": {
"ov": true,
"countries": "<unknown>",
"languages": [
"<string>"
]
},
"requests": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"social": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"adminWorkRequests": {
"groups": "<unknown>"
}
},
"approved": true,
"project": "507f1f77bcf86cd799439011",
"assets": [
"507f1f77bcf86cd799439011"
],
"tags": [
"<string>"
],
"types": "<unknown>",
"access": {
"sharing": true,
"push": true,
"download": true,
"requests": true,
"notes": true,
"previews": true,
"manageWorkRequsts": true,
"projectAdminView": true,
"projectAdminUpdate": true,
"projectAdminEmbargos": true,
"workRequestReport": true,
"downloadReport": true,
"exceptionReport": true,
"groupSpendingReport": true,
"adminWorkRequests": true,
"shareVotingView": true,
"manageWorkRequests": true,
"ingest": true
},
"user": "507f1f77bcf86cd799439011",
"share": "507f1f77bcf86cd799439011",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"notes": "<string>"
}
'import requests
url = "https://api-staging.pixwel.com/api/shares"
payload = {
"_id": "507f1f77bcf86cd799439011",
"from": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": { "self": "//example.com/path/to/object" }
},
"to": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": { "self": "//example.com/path/to/object" }
}
],
"groups": "<unknown>",
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"length": 123,
"thumbnail": "507f1f77bcf86cd799439011",
"notes": "<string>",
"created": 123,
"mediaType": "<string>",
"creative": True,
"$links": {
"self": "//example.com/path/to/object",
"project": "//example.com/path/to/object",
"studio": "//example.com/path/to/object",
"type": "//example.com/path/to/object",
"thumbnail": "//example.com/path/to/object"
},
"$permissions": {
"canAutosub": True,
"sources": {
"requests": {
"languages": "<unknown>",
"countries": "<unknown>"
},
"autosubs": {
"languages": "<unknown>",
"countries": "<unknown>"
}
},
"access": ["<string>"],
"tags": {
"online": True,
"broadcast": True,
"dcp": True,
"cmyk": True,
"rgb": True
},
"ingest": ["<string>"]
},
"$feedback": {
"share": "<unknown>",
"vote": "<unknown>",
"summary": "<unknown>"
}
}
],
"assetsCount": 123,
"assetCategory": "<string>",
"projectNames": ["<string>"],
"studios": ["507f1f77bcf86cd799439011"],
"tags": [["<string>"]],
"urls": {
"playlist": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object"
},
"approved": True,
"feedback": { "enabled": True },
"created": 123,
"questions": "<unknown>",
"$links": {
"self": "//example.com/path/to/object",
"from": "//example.com/path/to/object"
},
"permissions": [
{
"_id": "507f1f77bcf86cd799439011",
"sources": {
"download": {
"ov": True,
"countries": ["<string>"],
"languages": ["<string>"]
},
"manageWorkRequests": { "groups": "<unknown>" },
"previews": {
"ov": True,
"countries": "<unknown>",
"languages": ["<string>"]
},
"requests": {
"ov": True,
"countries": "<unknown>",
"languages": "<unknown>"
},
"social": {
"ov": True,
"countries": "<unknown>",
"languages": "<unknown>"
},
"adminWorkRequests": { "groups": "<unknown>" }
},
"approved": True,
"project": "507f1f77bcf86cd799439011",
"assets": ["507f1f77bcf86cd799439011"],
"tags": ["<string>"],
"types": "<unknown>",
"access": {
"sharing": True,
"push": True,
"download": True,
"requests": True,
"notes": True,
"previews": True,
"manageWorkRequsts": True,
"projectAdminView": True,
"projectAdminUpdate": True,
"projectAdminEmbargos": True,
"workRequestReport": True,
"downloadReport": True,
"exceptionReport": True,
"groupSpendingReport": True,
"adminWorkRequests": True,
"shareVotingView": True,
"manageWorkRequests": True,
"ingest": True
},
"user": "507f1f77bcf86cd799439011",
"share": "507f1f77bcf86cd799439011",
"$links": { "self": "//example.com/path/to/object" }
}
],
"notes": "<string>"
}
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',
from: {
_id: '507f1f77bcf86cd799439011',
name: '<string>',
emailNormal: 'user@example.com',
$links: {self: '//example.com/path/to/object'}
},
to: [
{
_id: '507f1f77bcf86cd799439011',
name: '<string>',
emailNormal: 'user@example.com',
$links: {self: '//example.com/path/to/object'}
}
],
groups: '<unknown>',
assets: [
{
_id: '507f1f77bcf86cd799439011',
project: '507f1f77bcf86cd799439011',
studio: '507f1f77bcf86cd799439011',
name: '<string>',
slug: '<string>',
type: '<string>',
length: 123,
thumbnail: '507f1f77bcf86cd799439011',
notes: '<string>',
created: 123,
mediaType: '<string>',
creative: true,
$links: {
self: '//example.com/path/to/object',
project: '//example.com/path/to/object',
studio: '//example.com/path/to/object',
type: '//example.com/path/to/object',
thumbnail: '//example.com/path/to/object'
},
$permissions: {
canAutosub: true,
sources: {
requests: {languages: '<unknown>', countries: '<unknown>'},
autosubs: {languages: '<unknown>', countries: '<unknown>'}
},
access: ['<string>'],
tags: {online: true, broadcast: true, dcp: true, cmyk: true, rgb: true},
ingest: ['<string>']
},
$feedback: {share: '<unknown>', vote: '<unknown>', summary: '<unknown>'}
}
],
assetsCount: 123,
assetCategory: '<string>',
projectNames: ['<string>'],
studios: ['507f1f77bcf86cd799439011'],
tags: [['<string>']],
urls: {
playlist: 'https://example.com/path/to/object',
invite: 'https://example.com/path/to/object'
},
approved: true,
feedback: {enabled: true},
created: 123,
questions: '<unknown>',
$links: {self: '//example.com/path/to/object', from: '//example.com/path/to/object'},
permissions: [
{
_id: '507f1f77bcf86cd799439011',
sources: {
download: {ov: true, countries: ['<string>'], languages: ['<string>']},
manageWorkRequests: {groups: '<unknown>'},
previews: {ov: true, countries: '<unknown>', languages: ['<string>']},
requests: {ov: true, countries: '<unknown>', languages: '<unknown>'},
social: {ov: true, countries: '<unknown>', languages: '<unknown>'},
adminWorkRequests: {groups: '<unknown>'}
},
approved: true,
project: '507f1f77bcf86cd799439011',
assets: ['507f1f77bcf86cd799439011'],
tags: ['<string>'],
types: '<unknown>',
access: {
sharing: true,
push: true,
download: true,
requests: true,
notes: true,
previews: true,
manageWorkRequsts: true,
projectAdminView: true,
projectAdminUpdate: true,
projectAdminEmbargos: true,
workRequestReport: true,
downloadReport: true,
exceptionReport: true,
groupSpendingReport: true,
adminWorkRequests: true,
shareVotingView: true,
manageWorkRequests: true,
ingest: true
},
user: '507f1f77bcf86cd799439011',
share: '507f1f77bcf86cd799439011',
$links: {self: '//example.com/path/to/object'}
}
],
notes: '<string>'
})
};
fetch('https://api-staging.pixwel.com/api/shares', 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/shares",
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',
'from' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'emailNormal' => 'user@example.com',
'$links' => [
'self' => '//example.com/path/to/object'
]
],
'to' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'emailNormal' => 'user@example.com',
'$links' => [
'self' => '//example.com/path/to/object'
]
]
],
'groups' => '<unknown>',
'assets' => [
[
'_id' => '507f1f77bcf86cd799439011',
'project' => '507f1f77bcf86cd799439011',
'studio' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'slug' => '<string>',
'type' => '<string>',
'length' => 123,
'thumbnail' => '507f1f77bcf86cd799439011',
'notes' => '<string>',
'created' => 123,
'mediaType' => '<string>',
'creative' => true,
'$links' => [
'self' => '//example.com/path/to/object',
'project' => '//example.com/path/to/object',
'studio' => '//example.com/path/to/object',
'type' => '//example.com/path/to/object',
'thumbnail' => '//example.com/path/to/object'
],
'$permissions' => [
'canAutosub' => true,
'sources' => [
'requests' => [
'languages' => '<unknown>',
'countries' => '<unknown>'
],
'autosubs' => [
'languages' => '<unknown>',
'countries' => '<unknown>'
]
],
'access' => [
'<string>'
],
'tags' => [
'online' => true,
'broadcast' => true,
'dcp' => true,
'cmyk' => true,
'rgb' => true
],
'ingest' => [
'<string>'
]
],
'$feedback' => [
'share' => '<unknown>',
'vote' => '<unknown>',
'summary' => '<unknown>'
]
]
],
'assetsCount' => 123,
'assetCategory' => '<string>',
'projectNames' => [
'<string>'
],
'studios' => [
'507f1f77bcf86cd799439011'
],
'tags' => [
[
'<string>'
]
],
'urls' => [
'playlist' => 'https://example.com/path/to/object',
'invite' => 'https://example.com/path/to/object'
],
'approved' => true,
'feedback' => [
'enabled' => true
],
'created' => 123,
'questions' => '<unknown>',
'$links' => [
'self' => '//example.com/path/to/object',
'from' => '//example.com/path/to/object'
],
'permissions' => [
[
'_id' => '507f1f77bcf86cd799439011',
'sources' => [
'download' => [
'ov' => true,
'countries' => [
'<string>'
],
'languages' => [
'<string>'
]
],
'manageWorkRequests' => [
'groups' => '<unknown>'
],
'previews' => [
'ov' => true,
'countries' => '<unknown>',
'languages' => [
'<string>'
]
],
'requests' => [
'ov' => true,
'countries' => '<unknown>',
'languages' => '<unknown>'
],
'social' => [
'ov' => true,
'countries' => '<unknown>',
'languages' => '<unknown>'
],
'adminWorkRequests' => [
'groups' => '<unknown>'
]
],
'approved' => true,
'project' => '507f1f77bcf86cd799439011',
'assets' => [
'507f1f77bcf86cd799439011'
],
'tags' => [
'<string>'
],
'types' => '<unknown>',
'access' => [
'sharing' => true,
'push' => true,
'download' => true,
'requests' => true,
'notes' => true,
'previews' => true,
'manageWorkRequsts' => true,
'projectAdminView' => true,
'projectAdminUpdate' => true,
'projectAdminEmbargos' => true,
'workRequestReport' => true,
'downloadReport' => true,
'exceptionReport' => true,
'groupSpendingReport' => true,
'adminWorkRequests' => true,
'shareVotingView' => true,
'manageWorkRequests' => true,
'ingest' => true
],
'user' => '507f1f77bcf86cd799439011',
'share' => '507f1f77bcf86cd799439011',
'$links' => [
'self' => '//example.com/path/to/object'
]
]
],
'notes' => '<string>'
]),
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/shares"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"to\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"groups\": \"<unknown>\",\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"type\": \"<string>\",\n \"length\": 123,\n \"thumbnail\": \"507f1f77bcf86cd799439011\",\n \"notes\": \"<string>\",\n \"created\": 123,\n \"mediaType\": \"<string>\",\n \"creative\": true,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"project\": \"//example.com/path/to/object\",\n \"studio\": \"//example.com/path/to/object\",\n \"type\": \"//example.com/path/to/object\",\n \"thumbnail\": \"//example.com/path/to/object\"\n },\n \"$permissions\": {\n \"canAutosub\": true,\n \"sources\": {\n \"requests\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n },\n \"autosubs\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n }\n },\n \"access\": [\n \"<string>\"\n ],\n \"tags\": {\n \"online\": true,\n \"broadcast\": true,\n \"dcp\": true,\n \"cmyk\": true,\n \"rgb\": true\n },\n \"ingest\": [\n \"<string>\"\n ]\n },\n \"$feedback\": {\n \"share\": \"<unknown>\",\n \"vote\": \"<unknown>\",\n \"summary\": \"<unknown>\"\n }\n }\n ],\n \"assetsCount\": 123,\n \"assetCategory\": \"<string>\",\n \"projectNames\": [\n \"<string>\"\n ],\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n [\n \"<string>\"\n ]\n ],\n \"urls\": {\n \"playlist\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\"\n },\n \"approved\": true,\n \"feedback\": {\n \"enabled\": true\n },\n \"created\": 123,\n \"questions\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"from\": \"//example.com/path/to/object\"\n },\n \"permissions\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"sources\": {\n \"download\": {\n \"ov\": true,\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [\n \"<string>\"\n ]\n },\n \"manageWorkRequests\": {\n \"groups\": \"<unknown>\"\n },\n \"previews\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": [\n \"<string>\"\n ]\n },\n \"requests\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"social\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"adminWorkRequests\": {\n \"groups\": \"<unknown>\"\n }\n },\n \"approved\": true,\n \"project\": \"507f1f77bcf86cd799439011\",\n \"assets\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"types\": \"<unknown>\",\n \"access\": {\n \"sharing\": true,\n \"push\": true,\n \"download\": true,\n \"requests\": true,\n \"notes\": true,\n \"previews\": true,\n \"manageWorkRequsts\": true,\n \"projectAdminView\": true,\n \"projectAdminUpdate\": true,\n \"projectAdminEmbargos\": true,\n \"workRequestReport\": true,\n \"downloadReport\": true,\n \"exceptionReport\": true,\n \"groupSpendingReport\": true,\n \"adminWorkRequests\": true,\n \"shareVotingView\": true,\n \"manageWorkRequests\": true,\n \"ingest\": true\n },\n \"user\": \"507f1f77bcf86cd799439011\",\n \"share\": \"507f1f77bcf86cd799439011\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"notes\": \"<string>\"\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/shares")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"to\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"groups\": \"<unknown>\",\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"type\": \"<string>\",\n \"length\": 123,\n \"thumbnail\": \"507f1f77bcf86cd799439011\",\n \"notes\": \"<string>\",\n \"created\": 123,\n \"mediaType\": \"<string>\",\n \"creative\": true,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"project\": \"//example.com/path/to/object\",\n \"studio\": \"//example.com/path/to/object\",\n \"type\": \"//example.com/path/to/object\",\n \"thumbnail\": \"//example.com/path/to/object\"\n },\n \"$permissions\": {\n \"canAutosub\": true,\n \"sources\": {\n \"requests\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n },\n \"autosubs\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n }\n },\n \"access\": [\n \"<string>\"\n ],\n \"tags\": {\n \"online\": true,\n \"broadcast\": true,\n \"dcp\": true,\n \"cmyk\": true,\n \"rgb\": true\n },\n \"ingest\": [\n \"<string>\"\n ]\n },\n \"$feedback\": {\n \"share\": \"<unknown>\",\n \"vote\": \"<unknown>\",\n \"summary\": \"<unknown>\"\n }\n }\n ],\n \"assetsCount\": 123,\n \"assetCategory\": \"<string>\",\n \"projectNames\": [\n \"<string>\"\n ],\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n [\n \"<string>\"\n ]\n ],\n \"urls\": {\n \"playlist\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\"\n },\n \"approved\": true,\n \"feedback\": {\n \"enabled\": true\n },\n \"created\": 123,\n \"questions\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"from\": \"//example.com/path/to/object\"\n },\n \"permissions\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"sources\": {\n \"download\": {\n \"ov\": true,\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [\n \"<string>\"\n ]\n },\n \"manageWorkRequests\": {\n \"groups\": \"<unknown>\"\n },\n \"previews\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": [\n \"<string>\"\n ]\n },\n \"requests\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"social\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"adminWorkRequests\": {\n \"groups\": \"<unknown>\"\n }\n },\n \"approved\": true,\n \"project\": \"507f1f77bcf86cd799439011\",\n \"assets\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"types\": \"<unknown>\",\n \"access\": {\n \"sharing\": true,\n \"push\": true,\n \"download\": true,\n \"requests\": true,\n \"notes\": true,\n \"previews\": true,\n \"manageWorkRequsts\": true,\n \"projectAdminView\": true,\n \"projectAdminUpdate\": true,\n \"projectAdminEmbargos\": true,\n \"workRequestReport\": true,\n \"downloadReport\": true,\n \"exceptionReport\": true,\n \"groupSpendingReport\": true,\n \"adminWorkRequests\": true,\n \"shareVotingView\": true,\n \"manageWorkRequests\": true,\n \"ingest\": true\n },\n \"user\": \"507f1f77bcf86cd799439011\",\n \"share\": \"507f1f77bcf86cd799439011\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/shares")
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 \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"to\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"groups\": \"<unknown>\",\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"type\": \"<string>\",\n \"length\": 123,\n \"thumbnail\": \"507f1f77bcf86cd799439011\",\n \"notes\": \"<string>\",\n \"created\": 123,\n \"mediaType\": \"<string>\",\n \"creative\": true,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"project\": \"//example.com/path/to/object\",\n \"studio\": \"//example.com/path/to/object\",\n \"type\": \"//example.com/path/to/object\",\n \"thumbnail\": \"//example.com/path/to/object\"\n },\n \"$permissions\": {\n \"canAutosub\": true,\n \"sources\": {\n \"requests\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n },\n \"autosubs\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n }\n },\n \"access\": [\n \"<string>\"\n ],\n \"tags\": {\n \"online\": true,\n \"broadcast\": true,\n \"dcp\": true,\n \"cmyk\": true,\n \"rgb\": true\n },\n \"ingest\": [\n \"<string>\"\n ]\n },\n \"$feedback\": {\n \"share\": \"<unknown>\",\n \"vote\": \"<unknown>\",\n \"summary\": \"<unknown>\"\n }\n }\n ],\n \"assetsCount\": 123,\n \"assetCategory\": \"<string>\",\n \"projectNames\": [\n \"<string>\"\n ],\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n [\n \"<string>\"\n ]\n ],\n \"urls\": {\n \"playlist\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\"\n },\n \"approved\": true,\n \"feedback\": {\n \"enabled\": true\n },\n \"created\": 123,\n \"questions\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"from\": \"//example.com/path/to/object\"\n },\n \"permissions\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"sources\": {\n \"download\": {\n \"ov\": true,\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [\n \"<string>\"\n ]\n },\n \"manageWorkRequests\": {\n \"groups\": \"<unknown>\"\n },\n \"previews\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": [\n \"<string>\"\n ]\n },\n \"requests\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"social\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"adminWorkRequests\": {\n \"groups\": \"<unknown>\"\n }\n },\n \"approved\": true,\n \"project\": \"507f1f77bcf86cd799439011\",\n \"assets\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"types\": \"<unknown>\",\n \"access\": {\n \"sharing\": true,\n \"push\": true,\n \"download\": true,\n \"requests\": true,\n \"notes\": true,\n \"previews\": true,\n \"manageWorkRequsts\": true,\n \"projectAdminView\": true,\n \"projectAdminUpdate\": true,\n \"projectAdminEmbargos\": true,\n \"workRequestReport\": true,\n \"downloadReport\": true,\n \"exceptionReport\": true,\n \"groupSpendingReport\": true,\n \"adminWorkRequests\": true,\n \"shareVotingView\": true,\n \"manageWorkRequests\": true,\n \"ingest\": true\n },\n \"user\": \"507f1f77bcf86cd799439011\",\n \"share\": \"507f1f77bcf86cd799439011\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"from": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
},
"to": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"groups": "<unknown>",
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"length": 123,
"thumbnail": "507f1f77bcf86cd799439011",
"notes": "<string>",
"created": 123,
"mediaType": "<string>",
"creative": true,
"$links": {
"self": "//example.com/path/to/object",
"project": "//example.com/path/to/object",
"studio": "//example.com/path/to/object",
"type": "//example.com/path/to/object",
"thumbnail": "//example.com/path/to/object"
},
"$permissions": {
"canAutosub": true,
"sources": {
"requests": {
"languages": "<unknown>",
"countries": "<unknown>"
},
"autosubs": {
"languages": "<unknown>",
"countries": "<unknown>"
}
},
"access": [
"<string>"
],
"tags": {
"online": true,
"broadcast": true,
"dcp": true,
"cmyk": true,
"rgb": true
},
"ingest": [
"<string>"
]
},
"$feedback": {
"share": "<unknown>",
"vote": "<unknown>",
"summary": "<unknown>"
}
}
],
"assetsCount": 123,
"assetCategory": "<string>",
"projectNames": [
"<string>"
],
"studios": [
"507f1f77bcf86cd799439011"
],
"tags": [
[
"<string>"
]
],
"urls": {
"playlist": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object"
},
"approved": true,
"feedback": {
"enabled": true
},
"created": 123,
"questions": "<unknown>",
"$links": {
"self": "//example.com/path/to/object",
"from": "//example.com/path/to/object"
},
"permissions": [
{
"_id": "507f1f77bcf86cd799439011",
"sources": {
"download": {
"ov": true,
"countries": [
"<string>"
],
"languages": [
"<string>"
]
},
"manageWorkRequests": {
"groups": "<unknown>"
},
"previews": {
"ov": true,
"countries": "<unknown>",
"languages": [
"<string>"
]
},
"requests": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"social": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"adminWorkRequests": {
"groups": "<unknown>"
}
},
"approved": true,
"project": "507f1f77bcf86cd799439011",
"assets": [
"507f1f77bcf86cd799439011"
],
"tags": [
"<string>"
],
"types": "<unknown>",
"access": {
"sharing": true,
"push": true,
"download": true,
"requests": true,
"notes": true,
"previews": true,
"manageWorkRequsts": true,
"projectAdminView": true,
"projectAdminUpdate": true,
"projectAdminEmbargos": true,
"workRequestReport": true,
"downloadReport": true,
"exceptionReport": true,
"groupSpendingReport": true,
"adminWorkRequests": true,
"shareVotingView": true,
"manageWorkRequests": true,
"ingest": true
},
"user": "507f1f77bcf86cd799439011",
"share": "507f1f77bcf86cd799439011",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"notes": "<string>"
}Create a share
curl --request POST \
--url https://api-staging.pixwel.com/api/shares \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"_id": "507f1f77bcf86cd799439011",
"from": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
},
"to": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"groups": "<unknown>",
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"length": 123,
"thumbnail": "507f1f77bcf86cd799439011",
"notes": "<string>",
"created": 123,
"mediaType": "<string>",
"creative": true,
"$links": {
"self": "//example.com/path/to/object",
"project": "//example.com/path/to/object",
"studio": "//example.com/path/to/object",
"type": "//example.com/path/to/object",
"thumbnail": "//example.com/path/to/object"
},
"$permissions": {
"canAutosub": true,
"sources": {
"requests": {
"languages": "<unknown>",
"countries": "<unknown>"
},
"autosubs": {
"languages": "<unknown>",
"countries": "<unknown>"
}
},
"access": [
"<string>"
],
"tags": {
"online": true,
"broadcast": true,
"dcp": true,
"cmyk": true,
"rgb": true
},
"ingest": [
"<string>"
]
},
"$feedback": {
"share": "<unknown>",
"vote": "<unknown>",
"summary": "<unknown>"
}
}
],
"assetsCount": 123,
"assetCategory": "<string>",
"projectNames": [
"<string>"
],
"studios": [
"507f1f77bcf86cd799439011"
],
"tags": [
[
"<string>"
]
],
"urls": {
"playlist": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object"
},
"approved": true,
"feedback": {
"enabled": true
},
"created": 123,
"questions": "<unknown>",
"$links": {
"self": "//example.com/path/to/object",
"from": "//example.com/path/to/object"
},
"permissions": [
{
"_id": "507f1f77bcf86cd799439011",
"sources": {
"download": {
"ov": true,
"countries": [
"<string>"
],
"languages": [
"<string>"
]
},
"manageWorkRequests": {
"groups": "<unknown>"
},
"previews": {
"ov": true,
"countries": "<unknown>",
"languages": [
"<string>"
]
},
"requests": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"social": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"adminWorkRequests": {
"groups": "<unknown>"
}
},
"approved": true,
"project": "507f1f77bcf86cd799439011",
"assets": [
"507f1f77bcf86cd799439011"
],
"tags": [
"<string>"
],
"types": "<unknown>",
"access": {
"sharing": true,
"push": true,
"download": true,
"requests": true,
"notes": true,
"previews": true,
"manageWorkRequsts": true,
"projectAdminView": true,
"projectAdminUpdate": true,
"projectAdminEmbargos": true,
"workRequestReport": true,
"downloadReport": true,
"exceptionReport": true,
"groupSpendingReport": true,
"adminWorkRequests": true,
"shareVotingView": true,
"manageWorkRequests": true,
"ingest": true
},
"user": "507f1f77bcf86cd799439011",
"share": "507f1f77bcf86cd799439011",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"notes": "<string>"
}
'import requests
url = "https://api-staging.pixwel.com/api/shares"
payload = {
"_id": "507f1f77bcf86cd799439011",
"from": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": { "self": "//example.com/path/to/object" }
},
"to": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": { "self": "//example.com/path/to/object" }
}
],
"groups": "<unknown>",
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"length": 123,
"thumbnail": "507f1f77bcf86cd799439011",
"notes": "<string>",
"created": 123,
"mediaType": "<string>",
"creative": True,
"$links": {
"self": "//example.com/path/to/object",
"project": "//example.com/path/to/object",
"studio": "//example.com/path/to/object",
"type": "//example.com/path/to/object",
"thumbnail": "//example.com/path/to/object"
},
"$permissions": {
"canAutosub": True,
"sources": {
"requests": {
"languages": "<unknown>",
"countries": "<unknown>"
},
"autosubs": {
"languages": "<unknown>",
"countries": "<unknown>"
}
},
"access": ["<string>"],
"tags": {
"online": True,
"broadcast": True,
"dcp": True,
"cmyk": True,
"rgb": True
},
"ingest": ["<string>"]
},
"$feedback": {
"share": "<unknown>",
"vote": "<unknown>",
"summary": "<unknown>"
}
}
],
"assetsCount": 123,
"assetCategory": "<string>",
"projectNames": ["<string>"],
"studios": ["507f1f77bcf86cd799439011"],
"tags": [["<string>"]],
"urls": {
"playlist": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object"
},
"approved": True,
"feedback": { "enabled": True },
"created": 123,
"questions": "<unknown>",
"$links": {
"self": "//example.com/path/to/object",
"from": "//example.com/path/to/object"
},
"permissions": [
{
"_id": "507f1f77bcf86cd799439011",
"sources": {
"download": {
"ov": True,
"countries": ["<string>"],
"languages": ["<string>"]
},
"manageWorkRequests": { "groups": "<unknown>" },
"previews": {
"ov": True,
"countries": "<unknown>",
"languages": ["<string>"]
},
"requests": {
"ov": True,
"countries": "<unknown>",
"languages": "<unknown>"
},
"social": {
"ov": True,
"countries": "<unknown>",
"languages": "<unknown>"
},
"adminWorkRequests": { "groups": "<unknown>" }
},
"approved": True,
"project": "507f1f77bcf86cd799439011",
"assets": ["507f1f77bcf86cd799439011"],
"tags": ["<string>"],
"types": "<unknown>",
"access": {
"sharing": True,
"push": True,
"download": True,
"requests": True,
"notes": True,
"previews": True,
"manageWorkRequsts": True,
"projectAdminView": True,
"projectAdminUpdate": True,
"projectAdminEmbargos": True,
"workRequestReport": True,
"downloadReport": True,
"exceptionReport": True,
"groupSpendingReport": True,
"adminWorkRequests": True,
"shareVotingView": True,
"manageWorkRequests": True,
"ingest": True
},
"user": "507f1f77bcf86cd799439011",
"share": "507f1f77bcf86cd799439011",
"$links": { "self": "//example.com/path/to/object" }
}
],
"notes": "<string>"
}
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',
from: {
_id: '507f1f77bcf86cd799439011',
name: '<string>',
emailNormal: 'user@example.com',
$links: {self: '//example.com/path/to/object'}
},
to: [
{
_id: '507f1f77bcf86cd799439011',
name: '<string>',
emailNormal: 'user@example.com',
$links: {self: '//example.com/path/to/object'}
}
],
groups: '<unknown>',
assets: [
{
_id: '507f1f77bcf86cd799439011',
project: '507f1f77bcf86cd799439011',
studio: '507f1f77bcf86cd799439011',
name: '<string>',
slug: '<string>',
type: '<string>',
length: 123,
thumbnail: '507f1f77bcf86cd799439011',
notes: '<string>',
created: 123,
mediaType: '<string>',
creative: true,
$links: {
self: '//example.com/path/to/object',
project: '//example.com/path/to/object',
studio: '//example.com/path/to/object',
type: '//example.com/path/to/object',
thumbnail: '//example.com/path/to/object'
},
$permissions: {
canAutosub: true,
sources: {
requests: {languages: '<unknown>', countries: '<unknown>'},
autosubs: {languages: '<unknown>', countries: '<unknown>'}
},
access: ['<string>'],
tags: {online: true, broadcast: true, dcp: true, cmyk: true, rgb: true},
ingest: ['<string>']
},
$feedback: {share: '<unknown>', vote: '<unknown>', summary: '<unknown>'}
}
],
assetsCount: 123,
assetCategory: '<string>',
projectNames: ['<string>'],
studios: ['507f1f77bcf86cd799439011'],
tags: [['<string>']],
urls: {
playlist: 'https://example.com/path/to/object',
invite: 'https://example.com/path/to/object'
},
approved: true,
feedback: {enabled: true},
created: 123,
questions: '<unknown>',
$links: {self: '//example.com/path/to/object', from: '//example.com/path/to/object'},
permissions: [
{
_id: '507f1f77bcf86cd799439011',
sources: {
download: {ov: true, countries: ['<string>'], languages: ['<string>']},
manageWorkRequests: {groups: '<unknown>'},
previews: {ov: true, countries: '<unknown>', languages: ['<string>']},
requests: {ov: true, countries: '<unknown>', languages: '<unknown>'},
social: {ov: true, countries: '<unknown>', languages: '<unknown>'},
adminWorkRequests: {groups: '<unknown>'}
},
approved: true,
project: '507f1f77bcf86cd799439011',
assets: ['507f1f77bcf86cd799439011'],
tags: ['<string>'],
types: '<unknown>',
access: {
sharing: true,
push: true,
download: true,
requests: true,
notes: true,
previews: true,
manageWorkRequsts: true,
projectAdminView: true,
projectAdminUpdate: true,
projectAdminEmbargos: true,
workRequestReport: true,
downloadReport: true,
exceptionReport: true,
groupSpendingReport: true,
adminWorkRequests: true,
shareVotingView: true,
manageWorkRequests: true,
ingest: true
},
user: '507f1f77bcf86cd799439011',
share: '507f1f77bcf86cd799439011',
$links: {self: '//example.com/path/to/object'}
}
],
notes: '<string>'
})
};
fetch('https://api-staging.pixwel.com/api/shares', 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/shares",
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',
'from' => [
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'emailNormal' => 'user@example.com',
'$links' => [
'self' => '//example.com/path/to/object'
]
],
'to' => [
[
'_id' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'emailNormal' => 'user@example.com',
'$links' => [
'self' => '//example.com/path/to/object'
]
]
],
'groups' => '<unknown>',
'assets' => [
[
'_id' => '507f1f77bcf86cd799439011',
'project' => '507f1f77bcf86cd799439011',
'studio' => '507f1f77bcf86cd799439011',
'name' => '<string>',
'slug' => '<string>',
'type' => '<string>',
'length' => 123,
'thumbnail' => '507f1f77bcf86cd799439011',
'notes' => '<string>',
'created' => 123,
'mediaType' => '<string>',
'creative' => true,
'$links' => [
'self' => '//example.com/path/to/object',
'project' => '//example.com/path/to/object',
'studio' => '//example.com/path/to/object',
'type' => '//example.com/path/to/object',
'thumbnail' => '//example.com/path/to/object'
],
'$permissions' => [
'canAutosub' => true,
'sources' => [
'requests' => [
'languages' => '<unknown>',
'countries' => '<unknown>'
],
'autosubs' => [
'languages' => '<unknown>',
'countries' => '<unknown>'
]
],
'access' => [
'<string>'
],
'tags' => [
'online' => true,
'broadcast' => true,
'dcp' => true,
'cmyk' => true,
'rgb' => true
],
'ingest' => [
'<string>'
]
],
'$feedback' => [
'share' => '<unknown>',
'vote' => '<unknown>',
'summary' => '<unknown>'
]
]
],
'assetsCount' => 123,
'assetCategory' => '<string>',
'projectNames' => [
'<string>'
],
'studios' => [
'507f1f77bcf86cd799439011'
],
'tags' => [
[
'<string>'
]
],
'urls' => [
'playlist' => 'https://example.com/path/to/object',
'invite' => 'https://example.com/path/to/object'
],
'approved' => true,
'feedback' => [
'enabled' => true
],
'created' => 123,
'questions' => '<unknown>',
'$links' => [
'self' => '//example.com/path/to/object',
'from' => '//example.com/path/to/object'
],
'permissions' => [
[
'_id' => '507f1f77bcf86cd799439011',
'sources' => [
'download' => [
'ov' => true,
'countries' => [
'<string>'
],
'languages' => [
'<string>'
]
],
'manageWorkRequests' => [
'groups' => '<unknown>'
],
'previews' => [
'ov' => true,
'countries' => '<unknown>',
'languages' => [
'<string>'
]
],
'requests' => [
'ov' => true,
'countries' => '<unknown>',
'languages' => '<unknown>'
],
'social' => [
'ov' => true,
'countries' => '<unknown>',
'languages' => '<unknown>'
],
'adminWorkRequests' => [
'groups' => '<unknown>'
]
],
'approved' => true,
'project' => '507f1f77bcf86cd799439011',
'assets' => [
'507f1f77bcf86cd799439011'
],
'tags' => [
'<string>'
],
'types' => '<unknown>',
'access' => [
'sharing' => true,
'push' => true,
'download' => true,
'requests' => true,
'notes' => true,
'previews' => true,
'manageWorkRequsts' => true,
'projectAdminView' => true,
'projectAdminUpdate' => true,
'projectAdminEmbargos' => true,
'workRequestReport' => true,
'downloadReport' => true,
'exceptionReport' => true,
'groupSpendingReport' => true,
'adminWorkRequests' => true,
'shareVotingView' => true,
'manageWorkRequests' => true,
'ingest' => true
],
'user' => '507f1f77bcf86cd799439011',
'share' => '507f1f77bcf86cd799439011',
'$links' => [
'self' => '//example.com/path/to/object'
]
]
],
'notes' => '<string>'
]),
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/shares"
payload := strings.NewReader("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"to\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"groups\": \"<unknown>\",\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"type\": \"<string>\",\n \"length\": 123,\n \"thumbnail\": \"507f1f77bcf86cd799439011\",\n \"notes\": \"<string>\",\n \"created\": 123,\n \"mediaType\": \"<string>\",\n \"creative\": true,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"project\": \"//example.com/path/to/object\",\n \"studio\": \"//example.com/path/to/object\",\n \"type\": \"//example.com/path/to/object\",\n \"thumbnail\": \"//example.com/path/to/object\"\n },\n \"$permissions\": {\n \"canAutosub\": true,\n \"sources\": {\n \"requests\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n },\n \"autosubs\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n }\n },\n \"access\": [\n \"<string>\"\n ],\n \"tags\": {\n \"online\": true,\n \"broadcast\": true,\n \"dcp\": true,\n \"cmyk\": true,\n \"rgb\": true\n },\n \"ingest\": [\n \"<string>\"\n ]\n },\n \"$feedback\": {\n \"share\": \"<unknown>\",\n \"vote\": \"<unknown>\",\n \"summary\": \"<unknown>\"\n }\n }\n ],\n \"assetsCount\": 123,\n \"assetCategory\": \"<string>\",\n \"projectNames\": [\n \"<string>\"\n ],\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n [\n \"<string>\"\n ]\n ],\n \"urls\": {\n \"playlist\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\"\n },\n \"approved\": true,\n \"feedback\": {\n \"enabled\": true\n },\n \"created\": 123,\n \"questions\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"from\": \"//example.com/path/to/object\"\n },\n \"permissions\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"sources\": {\n \"download\": {\n \"ov\": true,\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [\n \"<string>\"\n ]\n },\n \"manageWorkRequests\": {\n \"groups\": \"<unknown>\"\n },\n \"previews\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": [\n \"<string>\"\n ]\n },\n \"requests\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"social\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"adminWorkRequests\": {\n \"groups\": \"<unknown>\"\n }\n },\n \"approved\": true,\n \"project\": \"507f1f77bcf86cd799439011\",\n \"assets\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"types\": \"<unknown>\",\n \"access\": {\n \"sharing\": true,\n \"push\": true,\n \"download\": true,\n \"requests\": true,\n \"notes\": true,\n \"previews\": true,\n \"manageWorkRequsts\": true,\n \"projectAdminView\": true,\n \"projectAdminUpdate\": true,\n \"projectAdminEmbargos\": true,\n \"workRequestReport\": true,\n \"downloadReport\": true,\n \"exceptionReport\": true,\n \"groupSpendingReport\": true,\n \"adminWorkRequests\": true,\n \"shareVotingView\": true,\n \"manageWorkRequests\": true,\n \"ingest\": true\n },\n \"user\": \"507f1f77bcf86cd799439011\",\n \"share\": \"507f1f77bcf86cd799439011\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"notes\": \"<string>\"\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/shares")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"to\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"groups\": \"<unknown>\",\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"type\": \"<string>\",\n \"length\": 123,\n \"thumbnail\": \"507f1f77bcf86cd799439011\",\n \"notes\": \"<string>\",\n \"created\": 123,\n \"mediaType\": \"<string>\",\n \"creative\": true,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"project\": \"//example.com/path/to/object\",\n \"studio\": \"//example.com/path/to/object\",\n \"type\": \"//example.com/path/to/object\",\n \"thumbnail\": \"//example.com/path/to/object\"\n },\n \"$permissions\": {\n \"canAutosub\": true,\n \"sources\": {\n \"requests\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n },\n \"autosubs\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n }\n },\n \"access\": [\n \"<string>\"\n ],\n \"tags\": {\n \"online\": true,\n \"broadcast\": true,\n \"dcp\": true,\n \"cmyk\": true,\n \"rgb\": true\n },\n \"ingest\": [\n \"<string>\"\n ]\n },\n \"$feedback\": {\n \"share\": \"<unknown>\",\n \"vote\": \"<unknown>\",\n \"summary\": \"<unknown>\"\n }\n }\n ],\n \"assetsCount\": 123,\n \"assetCategory\": \"<string>\",\n \"projectNames\": [\n \"<string>\"\n ],\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n [\n \"<string>\"\n ]\n ],\n \"urls\": {\n \"playlist\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\"\n },\n \"approved\": true,\n \"feedback\": {\n \"enabled\": true\n },\n \"created\": 123,\n \"questions\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"from\": \"//example.com/path/to/object\"\n },\n \"permissions\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"sources\": {\n \"download\": {\n \"ov\": true,\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [\n \"<string>\"\n ]\n },\n \"manageWorkRequests\": {\n \"groups\": \"<unknown>\"\n },\n \"previews\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": [\n \"<string>\"\n ]\n },\n \"requests\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"social\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"adminWorkRequests\": {\n \"groups\": \"<unknown>\"\n }\n },\n \"approved\": true,\n \"project\": \"507f1f77bcf86cd799439011\",\n \"assets\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"types\": \"<unknown>\",\n \"access\": {\n \"sharing\": true,\n \"push\": true,\n \"download\": true,\n \"requests\": true,\n \"notes\": true,\n \"previews\": true,\n \"manageWorkRequsts\": true,\n \"projectAdminView\": true,\n \"projectAdminUpdate\": true,\n \"projectAdminEmbargos\": true,\n \"workRequestReport\": true,\n \"downloadReport\": true,\n \"exceptionReport\": true,\n \"groupSpendingReport\": true,\n \"adminWorkRequests\": true,\n \"shareVotingView\": true,\n \"manageWorkRequests\": true,\n \"ingest\": true\n },\n \"user\": \"507f1f77bcf86cd799439011\",\n \"share\": \"507f1f77bcf86cd799439011\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.pixwel.com/api/shares")
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 \"from\": {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n },\n \"to\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"emailNormal\": \"user@example.com\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"groups\": \"<unknown>\",\n \"assets\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"project\": \"507f1f77bcf86cd799439011\",\n \"studio\": \"507f1f77bcf86cd799439011\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"type\": \"<string>\",\n \"length\": 123,\n \"thumbnail\": \"507f1f77bcf86cd799439011\",\n \"notes\": \"<string>\",\n \"created\": 123,\n \"mediaType\": \"<string>\",\n \"creative\": true,\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"project\": \"//example.com/path/to/object\",\n \"studio\": \"//example.com/path/to/object\",\n \"type\": \"//example.com/path/to/object\",\n \"thumbnail\": \"//example.com/path/to/object\"\n },\n \"$permissions\": {\n \"canAutosub\": true,\n \"sources\": {\n \"requests\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n },\n \"autosubs\": {\n \"languages\": \"<unknown>\",\n \"countries\": \"<unknown>\"\n }\n },\n \"access\": [\n \"<string>\"\n ],\n \"tags\": {\n \"online\": true,\n \"broadcast\": true,\n \"dcp\": true,\n \"cmyk\": true,\n \"rgb\": true\n },\n \"ingest\": [\n \"<string>\"\n ]\n },\n \"$feedback\": {\n \"share\": \"<unknown>\",\n \"vote\": \"<unknown>\",\n \"summary\": \"<unknown>\"\n }\n }\n ],\n \"assetsCount\": 123,\n \"assetCategory\": \"<string>\",\n \"projectNames\": [\n \"<string>\"\n ],\n \"studios\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n [\n \"<string>\"\n ]\n ],\n \"urls\": {\n \"playlist\": \"https://example.com/path/to/object\",\n \"invite\": \"https://example.com/path/to/object\"\n },\n \"approved\": true,\n \"feedback\": {\n \"enabled\": true\n },\n \"created\": 123,\n \"questions\": \"<unknown>\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\",\n \"from\": \"//example.com/path/to/object\"\n },\n \"permissions\": [\n {\n \"_id\": \"507f1f77bcf86cd799439011\",\n \"sources\": {\n \"download\": {\n \"ov\": true,\n \"countries\": [\n \"<string>\"\n ],\n \"languages\": [\n \"<string>\"\n ]\n },\n \"manageWorkRequests\": {\n \"groups\": \"<unknown>\"\n },\n \"previews\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": [\n \"<string>\"\n ]\n },\n \"requests\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"social\": {\n \"ov\": true,\n \"countries\": \"<unknown>\",\n \"languages\": \"<unknown>\"\n },\n \"adminWorkRequests\": {\n \"groups\": \"<unknown>\"\n }\n },\n \"approved\": true,\n \"project\": \"507f1f77bcf86cd799439011\",\n \"assets\": [\n \"507f1f77bcf86cd799439011\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"types\": \"<unknown>\",\n \"access\": {\n \"sharing\": true,\n \"push\": true,\n \"download\": true,\n \"requests\": true,\n \"notes\": true,\n \"previews\": true,\n \"manageWorkRequsts\": true,\n \"projectAdminView\": true,\n \"projectAdminUpdate\": true,\n \"projectAdminEmbargos\": true,\n \"workRequestReport\": true,\n \"downloadReport\": true,\n \"exceptionReport\": true,\n \"groupSpendingReport\": true,\n \"adminWorkRequests\": true,\n \"shareVotingView\": true,\n \"manageWorkRequests\": true,\n \"ingest\": true\n },\n \"user\": \"507f1f77bcf86cd799439011\",\n \"share\": \"507f1f77bcf86cd799439011\",\n \"$links\": {\n \"self\": \"//example.com/path/to/object\"\n }\n }\n ],\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "507f1f77bcf86cd799439011",
"from": {
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
},
"to": [
{
"_id": "507f1f77bcf86cd799439011",
"name": "<string>",
"emailNormal": "user@example.com",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"groups": "<unknown>",
"assets": [
{
"_id": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439011",
"studio": "507f1f77bcf86cd799439011",
"name": "<string>",
"slug": "<string>",
"type": "<string>",
"length": 123,
"thumbnail": "507f1f77bcf86cd799439011",
"notes": "<string>",
"created": 123,
"mediaType": "<string>",
"creative": true,
"$links": {
"self": "//example.com/path/to/object",
"project": "//example.com/path/to/object",
"studio": "//example.com/path/to/object",
"type": "//example.com/path/to/object",
"thumbnail": "//example.com/path/to/object"
},
"$permissions": {
"canAutosub": true,
"sources": {
"requests": {
"languages": "<unknown>",
"countries": "<unknown>"
},
"autosubs": {
"languages": "<unknown>",
"countries": "<unknown>"
}
},
"access": [
"<string>"
],
"tags": {
"online": true,
"broadcast": true,
"dcp": true,
"cmyk": true,
"rgb": true
},
"ingest": [
"<string>"
]
},
"$feedback": {
"share": "<unknown>",
"vote": "<unknown>",
"summary": "<unknown>"
}
}
],
"assetsCount": 123,
"assetCategory": "<string>",
"projectNames": [
"<string>"
],
"studios": [
"507f1f77bcf86cd799439011"
],
"tags": [
[
"<string>"
]
],
"urls": {
"playlist": "https://example.com/path/to/object",
"invite": "https://example.com/path/to/object"
},
"approved": true,
"feedback": {
"enabled": true
},
"created": 123,
"questions": "<unknown>",
"$links": {
"self": "//example.com/path/to/object",
"from": "//example.com/path/to/object"
},
"permissions": [
{
"_id": "507f1f77bcf86cd799439011",
"sources": {
"download": {
"ov": true,
"countries": [
"<string>"
],
"languages": [
"<string>"
]
},
"manageWorkRequests": {
"groups": "<unknown>"
},
"previews": {
"ov": true,
"countries": "<unknown>",
"languages": [
"<string>"
]
},
"requests": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"social": {
"ov": true,
"countries": "<unknown>",
"languages": "<unknown>"
},
"adminWorkRequests": {
"groups": "<unknown>"
}
},
"approved": true,
"project": "507f1f77bcf86cd799439011",
"assets": [
"507f1f77bcf86cd799439011"
],
"tags": [
"<string>"
],
"types": "<unknown>",
"access": {
"sharing": true,
"push": true,
"download": true,
"requests": true,
"notes": true,
"previews": true,
"manageWorkRequsts": true,
"projectAdminView": true,
"projectAdminUpdate": true,
"projectAdminEmbargos": true,
"workRequestReport": true,
"downloadReport": true,
"exceptionReport": true,
"groupSpendingReport": true,
"adminWorkRequests": true,
"shareVotingView": true,
"manageWorkRequests": true,
"ingest": true
},
"user": "507f1f77bcf86cd799439011",
"share": "507f1f77bcf86cd799439011",
"$links": {
"self": "//example.com/path/to/object"
}
}
],
"notes": "<string>"
}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"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Additional entries are keyed by record id.
Show child attributes
Show child attributes
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
Response
OK
"507f1f77bcf86cd799439011"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Shape not inferred — the sampled response had no entries
Show child attributes
Show child attributes
Additional entries are keyed by record id.
Show child attributes
Show child attributes
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