Get Started¶
This section explains how to prepare your environment for testing xAPI.
Prerequisites¶
- VC platform 3.0 or higher.
- The platform is configured to use ElasticSearch engine.
Presettings¶
To start using xAPI:
- Open the Platform and go to Settings.
- Select Catalog.
- Select Search.
-
Enable Store serialized catalog objects in index option:
-
Rebuild index.
Test environment¶
Note
If the xAPI module is not installed out-of-the-box, you can install it on the platform version 3.0 or higher by following this guide. Then restart the Platform.
Open GraphQL UI playground in the browser by navigating to http://{platform url}/ui/playground, and run some sample queries.
{
"data": {
"products": {
"items": [
{
"id": "05a51f40-c26d-47d4-a0c5-c13ab8f644d9",
"name": "TEST stock < min",
"seoInfo": {
"metaDescription": ""
}
},
{
"id": "cb05e425-ced1-41bb-a28a-a1d592551bbf",
"name": "TEST min < max < stock",
"seoInfo": {
"metaDescription": ""
}
},
{
"id": "b0be673b-61bc-4912-b207-f4c3336f86e7",
"name": "TEST min < stock < max",
"seoInfo": {
"metaDescription": ""
}
},
// more items...
}
}
]
}
}
}
Authorization and token usage¶
Some GraphQL queries and mutations require additional authorization. To test the query or mutation without authorization errors:
- Open the Virto Commerce API Docs (v1) in your browser.
-
Authorize as an administrator or manager.
-
Expand VirtoCommerce platform/POST/connect/token section to fill in the required fields with appropriate credentials, then click Execute.
-
Copy the token that appears in the field below:
Providing token in Playground is decribed in the Playground section.
Providing token in Postman is described in Postman section.