{ "info": { "_postman_id": "38d760f8-dcbf-4411-826d-e0c0b6e76f8a", "name": "Vantage processing REST API Copy", "description": "Environment: Production
Product Version: 1.0.0-0.33.1-20210913.3", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "creating REST API client", "item": [ { "name": "1. Get a tenant ID", "event": [ { "listen": "test", "script": { "exec": [ "pm.environment.set(\"tenantId\", JSON.parse(responseBody).tenantId);" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disabledSystemHeaders": {} }, "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{manuallyRetrievedToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/workspace/users/me/initialize?api-version=1.0", "host": [ "{{baseUrl}}" ], "path": [ "api", "workspace", "users", "me", "initialize" ], "query": [ { "key": "api-version", "value": "1.0" } ] } }, "response": [] }, { "name": "2. Create a client", "event": [ { "listen": "test", "script": { "exec": [ "pm.environment.set(\"clientId\", JSON.parse(responseBody).clientId);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"clientName\": \"your_client_name\",\r\n \"description\": \"description\",\r\n \"redirectUris\": [\r\n \"localhost/\",\r\n \"yourdomain/\"\r\n ],\r\n \"allowRopc\": true,\r\n \"allowOfflineAccess\": true,\r\n \"allowedScopes\": [\r\n \"openid\",\r\n \"permissions\",\r\n \"global.wildcard\"\r\n ]\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/adminapi2/v1/tenants/{{tenantId}}/clients/", "host": [ "{{baseUrl}}" ], "path": [ "api", "adminapi2", "v1", "tenants", "{{tenantId}}", "clients", "" ] } }, "response": [] }, { "name": "3. Create a secret", "event": [ { "listen": "test", "script": { "exec": [ "pm.environment.set(\"clientSecret\", JSON.parse(responseBody).value);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"description\": \"description\", // A description of the client secret. This can be a short comment to help you tell the secrets apart. This is an optional parameter\r\n \"expiration\": \"\" // Specifies the secret expiry date (between 1 day and 3 years). For example, \"2021-09-07T13:03:38.380Z\". By default, this date is set to exactly six months from the secret creation date\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{baseUrl}}/api/adminapi2/v1/tenants/{{tenantId}}/clients/{{clientId}}/secrets/", "host": [ "{{baseUrl}}" ], "path": [ "api", "adminapi2", "v1", "tenants", "{{tenantId}}", "clients", "{{clientId}}", "secrets", "" ] } }, "response": [] }, { "name": "4. Obtain the token", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "grant_type", "value": "password", "type": "text" }, { "key": "scope", "value": "openid permissions global.wildcard", "type": "text" }, { "key": "username", "value": "", "type": "text" }, { "key": "password", "value": "", "type": "text" }, { "key": "client_id", "value": "{{clientId}}", "type": "text" }, { "key": "client_secret", "value": "{{clientsecret}}", "type": "text" } ] }, "url": { "raw": "{{baseUrl}}/auth2/{{tenantId}}/connect/token", "host": [ "{{baseUrl}}" ], "path": [ "auth2", "{{tenantId}}", "connect", "token" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] } ], "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{manuallyRetrievedToken}}", "type": "string" } ] }, "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ], "variable": [ { "key": "baseUrl", "value": "https://vantage-eu.abbyy.com" }, { "key": "manuallyRetrievedToken", "value": "", "type": "string" }, { "key": "tenantId", "value": "", "type": "string" }, { "key": "clientid", "value": "", "type": "string" }, { "key": "clientsecret", "value": "", "type": "string" } ] }