{ "info": { "_postman_id": "91dcac2b-e5b1-4d95-9b5b-e2454ea68cbd", "name": "Exemples Constellio API Rest V2", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Generate token", "request": { "method": "GET", "header": [ { "key": "username", "value": "admin", "type": "text" }, { "key": "password", "value": "password", "type": "text" }, { "key": "duration", "value": "2d", "type": "text" }, { "key": "asUser", "value": "null", "type": "text", "disabled": true } ], "url": { "raw": "http://localhost:7070/constellio/generateToken", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "generateToken" ] } }, "response": [] }, { "name": "Collections - GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "3e892c8f-a8d9-11ed-98d1-fb6a26719381", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/collections", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "collections" ] } }, "response": [] }, { "name": "Folders/id - GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/folders/A01", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "folders", "A01" ] } }, "response": [] }, { "name": "Authorization GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/records/unitId_10/authorizations", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records", "unitId_10", "authorizations" ] } }, "response": [] }, { "name": "Authorization GET one", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/authorizations/00000200000", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "authorizations", "00000200000" ] } }, "response": [] }, { "name": "Authorization DELETE", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "DELETE", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/authorizations/00000000090", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "authorizations", "00000000090" ], "query": [ { "key": "physical", "value": "true", "disabled": true } ] } }, "response": [] }, { "name": "Authorization PATCH", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"metadatas\": {\r\n \"principals\": [\r\n \"00000000065\",\r\n \"00000000067\"\r\n ],\r\n \"roles\": [\r\n \"READ\",\r\n \"WRITE\"\r\n ]\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/authorizations/00000000090", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "authorizations", "00000000090" ], "query": [ { "key": "physical", "value": "true", "disabled": true } ] } }, "response": [] }, { "name": "Documents/id - GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/documents/docA19", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "documents", "docA19" ] } }, "response": [] }, { "name": "Documents/id - DELETE", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "DELETE", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/documents/docA19", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "documents", "docA19" ], "query": [ { "key": "physical", "value": "true", "disabled": true } ] } }, "response": [] }, { "name": "Documents/id - PATCH", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "PATCH", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "document", "value": "{\n \"contentOperation\":{\n \"version\":\"02\",\n \"filename\":\"Screen Shot.png\"\n },\n \"recordOperation\":{\n \"metadatas\":{\n \"schema\":[\n \"document_default\"\n ],\n \"folder\":[\n \"A20\"\n ],\n \"author\":[\n \"admin\"\n ],\n \"title\":[\n \"titleUpdated\"\n ]\n }\n }\n}", "contentType": "application/json", "type": "text" }, { "key": "file", "type": "file", "src": "/Users/elie/Downloads/Screen Shot.png" } ], "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/documents/docA19?filterMode=ALL", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "documents", "docA19" ], "query": [ { "key": "filterMode", "value": "ALL" } ] } }, "response": [] }, { "name": "Authorization POST", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"operations\": [\r\n {\r\n \"metadatas\": {\r\n \"principals\": [\r\n \"00000000063\"\r\n ],\r\n \"startDate\": [\r\n \"2022-04-07\"\r\n ],\r\n \"endDate\": [\r\n \"2023-04-15\"\r\n ],\r\n \"roles\": [\r\n \"READ\",\r\n \"WRITE\",\r\n \"DELETE\"\r\n ],\r\n \"negative\": [\r\n \"true\"\r\n ]\r\n }\r\n }\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/records/A01/authorizations/", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records", "A01", "authorizations", "" ] } }, "response": [] }, { "name": "Folders - POST", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "c166ad06-ad6f-11ed-a089-e720d7667b05", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "[\n {\n \"metadatas\": {\n \"code\": [\n \"1000\"\n ],\n \"copyRetentionRules\": {\n\n }\n \n]", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/folders?filterMode=ALL", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "folders" ], "query": [ { "key": "filterMode", "value": "ALL" } ] } }, "response": [] }, { "name": "Folder PATCH", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"metadatas\": {\r\n \"title\": [\r\n \"newTitle\"\r\n ],\r\n \"openingDate\": [\r\n \"20-05-2022\"\r\n ],\r\n \"administrativeUnitEntered\": [\r\n \"unitId_10a\"\r\n ],\r\n \"categoryEntered\": [\r\n \"categoryId_X\"\r\n ],\r\n \"retentionRuleEntered\": [\r\n \"ruleId_1\"\r\n ]\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/folders", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "folders" ] } }, "response": [] }, { "name": "Folders/id - GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/folders/A01", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "folders", "A01" ] } }, "response": [] }, { "name": "Folders/id - PATCH", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "PATCH", "header": [], "body": { "mode": "raw", "raw": "{\n \"metadatas\":{\n \"title\":[\n \"newTitle1\"\n ]\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/folders/A01?filterMode=ALL", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "folders", "A01" ], "query": [ { "key": "filterMode", "value": "ALL" } ] } }, "response": [] }, { "name": "Documents - POST", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "document", "value": "{\n \"contentOperation\":{\n \"version\":\"01\",\n \"filename\":\"nameTest\"\n },\n \"recordOperation\":{\n \"metadatas\":{\n \"schema\":[\n \"document_default\"\n ],\n \"folder\":[\n \"A20\"\n ],\n \"keywords\":[\n \"document\"\n ],\n \"author\":[\n \"elie\"\n ],\n \"subject\":[\n \"sub\"\n ],\n \"description\":[\n \"desc1\"\n ],\n \"company\":[\n \"company\"\n ],\n \"collection\":[\n \"zeCollection\"\n ],\n \"title\":[\n \"title\"\n ]\n }\n }\n}", "contentType": "application/json", "type": "default" }, { "key": "file", "type": "file", "src": "/Users/elie/Downloads/Screen Shot.png" } ] }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/documents?filterMode=ALL", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "documents" ], "query": [ { "key": "filterMode", "value": "ALL" }, { "key": "", "value": null, "disabled": true } ] } }, "response": [] }, { "name": "Folders/id - DELETE", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "DELETE", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/folders/A01", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "folders", "A01" ], "query": [ { "key": "physical", "value": "true", "disabled": true } ] } }, "response": [] }, { "name": "Search records (schemaTypes) - POST", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "4ff35aac-bf84-11ed-9102-031c2cd9e718", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "\r\n\r\n{\r\n \"collection\": \"admin\",\r\n \"schemaTypes\": [\r\n \"document\"\r\n ],\r\n\"facetMode\": \"SPECIFIC\",\r\n \"facetValueIds\": [\r\n \"title_s:test\",\r\n \"folderPId_s:00000725096\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "localhost:7070/constellio/rest/v2/records", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records" ] } }, "response": [] }, { "name": "Search records (documents dans dossier spécifique) - POST", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "3d145432-b92e-11ed-9199-69611054244a", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"collection\": \"zeCollection\",\r\n \"schemaTypes\": [\r\n \"document\"\r\n ],\r\n\"facetMode\": \"SPECIFIC\",\r\n \"facetValueIds\": [\r\n \"modifiedOn_dt:1995-12-31T23:59:59Z\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "localhost:7070/constellio/rest/v2/records", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records" ] } }, "response": [] }, { "name": "Records - GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "4ff35aac-bf84-11ed-9102-031c2cd9e718", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "localhost:7070l/constellio/rest/v2/records/?ids=00000008808", "host": [ "localhost" ], "port": "7070l", "path": [ "constellio", "rest", "v2", "records", "" ], "query": [ { "key": "ids", "value": "00000008808" } ] } }, "response": [] }, { "name": "Records - GET (Multiple)", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/records/?ids=A19&ids=A01", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records", "" ], "query": [ { "key": "ids", "value": "A19" }, { "key": "ids", "value": "A01" } ] } }, "response": [] }, { "name": "Records/id/content - GET", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "http://localhost:7070/constellio/rest/v2/records/docA19/content?metadata=content", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records", "docA19", "content" ], "query": [ { "key": "metadata", "value": "content" } ] } }, "response": [] }, { "name": "Records/id/content - PATCH", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "superToken", "type": "string" } ] }, "method": "PATCH", "header": [], "body": { "mode": "formdata", "formdata": [ { "key": "operation", "value": "{\n \"metadata\":\"content\",\n \"idx\":1,\n \"filename\":\"firstVersion.txt\",\n\"version\":\"1.5\"\n}", "contentType": "application/json", "type": "default" }, { "key": "file", "contentType": "", "type": "file", "src": "/C:/Users/Constellio/Downloads/log (3).txt" } ], "options": { "raw": { "language": "json" } } }, "url": { "raw": "http://localhost:7070/constellio/rest/v2/records/00000200352/content", "protocol": "http", "host": [ "localhost" ], "port": "7070", "path": [ "constellio", "rest", "v2", "records", "00000200352", "content" ], "query": [ { "key": "", "value": "", "disabled": true } ] } }, "response": [] } ] }