From 51f3c2a010d30f984938b79dc4ca493fccdae0fa Mon Sep 17 00:00:00 2001 From: Olha Livitchuk Date: Mon, 21 Aug 2023 18:11:02 +0200 Subject: [PATCH 01/44] FRW-2211 adjusted how-to configure guide --- _data/sidebars/scos_dev_sidebar.yml | 12 +- .../data-exchange-api-integration.md} | 160 ++++++++++++++++-- .../glue-infrastructure.md | 2 +- .../how-to-configure-data-exchange-api.md} | 46 +++-- ...w-to-send-request-in-data-exchange-api.md} | 18 +- .../glue-infrastructure.md | 2 +- .../intro-to-spryker/docs-release-notes.md | 2 +- 7 files changed, 200 insertions(+), 42 deletions(-) rename docs/scos/dev/feature-integration-guides/202307.0/glue-api/{dynamic-data-api/dynamic-data-api-integration.md => data-exchange-api/data-exchange-api-integration.md} (72%) rename docs/scos/dev/glue-api-guides/202307.0/{dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md => data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md} (69%) rename docs/scos/dev/glue-api-guides/202307.0/{dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md => data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md} (94%) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index a8bbc6c568e..6c3d92b3da2 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -1003,10 +1003,10 @@ entries: include_versions: - "202307.0" nested: - - title: How to send a request in Dynamic Data API - url: /docs/scos/dev/glue-api-guides/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html - - title: How to configure Dynamic Data API endpoints. - url: /docs/scos/dev/glue-api-guides/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.html + - title: How to send a request in Data Exchange API + url: /docs/scos/dev/glue-api-guides/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html + - title: How to configure Data Exchange API endpoints. + url: /docs/scos/dev/glue-api-guides/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html - title: Feature integration guides url: /docs/scos/dev/feature-integration-guides/feature-integration-guides.html include_versions: @@ -1378,8 +1378,8 @@ entries: url: /docs/scos/dev/feature-integration-guides/glue-api/decoupled-glue-infrastructure/glue-api-documentation-generation.html include_versions: - "202204.0" - - title: Dynamic Data API integration - url: /docs/scos/dev/feature-integration-guides/glue-api/dynamic-data-api/dynamic-data-api-integration.html + - title: Data Exchange API integration + url: /docs/scos/dev/feature-integration-guides/glue-api/data-exchange-api/data-exchange-api-integration.html include_versions: - "202307.0" - title: Agent Assist diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/dynamic-data-api/dynamic-data-api-integration.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md similarity index 72% rename from docs/scos/dev/feature-integration-guides/202307.0/glue-api/dynamic-data-api/dynamic-data-api-integration.md rename to docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md index 82f256b711a..7b013a08cd1 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/dynamic-data-api/dynamic-data-api-integration.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md @@ -1,18 +1,18 @@ --- -title: Dynamic Data API integration -description: Integrate the Dynamic Data API into a Spryker project. +title: Data Exchange API integration +description: Integrate the Data Exchange API into a Spryker project. last_updated: June 22, 2023 template: feature-integration-guide-template redirect_from: - - /docs/scos/dev/feature-integration-guides/202304.0/glue-api/dynamic-data-api/dynamic-data-api-integration.html - - /docs/scos/dev/feature-integration-guides/202307.0/glue-api/dynamic-data-api-integration.html + - /docs/scos/dev/feature-integration-guides/202304.0/glue-api/data-exchange-api/data-exchange-api-integration.html + - /docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api-integration.html --- -This document describes how to integrate the Dynamic Data API into a Spryker project. +This document describes how to integrate the Data Exchange API into a Spryker project. --- -The Dynamic Data API is a powerful tool that allows seamless interaction with your database. +The Data Exchange API is a powerful tool that allows seamless interaction with your database. You can easily access your data by sending requests to the API endpoint. @@ -20,7 +20,7 @@ It enables you to retrieve, create, update, and manage data in a flexible and ef ## Install feature core -Follow the steps below to install the Dynamic Data API core. +Follow the steps below to install the Data Exchange API core. ### Prerequisites @@ -36,7 +36,7 @@ To start feature integration, install the necessary features: Install the required modules: ```bash -composer require spryker/dynamic-entity-backend-api:"^0.1.0" --update-with-dependencies +composer require spryker/dynamic-entity-backend-api:"^0.1.0" spryker/dynamic-entity-gui:"^0.1.0" --update-with-dependencies ``` {% info_block warningBox "Verification" %} @@ -47,6 +47,7 @@ Make sure that the following modules have been installed: | --- | --- | | DynamicEntity | vendor/spryker/dynamic-entity | | DynamicEntityBackendApi | vendor/spryker/dynamic-entity-backend-api | +| DynamicEntityGui | vendor/spryker/dynamic-entity-gui | {% endinfo_block %} @@ -94,7 +95,7 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` -3. The Dynamic Data API provides a logging mechanism to capture important information about requests and any thrown exceptions. +3. The Data Exchange API provides a logging mechanism to capture important information about requests and any thrown exceptions. Logging is enabled by default. Adjust `DynamicEntityBackendApiConfig` in order to disable this option or change the path for the log file. **src/Pyz/Glue/DynamicEntityBackendApi/DynamicEntityBackendApiConfig.php** @@ -136,6 +137,38 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` +4. The Data Exchange API comes with an exclusion list of database schemas that are not allowed to be configured. + Notably, the `spy_dynamic_entity_configuration` schema is excluded by default. + Adjust `DynamicEntityGuiConfig` in order to exclude database schemas from configuring: + +**src/Pyz/Zed/DynamicEntityGui/DynamicEntityGuiConfig.php** + +```php + + */ + public function getDisallowedTables(): array + { + return [ + 'spy_dynamic_entity_configuration', + ]; + } +} +``` + ### Set up database schema and transfer objects Apply database changes and generate entity and transfer changes: @@ -153,13 +186,15 @@ Ensure that you've triggered the following changes by checking the database: | --- | --- | | spy_dynamic_entity_configuration | table | -Add configurations for dynamic entities. In order to do that follow the instructions here [how to configure Dynamic Data API](/docs/scos/dev/glue-api-guides/{{page.version}}/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.html) +Add configurations for dynamic entities. In order to do that follow the instructions here [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html) Ensure the following transfers have been created: | TRANSFER | TYPE | EVENT | PATH | | --- | --- | --- | --- | | ApiApplicationSchemaContext | class | created | src/Generated/Shared/Transfer/ApiApplicationSchemaContextTransfer.php | +| CriteriaRangeFilter | class | created | src/Generated/Shared/Transfer/CriteriaRangeFilterTransfer.php | +| DocumentationInvalidationVoterRequest | class | created | src/Generated/Shared/Transfer/DocumentationInvalidationVoterRequestTransfer.php | | DynamicApiDefinition | class | created | src/Generated/Shared/Transfer/DynamicApiDefinitionTransfer.php | | DynamicEntity | class | created | src/Generated/Shared/Transfer/DynamicEntityTransfer.php | | DynamicEntityCollection | class | created | src/Generated/Shared/Transfer/DynamicEntityCollectionTransfer.php | @@ -168,6 +203,8 @@ Ensure the following transfers have been created: | DynamicEntityCollectionResponse | class | created | src/Generated/Shared/Transfer/DynamicEntityCollectionResponseTransfer.php | | DynamicEntityConfiguration | class | created | src/Generated/Shared/Transfer/DynamicEntityConfigurationTransfer.php | | DynamicEntityConfigurationCollection | class | created | src/Generated/Shared/Transfer/DynamicEntityConfigurationCollectionTransfer.php | +| DynamicEntityConfigurationCollectionRequest | class | created | src/Generated/Shared/Transfer/DynamicEntityConfigurationCollectionRequestTransfer.php | +| DynamicEntityConfigurationCollectionResponse | class | created | src/Generated/Shared/Transfer/DynamicEntityConfigurationCollectionResponseTransfer.php | | DynamicEntityConfigurationConditions | class | created | src/Generated/Shared/Transfer/DynamicEntityConfigurationConditionsTransfer.php | | DynamicEntityConfigurationCriteria | class | created | src/Generated/Shared/Transfer/DynamicEntityConfigurationCriteriaTransfer.php | | DynamicEntityConditions | class | created | src/Generated/Shared/Transfer/DynamicEntityConditionsTransfer.php | @@ -177,6 +214,7 @@ Ensure the following transfers have been created: | DynamicEntityFieldDefinition | class | created | src/Generated/Shared/Transfer/DynamicEntityFieldDefinitionTransfer.php | | DynamicEntityFieldValidation | class | created | src/Generated/Shared/Transfer/DynamicEntityFieldValidationTransfer.php | | Error | class | created | src/Generated/Shared/Transfer/ErrorTransfer.php | +| ErrorCollection | class | created | src/Generated/Shared/Transfer/ErrorCollectionTransfer.php | | GlueError | class | created | src/Generated/Shared/Transfer/GlueErrorTransfer.php | | GlueFilter | class | created | src/Generated/Shared/Transfer/GlueFilterTransfer.php | | GlueRequest | class | created | src/Generated/Shared/Transfer/GlueRequestTransfer.php | @@ -231,6 +269,60 @@ Make sure that the configured data in the database has been added to the `spy_gl {% endinfo_block %} +### Configure navigation + +Add Dynamic Exchange API section to `navigation.xml`: + +**config/Zed/navigation.xml** + +```xml + + + + + Data Exchange API Configuration + fa-exchange-alt + dynamic-entity-gui + configuration-list + index + + + + Create new configuration + dynamic-entity-gui + configuration-create + index + 0 + + + + Edit configuration + dynamic-entity-gui + configuration-edit + index + 0 + + + + +``` + +{% info_block infoBox "Info" %} + +Run the following console command to update navigation cache: + +```bash +console navigation:build-cache +``` + +{% endinfo_block %} + +{% info_block warningBox "Verification" %} + +Make sure that the Data Exchange API section has been added to the navigation list in the Backoffice. + +{% endinfo_block %} + ### Set up behavior Enable the following behaviors by registering the plugins: @@ -239,6 +331,7 @@ Enable the following behaviors by registering the plugins: | --- | --- | --- | | PropelApplicationPlugin | Initializes `PropelOrm`. | Spryker\Zed\Propel\Communication\Plugin\Application | | DynamicEntityApiSchemaContextExpanderPlugin | Adds dynamic entities to the documentation generation context. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi | +| DynamicEntityDocumentationInvalidationVoterPlugin | Checks if dynamic entity configuration was changed within the provided interval. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi | | DynamicEntityOpenApiSchemaFormatterPlugin | Formats dynamic entities of the Open API 3 schema: info, components, paths, tags. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorOpenApi | | DynamicEntityRouteProviderPlugin | Adds routes for the provided dynamic entity to the RouteCollection. | Spryker\Glue\DynamicEntityBackendApi\Plugin | | DynamicEntityProtectedPathCollectionExpanderPlugin | Expands a list of protected endpoints with dynamic entity endpoints. | Spryker\Glue\DynamicEntityBackendApi\Plugin\GlueBackendApiApplicationAuthorizationConnector | @@ -285,6 +378,7 @@ namespace Pyz\Glue\DocumentationGeneratorApi; use Spryker\Glue\DocumentationGeneratorApi\DocumentationGeneratorApiDependencyProvider as SprykerDocumentationGeneratorApiDependencyProvider; use Spryker\Glue\DocumentationGeneratorApi\Expander\ContextExpanderCollectionInterface; use Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi\DynamicEntityApiSchemaContextExpanderPlugin; +use Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi\DynamicEntityDocumentationInvalidationVoterPlugin; class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGeneratorApiDependencyProvider { @@ -302,6 +396,16 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe { $contextExpanderCollection->addExpander(new DynamicEntityApiSchemaContextExpanderPlugin(), [static::GLUE_BACKEND_API_APPLICATION_NAME]); } + + /** + * @return array<\Spryker\Glue\DocumentationGeneratorApiExtension\Dependency\Plugin\DocumentationInvalidationVoterPluginInterface> + */ + protected function getInvalidationVoterPlugins(): array + { + return [ + new DynamicEntityDocumentationInvalidationVoterPlugin(), + ]; + } } ``` @@ -360,6 +464,40 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA {% info_block warningBox "Verification" %} -If everything is set up correctly, you can operate with the data. Follow this link to discover how to perform it:[How to send request in Dynamic Data API](/docs/scos/dev/glue-api-guides/{{page.version}}/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html) +If everything is set up correctly, you can operate with the data. Follow this link to discover how to perform it:[How to send request in Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) + +{% endinfo_block %} + +### Configure Jenkins: + +1. Adjust the scheduler project configuration: + +**config/Zed/cronjobs/jenkins.php** + +```php +$jobs[] = [ + 'name' => 'glue-api-generate-documentation', + 'command' => '$PHP_BIN vendor/bin/glue api:generate:documentation --invalidated-after-interval 90sec', + 'schedule' => '*/1 * * * *', + 'enable' => true, +]; +``` + +2. Apply the scheduler configuration update: + +```bash +vendor/bin/console scheduler:suspend +vendor/bin/console scheduler:setup +vendor/bin/console scheduler:resume +``` + +{% info_block warningBox "Verification" %} + +Make sure that you've set up the configuration: + +1. Configure at least one entity in `spy_dynamic_entity_configuration`. In order to do that follow the link [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). +2. Make sure that `src\Generated\GlueBackend\Specification\spryker_backend_api.schema.yml` was generated and contains the corresponding endpoint with correct configurations. {% endinfo_block %} + + diff --git a/docs/scos/dev/glue-api-guides/202212.0/old-glue-infrastructure/glue-infrastructure.md b/docs/scos/dev/glue-api-guides/202212.0/old-glue-infrastructure/glue-infrastructure.md index 63f122c5db7..406e807b5ce 100644 --- a/docs/scos/dev/glue-api-guides/202212.0/old-glue-infrastructure/glue-infrastructure.md +++ b/docs/scos/dev/glue-api-guides/202212.0/old-glue-infrastructure/glue-infrastructure.md @@ -432,7 +432,7 @@ In addition to HTTP Status codes, Glue can return additional error codes to dist | 1001-1099 | Guest Cart API | | 1101-1199 | Checkout API| | 1201-1299| Product Labels API | -| 1301-1399| Dynamic Data API | +| 1301-1399| Data Exchange API | ### Data formatting diff --git a/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md similarity index 69% rename from docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md rename to docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index d3f644b2f07..807f8ba7d4f 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -1,13 +1,13 @@ --- -title: How to configure Dynamic Data API endpoints. -description: This guide shows how to configure the Dynamic Data API endpoints. +title: How to configure Data Exchange API endpoints. +description: This guide shows how to configure the Data Exchange API endpoints. last_updated: June 23, 2023 template: howto-guide-template redirect_from: - - /docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.html + - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html --- -This guide shows how to configure the Dynamic Data API endpoints. +This guide shows how to configure the Data Exchange API endpoints. In order to incorporate a new endpoint for interacting with entities in the database, it is necessary to add a corresponding row to the `spy_dynamic_entity_configuration` table. @@ -98,23 +98,43 @@ larger values, the field can be set as a string type instead. {% info_block infoBox %} -So far the Dynamic Data API supports the following types for the configured fields: boolean, integer, string and decimal. +So far the Data Exchange API supports the following types for the configured fields: boolean, integer, string and decimal. {% endinfo_block %} Let's say you want to have a new endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. -Based on the provided information, the SQL transaction for interacting with the `spy_country` table through the API request via `dynamic-entity/country` would be as follows: +In order to configure the endpoint, you need to go to Data Exchange API section in Backoffice and click on "Create Data Exchange API configuration" button. -```sql -BEGIN; -INSERT INTO `spy_dynamic_entity_configuration` VALUES ('country', 'spy_country', 1, '{\"identifier\":\"id_country\",\"fields\":[{\"fieldName\":\"id_country\",\"fieldVisibleName\":\"id_country\",\"isEditable\":false,\"isCreatable\":false,\"type\":\"integer\",\"validation\":{\"isRequired\":false}},{\"fieldName\":\"iso2_code\",\"fieldVisibleName\":\"iso2_code\",\"type\":\"string\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":true,\"maxLength\":2,\"minLength\":2}},{\"fieldName\":\"iso3_code\",\"fieldVisibleName\":\"iso3_code\",\"type\":\"string\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":true,\"maxLength\":3,\"minLength\":3}},{\"fieldName\":\"name\",\"fieldVisibleName\":\"name\",\"type\":\"string\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":true,\"maxLength\":255,\"minLength\":1}},{\"fieldName\":\"postal_code_mandatory\",\"fieldVisibleName\":\"postal_code_mandatory\",\"type\":\"boolean\",\"isEditable\":true,\"isCreatable\":true,\"validation\":{\"isRequired\":false}},{\"fieldName\":\"postal_code_regex\",\"isEditable\":\"false\",\"isCreatable\":\"false\",\"fieldVisibleName\":\"postal_code_regex\",\"type\":\"string\",\"validation\":{\"isRequired\":false,\"maxLength\":500,\"minLength\":1}}]}'); -COMMIT; -``` +[PASTE SCREENSHOT HERE] + +Then you need to select a configurable table in the form below. In our case it is `spy_country`: + +[PASTE SCREENSHOT HERE] + +{% info_block infoBox %} + +Note, that you can only select tables that are not excluded from configuring. +In order to exclude a table from configuring follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html). + +{% endinfo_block %} + +After you select a table, you will see a form for configuring the endpoint. Let's fill in the form with the following values: + +[PASTE SCREENSHOT HERE] + +{% info_block infoBox %} + +Note, that you have to enable the endpoint in order to be able to use it. And besides that, you have to provide enable each field you want to use as well. + +{% endinfo_block %} + +After you click "Save" button, you will see a new endpoint in the list of endpoints in Data Exchange API section in Backoffice. +And you will be able to send request to it. {% info_block warningBox "Verification" %} -If everything is set up correctly, you can follow [How to send request in Dynamic Data API](/docs/scos/dev/glue-api-guides/{{page.version}}/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html) to discover how to request your API endpoint. -Or if you're in the middle of the integration process for the Dynamic Data API follow [Dynamic Data API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/dynamic-data-api-integration.html) to proceed with it. +If everything is set up correctly, you can follow [How to send request in Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) to discover how to request your API endpoint. +Or if you're in the middle of the integration process for the Data Exchange API follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html) to proceed with it. {% endinfo_block %} diff --git a/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md similarity index 94% rename from docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md rename to docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 0bc0e5d813b..959e1c28c41 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -1,27 +1,27 @@ --- -title: How to send a request in Dynamic Data API -description: This guide shows how to send a request in Dynamic Data API. +title: How to send a request in Data Exchange API +description: This guide shows how to send a request in Data Exchange API. last_updated: June 23, 2023 template: howto-guide-template redirect_from: - - /docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html + - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html --- -This guide shows how to send a request in Dynamic Data API. +This guide shows how to send a request in Data Exchange API. {% info_block infoBox %} -Ensure the Dynamic Data API is integrated (follow [Dynamic Data API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/dynamic-data-api-integration.html)) -and configured (follow [How to configure Dynamic Data API](/docs/scos/dev/glue-api-guides/{{page.version}}/dynamic-data-api/how-to-guides/how-to-configure-dynamic-data-api.html)) +Ensure the Data Exchange API is integrated (follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html)) +and configured (follow [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html)) as described in the guides. {% endinfo_block %} Let's say you have an endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. -The Dynamic Data API is a non-resource-based API and routes directly to a controller all specified endpoints. +The Data Exchange API is a non-resource-based API and routes directly to a controller all specified endpoints. -By default, all routes within the Dynamic Data API are protected to ensure data security. +By default, all routes within the Data Exchange API are protected to ensure data security. To access the API, you need to obtain an access token by sending a POST request to the `/token/` endpoint with the appropriate credentials: ```bash @@ -472,4 +472,4 @@ Bellow you can find a list of error codes that you can receive when sending `GET | 1307 | The required field must not be empty. Field: `field` | The specified field is required according to the configuration. The field was not provided. Please check the data you are sending and try again. | | 1308 | Entity not found by identifier, and new identifier can not be persisted. Please update the request. | The entity could not be found using the provided identifier, and a new identifier cannot be persisted. Please update your request accordingly or check configuration for identifier field. | | 1309 | Failed to persist the data. Please verify the provided data and try again. Entry is duplicated. | Failed to persist the data. Please verify the provided data and try again. This error may occur if a record with the same information already exists in the database. | -| 1310 | Incomplete Request - missing identifier. | The request is incomplete. The identifier is missing. Please check the request and try again. | \ No newline at end of file +| 1310 | Incomplete Request - missing identifier. | The request is incomplete. The identifier is missing. Please check the request and try again. | diff --git a/docs/scos/dev/glue-api-guides/202307.0/old-glue-infrastructure/glue-infrastructure.md b/docs/scos/dev/glue-api-guides/202307.0/old-glue-infrastructure/glue-infrastructure.md index 5cb61e38ec9..5c38ff1a17a 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/old-glue-infrastructure/glue-infrastructure.md +++ b/docs/scos/dev/glue-api-guides/202307.0/old-glue-infrastructure/glue-infrastructure.md @@ -431,7 +431,7 @@ In addition to HTTP Status codes, Glue can return additional error codes to dist | 1001-1099 | Guest Cart API | | 1101-1199 | Checkout API| | 1201-1299| Product Labels API | -| 1301-1399| Dynamic Data API | +| 1301-1399| Data Exchange API | ### Data formatting diff --git a/docs/scos/user/intro-to-spryker/docs-release-notes.md b/docs/scos/user/intro-to-spryker/docs-release-notes.md index 06bf2694e7c..24fcdf3a481 100644 --- a/docs/scos/user/intro-to-spryker/docs-release-notes.md +++ b/docs/scos/user/intro-to-spryker/docs-release-notes.md @@ -28,7 +28,7 @@ In July 2023, we have added and updated the following pages: - [Security Release Notes 202306.0](/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-202306.0/security-release-notes-202306.0.html): Added missing security HTTP headers. - [Merchant Users Overview](/docs/pbc/all/merchant-management/202212.0/marketplace/marketplace-merchant-feature-overview/merchant-users-overview.html): Added information about the assignment of groups for the merchant user. - [Handle data with Publish and Synchronization](/docs/scos/dev/back-end-development/data-manipulation/data-publishing/handle-data-with-publish-and-synchronization.html): Publish and Synchronization (P&S) lets you export data from Spryker backend (Zed) to external endpoints. -- [How send a request in Dynamic Data API](/docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-send-request-in-dynamic-data-api.html): Added error codes and error code descriptions. +- [How send a request in Data Exchange API](/docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html): Added error codes and error code descriptions. - [Install the Spryker Core feature](/docs/pbc/all/miscellaneous/202307.0/install-and-upgrade/install-features/install-the-spryker-core-feature.html): Updated code sample. - [Install Docker prerequisites on Linux](/docs/scos/dev/set-up-spryker-locally/install-spryker/install-docker-prerequisites/install-docker-prerequisites-on-linux.html): Learn about the steps you need to take before you can start working with Spryker in Docker on Linux. - [Payment Service Provider](/docs/pbc/all/payment-service-provider/202212.0/payment-service-provider.html): Different payment methods for your shop. From 915e81a10e7aee1af28f9596f6438597ea1f4d8f Mon Sep 17 00:00:00 2001 From: Olha Livitchuk Date: Mon, 28 Aug 2023 15:22:07 +0200 Subject: [PATCH 02/44] FRW-2211 minor adjustments --- .../data-exchange-api-integration.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md index 7b013a08cd1..a228c4c6fe3 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md @@ -410,6 +410,19 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe ``` +{% info_block infoBox "Info" %} + +Note, that `DocumentationGeneratorApiDependencyProvider::getInvalidationVoterPlugins()` stack contains plugins that are used to invalidate the documentation cache. +If the documentation cache is not invalidated, the documentation will not be updated. + +{% endinfo_block %} + +```bash +console navigation:build-cache +``` + +{% endinfo_block %} +
src/Pyz/Glue/DocumentationGeneratorOpenApi/DocumentationGeneratorOpenApiDependencyProvider.php @@ -468,7 +481,7 @@ If everything is set up correctly, you can operate with the data. Follow this li {% endinfo_block %} -### Configure Jenkins: +### Configure Scheduler: 1. Adjust the scheduler project configuration: From 3819f884f8b25cf900ab23baaf13b1d6b581140f Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 4 Sep 2023 10:59:56 +0300 Subject: [PATCH 03/44] Update data-exchange-api-integration.md --- .../data-exchange-api-integration.md | 47 ++++++++----------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md index a228c4c6fe3..9715fc985c5 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md @@ -1,22 +1,16 @@ --- -title: Data Exchange API integration -description: Integrate the Data Exchange API into a Spryker project. +title: Install Data Exchange API +description: Learn how to install Data Exchange API last_updated: June 22, 2023 template: feature-integration-guide-template -redirect_from: +redirect_from: - /docs/scos/dev/feature-integration-guides/202304.0/glue-api/data-exchange-api/data-exchange-api-integration.html - /docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api-integration.html --- -This document describes how to integrate the Data Exchange API into a Spryker project. +This document describes how to install Data Exchange API. ---- - -The Data Exchange API is a powerful tool that allows seamless interaction with your database. - -You can easily access your data by sending requests to the API endpoint. - -It enables you to retrieve, create, update, and manage data in a flexible and efficient manner. +Data Exchange API is a powerful tool that enables seamless interaction with your database. You can easily access your data by sending requests to the API endpoint. It lets you retrieve, create, update, and manage data in a flexible and efficient manner. ## Install feature core @@ -31,9 +25,9 @@ To start feature integration, install the necessary features: | Glue Backend Api Application | {{page.version}} | [Glue API - Glue Storefront and Backend API applications integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-glue-storefront-and-backend-api-applications-integration.html) | | Glue Authentication | {{page.version}} | [Glue API - Authentication integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/glue-api-authentication-integration.html) | -### Install the required modules using Composer +### Install the required modules -Install the required modules: +Install the required modules using Composer: ```bash composer require spryker/dynamic-entity-backend-api:"^0.1.0" spryker/dynamic-entity-gui:"^0.1.0" --update-with-dependencies @@ -53,7 +47,7 @@ Make sure that the following modules have been installed: ### Set up the configuration -1. Move the following commands into `setup-glue` section after `demodata` step: +1. Move the following commands into `setup-glue` section after the `demodata` step: **config/install/docker.yml** @@ -66,8 +60,7 @@ setup-glue: command: 'vendor/bin/glue api:generate:documentation' ``` -2. By default, requests are sent to `/dynamic-entity/{entity-alias}`. - Adjust `DynamicEntityBackendApiConfig` in order to replace `dynamic-entity` part with another one: +2. By default, requests are sent to `/dynamic-entity/{entity-alias}`. To replace the `dynamic-entity` part of the endpoint, adjust `DynamicEntityBackendApiConfig`: **src/Pyz/Glue/DynamicEntityBackendApi/DynamicEntityBackendApiConfig.php** @@ -95,8 +88,8 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` -3. The Data Exchange API provides a logging mechanism to capture important information about requests and any thrown exceptions. - Logging is enabled by default. Adjust `DynamicEntityBackendApiConfig` in order to disable this option or change the path for the log file. +3. Optional: Data Exchange API provides a logging mechanism to capture important information about requests and any thrown exceptions. + Logging is enabled by default. To disable logging or change the path of the log file, adjust `DynamicEntityBackendApiConfig`: **src/Pyz/Glue/DynamicEntityBackendApi/DynamicEntityBackendApiConfig.php** @@ -137,10 +130,10 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` -4. The Data Exchange API comes with an exclusion list of database schemas that are not allowed to be configured. +4. The Data Exchange API comes with an exclusion list of database schemas that are not allowed to be configured. Notably, the `spy_dynamic_entity_configuration` schema is excluded by default. Adjust `DynamicEntityGuiConfig` in order to exclude database schemas from configuring: - + **src/Pyz/Zed/DynamicEntityGui/DynamicEntityGuiConfig.php** ```php @@ -192,7 +185,7 @@ Ensure the following transfers have been created: | TRANSFER | TYPE | EVENT | PATH | | --- | --- | --- | --- | -| ApiApplicationSchemaContext | class | created | src/Generated/Shared/Transfer/ApiApplicationSchemaContextTransfer.php | +| ApiApplicationSchemaContext | class | created | src/Generated/Shared/Transfer/ApiApplicationSchemaContextTransfer.php | | CriteriaRangeFilter | class | created | src/Generated/Shared/Transfer/CriteriaRangeFilterTransfer.php | | DocumentationInvalidationVoterRequest | class | created | src/Generated/Shared/Transfer/DocumentationInvalidationVoterRequestTransfer.php | | DynamicApiDefinition | class | created | src/Generated/Shared/Transfer/DynamicApiDefinitionTransfer.php | @@ -312,7 +305,7 @@ Add Dynamic Exchange API section to `navigation.xml`: Run the following console command to update navigation cache: ```bash -console navigation:build-cache +console navigation:build-cache ``` {% endinfo_block %} @@ -386,7 +379,7 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe * @var string */ protected const GLUE_BACKEND_API_APPLICATION_NAME = 'backend'; - + /** * @param \Spryker\Glue\DocumentationGeneratorApi\Expander\ContextExpanderCollectionInterface $contextExpanderCollection * @@ -396,7 +389,7 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe { $contextExpanderCollection->addExpander(new DynamicEntityApiSchemaContextExpanderPlugin(), [static::GLUE_BACKEND_API_APPLICATION_NAME]); } - + /** * @return array<\Spryker\Glue\DocumentationGeneratorApiExtension\Dependency\Plugin\DocumentationInvalidationVoterPluginInterface> */ @@ -415,10 +408,10 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe Note, that `DocumentationGeneratorApiDependencyProvider::getInvalidationVoterPlugins()` stack contains plugins that are used to invalidate the documentation cache. If the documentation cache is not invalidated, the documentation will not be updated. -{% endinfo_block %} +{% endinfo_block %} ```bash -console navigation:build-cache +console navigation:build-cache ``` {% endinfo_block %} @@ -512,5 +505,3 @@ Make sure that you've set up the configuration: 2. Make sure that `src\Generated\GlueBackend\Specification\spryker_backend_api.schema.yml` was generated and contains the corresponding endpoint with correct configurations. {% endinfo_block %} - - From 67ef416be0e40c679d48a61d6dd2d548a2327257 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 4 Sep 2023 15:57:41 +0300 Subject: [PATCH 04/44] rename --- ...on.md => install-the-data-exchange-api.md} | 55 +++++++------------ 1 file changed, 21 insertions(+), 34 deletions(-) rename docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/{data-exchange-api-integration.md => install-the-data-exchange-api.md} (87%) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md similarity index 87% rename from docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md rename to docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md index 9715fc985c5..d10b4cdddc3 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/data-exchange-api-integration.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md @@ -1,6 +1,6 @@ --- -title: Install Data Exchange API -description: Learn how to install Data Exchange API +title: Install the Data Exchange API +description: Learn how to install the Data Exchange API last_updated: June 22, 2023 template: feature-integration-guide-template redirect_from: @@ -8,9 +8,9 @@ redirect_from: - /docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api-integration.html --- -This document describes how to install Data Exchange API. +This document describes how to install the Data Exchange API. -Data Exchange API is a powerful tool that enables seamless interaction with your database. You can easily access your data by sending requests to the API endpoint. It lets you retrieve, create, update, and manage data in a flexible and efficient manner. +Data Exchange API is a powerful tool that enables seamless interaction with databases. You can easily access data by sending requests to a dedicated API endpoint. It lets you retrieve, create, update, and manage data in a flexible and efficient manner. ## Install feature core @@ -18,7 +18,7 @@ Follow the steps below to install the Data Exchange API core. ### Prerequisites -To start feature integration, install the necessary features: +Install the required features: | NAME | VERSION | INTEGRATION GUIDE | | --- | --- | --- | @@ -47,7 +47,7 @@ Make sure that the following modules have been installed: ### Set up the configuration -1. Move the following commands into `setup-glue` section after the `demodata` step: +1. Move the following commands into the `setup-glue` section after the `demodata` step: **config/install/docker.yml** @@ -88,7 +88,7 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` -3. Optional: Data Exchange API provides a logging mechanism to capture important information about requests and any thrown exceptions. +3. Optional: The Data Exchange API provides a logging mechanism to capture important information about requests and thrown exceptions. Logging is enabled by default. To disable logging or change the path of the log file, adjust `DynamicEntityBackendApiConfig`: **src/Pyz/Glue/DynamicEntityBackendApi/DynamicEntityBackendApiConfig.php** @@ -130,9 +130,7 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` -4. The Data Exchange API comes with an exclusion list of database schemas that are not allowed to be configured. - Notably, the `spy_dynamic_entity_configuration` schema is excluded by default. - Adjust `DynamicEntityGuiConfig` in order to exclude database schemas from configuring: +4. Optional: The Data Exchange API comes with an exclusion list of database schemas that are not allowed to be configured. The `spy_dynamic_entity_configuration` schema is excluded by default. To exclude other database schemas from configuring, adjust `DynamicEntityGuiConfig`: **src/Pyz/Zed/DynamicEntityGui/DynamicEntityGuiConfig.php** @@ -173,7 +171,7 @@ console transfer:generate {% info_block warningBox "Verification" %} -Ensure that you've triggered the following changes by checking the database: +Make sure you've triggered the following changes by checking the database: | DATABASE ENTITY | TYPE | | --- | --- | @@ -219,7 +217,7 @@ Ensure the following transfers have been created: ### Add translations -Append the glossary according to your language configuration: +1. Append the glossary according to your language configuration: **src/data/import/glossary.csv** @@ -246,25 +244,21 @@ dynamic_entity.validation.missing_identifier,"Incomplete Request - missing ident dynamic_entity.validation.missing_identifier,"Unvollständige Anforderung - fehlende ID",de_DE ``` -{% info_block infoBox "Info" %} - -Run the following console command to import data: +2. Import data: ```bash console data:import glossary ``` -{% endinfo_block %} - {% info_block warningBox "Verification" %} -Make sure that the configured data in the database has been added to the `spy_glossary` table. +Make sure the configured data has been added to the `spy_glossary` database table. {% endinfo_block %} ### Configure navigation -Add Dynamic Exchange API section to `navigation.xml`: +1. Add the Dynamic Exchange API section to `navigation.xml`: **config/Zed/navigation.xml** @@ -300,19 +294,16 @@ Add Dynamic Exchange API section to `navigation.xml`: ``` -{% info_block infoBox "Info" %} -Run the following console command to update navigation cache: +2. Update the navigation cache: ```bash console navigation:build-cache ``` -{% endinfo_block %} - {% info_block warningBox "Verification" %} -Make sure that the Data Exchange API section has been added to the navigation list in the Backoffice. +Make sure the Data Exchange API section has been added to the Backoffice navigation. {% endinfo_block %} @@ -324,10 +315,10 @@ Enable the following behaviors by registering the plugins: | --- | --- | --- | | PropelApplicationPlugin | Initializes `PropelOrm`. | Spryker\Zed\Propel\Communication\Plugin\Application | | DynamicEntityApiSchemaContextExpanderPlugin | Adds dynamic entities to the documentation generation context. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi | -| DynamicEntityDocumentationInvalidationVoterPlugin | Checks if dynamic entity configuration was changed within the provided interval. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi | +| DynamicEntityDocumentationInvalidationVoterPlugin | Checks if the dynamic entity configuration was changed within the provided interval. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorApi | | DynamicEntityOpenApiSchemaFormatterPlugin | Formats dynamic entities of the Open API 3 schema: info, components, paths, tags. | Spryker\Glue\DynamicEntityBackendApi\Plugin\DocumentationGeneratorOpenApi | | DynamicEntityRouteProviderPlugin | Adds routes for the provided dynamic entity to the RouteCollection. | Spryker\Glue\DynamicEntityBackendApi\Plugin | -| DynamicEntityProtectedPathCollectionExpanderPlugin | Expands a list of protected endpoints with dynamic entity endpoints. | Spryker\Glue\DynamicEntityBackendApi\Plugin\GlueBackendApiApplicationAuthorizationConnector | +| DynamicEntityProtectedPathCollectionExpanderPlugin | Expands the list of protected endpoints with dynamic entity endpoints. | Spryker\Glue\DynamicEntityBackendApi\Plugin\GlueBackendApiApplicationAuthorizationConnector |
src/Pyz/Glue/Console/ConsoleDependencyProvider.php @@ -405,7 +396,7 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe {% info_block infoBox "Info" %} -Note, that `DocumentationGeneratorApiDependencyProvider::getInvalidationVoterPlugins()` stack contains plugins that are used to invalidate the documentation cache. +The `DocumentationGeneratorApiDependencyProvider::getInvalidationVoterPlugins()` stack contains plugins that are used to invalidate the documentation cache. If the documentation cache is not invalidated, the documentation will not be updated. {% endinfo_block %} @@ -414,8 +405,6 @@ If the documentation cache is not invalidated, the documentation will not be upd console navigation:build-cache ``` -{% endinfo_block %} -
src/Pyz/Glue/DocumentationGeneratorOpenApi/DocumentationGeneratorOpenApiDependencyProvider.php @@ -470,7 +459,7 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA {% info_block warningBox "Verification" %} -If everything is set up correctly, you can operate with the data. Follow this link to discover how to perform it:[How to send request in Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) +Make sure you can operate data. For instructions, see :[Requesting data using the Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) {% endinfo_block %} @@ -499,9 +488,7 @@ vendor/bin/console scheduler:resume {% info_block warningBox "Verification" %} -Make sure that you've set up the configuration: - -1. Configure at least one entity in `spy_dynamic_entity_configuration`. In order to do that follow the link [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). -2. Make sure that `src\Generated\GlueBackend\Specification\spryker_backend_api.schema.yml` was generated and contains the corresponding endpoint with correct configurations. +1. Configure at least one entity in `spy_dynamic_entity_configuration`. For instructions, see [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). +2. Make sure `src\Generated\GlueBackend\Specification\spryker_backend_api.schema.yml` has been generated and contains the corresponding endpoint with correct configurations. {% endinfo_block %} From f8cd4c520daa8256f687255fbf0ee0d318a73701 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 4 Sep 2023 17:34:47 +0300 Subject: [PATCH 05/44] Update how-to-configure-data-exchange-api.md --- .../how-to-configure-data-exchange-api.md | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 807f8ba7d4f..299f0ebb548 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -3,14 +3,13 @@ title: How to configure Data Exchange API endpoints. description: This guide shows how to configure the Data Exchange API endpoints. last_updated: June 23, 2023 template: howto-guide-template -redirect_from: +redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html --- -This guide shows how to configure the Data Exchange API endpoints. +This guide shows how to configure the Data Exchange API endpoints by executing SQL queries. -In order to incorporate a new endpoint for interacting with entities in the database, -it is necessary to add a corresponding row to the `spy_dynamic_entity_configuration` table. +To incorporate a new endpoint for interacting with entities in the database, it is necessary to add a corresponding row to the `spy_dynamic_entity_configuration` table. The `spy_dynamic_entity_configuration` table represents the configuration for dynamic entity endpoints in the system. It has the following columns: @@ -21,19 +20,12 @@ The `spy_dynamic_entity_configuration` table represents the configuration for dy | table_name | The name of the corresponding table in the database to operate on. | | is_active | Indicates whether the endpoint is enabled or disabled. | | definition | A JSON-formatted string containing the configuration details for each field in the table. | -| created_at | Represents the date and time when the configuration was created. | -| updated_at | Represents the date and time when the configuration was last updated. | - -{% info_block infoBox %} - -Currently, the process entails manually executing SQL queries as there is no existing user interface (UI) feature in Spryker for it. -However, future releases are expected to introduce an UI solution for adding new rows to the `spy_dynamic_entity_configuration` table. - -{% endinfo_block %} +| created_at | Date and time when the configuration was created. | +| updated_at | Date and time when the configuration was last updated. | Let's dive deeper into the configuration of the `spy_dynamic_entity_definition.definition` field. -Below is an example snippet illustrating the structure of a possible definition value based on `spy_country` table: +The following example shows the structure of a possible definition value based on the `spy_country` table: ```json { @@ -49,10 +41,10 @@ Below is an example snippet illustrating the structure of a possible definition "isRequired": false } }, - { + { "fieldName": "iso2_code", "fieldVisibleName": "iso2_code", - "type": "string", + "type": "string", "isEditable": true, "isCreatable": true, "validation": { @@ -65,14 +57,14 @@ Below is an example snippet illustrating the structure of a possible definition } ``` -And now, let's delve into the meaning of each field within the snippet. Here's a breakdown of the purpose of each field: +The following table describes the purpose of each field: | FIELD | SPECIFICATION | | --- | --- | | identifier | The name of the column in the table that serves as an identifier. It can be any chosen column from the table, typically used as a unique ID for each record. | -| fields | An array containing the descriptions of the columns from the table. It allows customization of which columns are included for interaction. By specifying the desired columns in the "fields" array, the API will only expose and operate on those specific columns. Any columns not included in the array will be inaccessible through API requests. | -| fieldName | The actual name of the column in the database table. | -| fieldVisibleName | The name used for interacting with the field through API requests. It provides a more user-friendly and descriptive name compared to the physical column name. | +| fields | An array containing the descriptions of the columns from the table. It defines the columns that are included for interaction. The API exposes and operates on the included columns. Columns that are not included in the array are inaccessible through API requests. | +| fieldName | The name of the column in the database table. | +| fieldVisibleName | The name used for interacting with the field through API requests. It's a more user-friendly and descriptive name compared to the physical column name. | | type | The data type of the field. It specifies the expected data format for the field, enabling proper validation and handling of values during API interactions. | | isEditable | A flag indicating whether the field can be modified. When set to "true," the field is editable, allowing updates to its value. | | isCreatable | A flag indicating whether the field can be set. If set to "true," the field can be included in requests to provide an initial value during record creation. | @@ -89,9 +81,9 @@ It is recommended to set `isEditable` and `isCreatable` to `false` for fields th {% info_block infoBox %} -When configuring the definition for the field responsible for the numerable values, keep in mind that an integer data type is a non-decimal number -between -2147483648 and 2147483647 in 32-bit systems, and between -9223372036854775808 and 9223372036854775807 in 64-bit systems. -However, if there is a need to use values outside this range or if the person providing the configuration anticipates +When configuring the definition for the field responsible for the numerable values, keep in mind that an integer data type is a non-decimal number +between -2147483648 and 2147483647 in 32-bit systems, and between -9223372036854775808 and 9223372036854775807 in 64-bit systems. +However, if there is a need to use values outside this range or if the person providing the configuration anticipates larger values, the field can be set as a string type instead. {% endinfo_block %} @@ -114,7 +106,7 @@ Then you need to select a configurable table in the form below. In our case it i {% info_block infoBox %} -Note, that you can only select tables that are not excluded from configuring. +Note, that you can only select tables that are not excluded from configuring. In order to exclude a table from configuring follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html). {% endinfo_block %} From dadba5f6f8f6e6597f717afb13facc31e78d1353 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Tue, 5 Sep 2023 10:18:18 +0300 Subject: [PATCH 06/44] Update how-to-configure-data-exchange-api.md --- .../how-to-configure-data-exchange-api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 299f0ebb548..a3695572bf2 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -7,15 +7,15 @@ redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html --- -This guide shows how to configure the Data Exchange API endpoints by executing SQL queries. +This document describes how to configure the Data Exchange API endpoints by executing SQL queries. -To incorporate a new endpoint for interacting with entities in the database, it is necessary to add a corresponding row to the `spy_dynamic_entity_configuration` table. +To create an endpoint for interacting with entities in the database, you need to add a corresponding row to the `spy_dynamic_entity_configuration` table. -The `spy_dynamic_entity_configuration` table represents the configuration for dynamic entity endpoints in the system. It has the following columns: +The `spy_dynamic_entity_configuration` table contains the configuration of dynamic entity endpoints and has the following columns: | COLUMN | SPECIFICATION | | --- | --- | -| id_dynamic_entity_configuration | The unique ID for the configuration. | +| id_dynamic_entity_configuration | The unique ID of the configuration. | | table_alias | An alias used in the request URL to refer to the endpoint. | | table_name | The name of the corresponding table in the database to operate on. | | is_active | Indicates whether the endpoint is enabled or disabled. | @@ -23,7 +23,7 @@ The `spy_dynamic_entity_configuration` table represents the configuration for dy | created_at | Date and time when the configuration was created. | | updated_at | Date and time when the configuration was last updated. | -Let's dive deeper into the configuration of the `spy_dynamic_entity_definition.definition` field. +Dive deeper into the configuration of the `spy_dynamic_entity_definition.definition` field. The following example shows the structure of a possible definition value based on the `spy_country` table: From e546ab507a0ecbc2e05acefe3914a6a4e7f0540b Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Tue, 5 Sep 2023 10:25:08 +0300 Subject: [PATCH 07/44] Update how-to-configure-data-exchange-api.md --- .../how-to-guides/how-to-configure-data-exchange-api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index a3695572bf2..0fae4728afb 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -66,11 +66,11 @@ The following table describes the purpose of each field: | fieldName | The name of the column in the database table. | | fieldVisibleName | The name used for interacting with the field through API requests. It's a more user-friendly and descriptive name compared to the physical column name. | | type | The data type of the field. It specifies the expected data format for the field, enabling proper validation and handling of values during API interactions. | -| isEditable | A flag indicating whether the field can be modified. When set to "true," the field is editable, allowing updates to its value. | -| isCreatable | A flag indicating whether the field can be set. If set to "true," the field can be included in requests to provide an initial value during record creation. | +| isEditable | Defines if the field's value can be changed. | +| isCreatable | Defines if the field can be included in requests to provide an initial value during record creation. | | validation | Contains validation configurations. Proper validation ensures that the provided data meets the specified criteria. | -| required | A validation attribute that determines whether the field is required or optional. When set to "true," the field must be provided in API requests. | -| maxLength/minLength | An optional validation attribute that specifies the minimum/maximum length allowed for the field defined with a string type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | +| required | Defines if the field must be provided in API requests. | +| maxLength/minLength | Defines the minimum/maximum length allowed for the field with a string type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | | max/min | An optional validation attribute that specifies the minimum/maximum value allowed for the field defined with an integer type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | {% info_block infoBox %} From 2f26f09a488b47ce806ce07d33dec78a9757547e Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Tue, 5 Sep 2023 10:34:05 +0300 Subject: [PATCH 08/44] Update how-to-configure-data-exchange-api.md --- .../how-to-guides/how-to-configure-data-exchange-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 0fae4728afb..713f8b35451 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -71,11 +71,11 @@ The following table describes the purpose of each field: | validation | Contains validation configurations. Proper validation ensures that the provided data meets the specified criteria. | | required | Defines if the field must be provided in API requests. | | maxLength/minLength | Defines the minimum/maximum length allowed for the field with a string type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | -| max/min | An optional validation attribute that specifies the minimum/maximum value allowed for the field defined with an integer type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | +| max/min | Defines the minimum/maximum value allowed for the field with an integer type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. Optional. | {% info_block infoBox %} -It is recommended to set `isEditable` and `isCreatable` to `false` for fields that serve as identifiers or keys, ensuring their immutability and preserving the integrity of the data model. +We recommend setting `isEditable` and `isCreatable` to `false` for fields that serve as identifiers or keys, ensuring their immutability and preserving the integrity of the data model. {% endinfo_block %} From e080a5cc047256169b99b560bcc98d026a3d3613 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Tue, 5 Sep 2023 11:01:02 +0300 Subject: [PATCH 09/44] Update how-to-configure-data-exchange-api.md --- .../how-to-configure-data-exchange-api.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 713f8b35451..bba9d4e5251 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -1,5 +1,5 @@ --- -title: How to configure Data Exchange API endpoints. +title: Configure Data Exchange API endpoints description: This guide shows how to configure the Data Exchange API endpoints. last_updated: June 23, 2023 template: howto-guide-template @@ -9,6 +9,8 @@ redirect_from: This document describes how to configure the Data Exchange API endpoints by executing SQL queries. +## Configuration of Data Exchange API endpoints + To create an endpoint for interacting with entities in the database, you need to add a corresponding row to the `spy_dynamic_entity_configuration` table. The `spy_dynamic_entity_configuration` table contains the configuration of dynamic entity endpoints and has the following columns: @@ -73,34 +75,32 @@ The following table describes the purpose of each field: | maxLength/minLength | Defines the minimum/maximum length allowed for the field with a string type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | | max/min | Defines the minimum/maximum value allowed for the field with an integer type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. Optional. | -{% info_block infoBox %} -We recommend setting `isEditable` and `isCreatable` to `false` for fields that serve as identifiers or keys, ensuring their immutability and preserving the integrity of the data model. +{% info_block infoBox %} -{% endinfo_block %} +* We recommend setting `isEditable` and `isCreatable` to `false` for fields that serve as identifiers or keys, ensuring their immutability and preserving the integrity of the data model. -{% info_block infoBox %} +* For the fields with numerable values, an integer data type is a non-decimal number between -2147483648 and 2147483647 in 32-bit systems and, in 64-bit systems, between -9223372036854775808 and 9223372036854775807. If you need or anticipate values outside of this range, you can set the value as a string type. -When configuring the definition for the field responsible for the numerable values, keep in mind that an integer data type is a non-decimal number -between -2147483648 and 2147483647 in 32-bit systems, and between -9223372036854775808 and 9223372036854775807 in 64-bit systems. -However, if there is a need to use values outside this range or if the person providing the configuration anticipates -larger values, the field can be set as a string type instead. +* The Data Exchange API supports the following types for the configured fields: + * boolean + * integer + * string + * decimal {% endinfo_block %} -{% info_block infoBox %} - -So far the Data Exchange API supports the following types for the configured fields: boolean, integer, string and decimal. +## Create Data Exchange API endpoints -{% endinfo_block %} +In this example, we are creating the `/dynamic-data/country` endpoint to operate with data in the `spy_country` table. When following the steps, adjust the data per your requirements: -Let's say you want to have a new endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. -In order to configure the endpoint, you need to go to Data Exchange API section in Backoffice and click on "Create Data Exchange API configuration" button. +1. In the Back Office, go to **Data Exchange API Configuration**. +2. On the **Data Exchange API Configuration** page, click **Create Data Exchange API configuration**. [PASTE SCREENSHOT HERE] -Then you need to select a configurable table in the form below. In our case it is `spy_country`: +3. Then you need to select a configurable table in the form below. In our case it is `spy_country`: [PASTE SCREENSHOT HERE] From ad9604ce9b250dc14db5ebe018c8dd642d1e33eb Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 6 Sep 2023 10:32:48 +0300 Subject: [PATCH 10/44] Update how-to-configure-data-exchange-api.md --- .../how-to-configure-data-exchange-api.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index bba9d4e5251..d9494534b1a 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -11,7 +11,7 @@ This document describes how to configure the Data Exchange API endpoints by exec ## Configuration of Data Exchange API endpoints -To create an endpoint for interacting with entities in the database, you need to add a corresponding row to the `spy_dynamic_entity_configuration` table. +To create an endpoint for interacting with entities in the database, you need to add a corresponding row in the `spy_dynamic_entity_configuration` table. The `spy_dynamic_entity_configuration` table contains the configuration of dynamic entity endpoints and has the following columns: @@ -100,14 +100,13 @@ In this example, we are creating the `/dynamic-data/country` endpoint to operate [PASTE SCREENSHOT HERE] -3. Then you need to select a configurable table in the form below. In our case it is `spy_country`: +3. In **CREATE DATA EXCHANGE API CONFIGURATION** pane, select a **TABLE NAME**. In our example, it's `spy_country`. [PASTE SCREENSHOT HERE] {% info_block infoBox %} -Note, that you can only select tables that are not excluded from configuring. -In order to exclude a table from configuring follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html). +You can only select the tables that are not excluded from configuring. To exclude a table from configuring, follow [Install the Data Exchange API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html). {% endinfo_block %} @@ -121,8 +120,8 @@ Note, that you have to enable the endpoint in order to be able to use it. And be {% endinfo_block %} -After you click "Save" button, you will see a new endpoint in the list of endpoints in Data Exchange API section in Backoffice. -And you will be able to send request to it. +Click **Save**. +This opens the **Data Exchange API Configuration** page with the endpoint displayed in the list. Now you can send requests to this endpoint. {% info_block warningBox "Verification" %} From 952978cedb7f9d76155fa4f22ceb4a2ab7a1dc7f Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 6 Sep 2023 11:00:45 +0300 Subject: [PATCH 11/44] Update how-to-send-request-in-data-exchange-api.md --- ...ow-to-send-request-in-data-exchange-api.md | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 959e1c28c41..6aa9213ddc0 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -9,17 +9,14 @@ redirect_from: This guide shows how to send a request in Data Exchange API. -{% info_block infoBox %} - -Ensure the Data Exchange API is integrated (follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html)) -and configured (follow [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html)) -as described in the guides. +## Prerequisites -{% endinfo_block %} +* [Install the Data Exchange API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html) +* [Configure the Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html) Let's say you have an endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. -The Data Exchange API is a non-resource-based API and routes directly to a controller all specified endpoints. +The Data Exchange API is a non-resource-based API and routes all specified endpoints directly to a controller. By default, all routes within the Data Exchange API are protected to ensure data security. To access the API, you need to obtain an access token by sending a POST request to the `/token/` endpoint with the appropriate credentials: @@ -36,12 +33,12 @@ grant_type=password&username={username}&password={password} ### Sending a `GET` request -To retrieve a collection of countries, a `GET` request should be sent to the `/dynamic-entity/country` endpoint. +To retrieve a collection of countries, a `GET` request should be sent to the `/dynamic-entity/country` endpoint. This request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. -The response body will contain all the columns from the `spy_country` table that have been configured in the `spy_dynamic_entity_definition.definition`. +The response body will contain all the columns from the `spy_country` table that have been configured in the `spy_dynamic_entity_definition.definition`. Each column will be represented using the `fieldVisibleName` as the key, providing a comprehensive view of the table's data in the API response. - + Pagination allows for efficient data retrieval by specifying the desired range of results. To implement pagination, include the desired page limit and offset in the request: @@ -210,9 +207,9 @@ The response payload includes all the specified fields from the request body, al {% info_block infoBox %} -Note that all fields included in the request payload are marked as `isCreatable: true` in the configuration. -Therefore, the API will create a new record with all the provided fields. -However, if any of the provided fields are configured as `isCreatable: false` it will result in an error. +Note that all fields included in the request payload are marked as `isCreatable: true` in the configuration. +Therefore, the API will create a new record with all the provided fields. +However, if any of the provided fields are configured as `isCreatable: false` it will result in an error. Let's configure `isCreatable: false` for `iso3_code` and send the same request. You will receive the following error response because a non-creatable field `iso3_code` is provided: @@ -233,9 +230,9 @@ You will receive the following error response because a non-creatable field `iso It is important to consider that certain database-specific configurations may result in issues independent of entity configurations. -For instance, in the case of MariaDB, it is not possible to set the ID value for an auto-incremented field. -Additionally, for the `iso2_code` field in the `spy_country` table, it must have a unique value. -Therefore, before creating a new record, it is necessary to verify that you do not pass a duplicated value for this field. +For instance, in the case of MariaDB, it is not possible to set the ID value for an auto-incremented field. +Additionally, for the `iso2_code` field in the `spy_country` table, it must have a unique value. +Therefore, before creating a new record, it is necessary to verify that you do not pass a duplicated value for this field. Otherwise, you will receive the following response: ```json @@ -248,7 +245,7 @@ Otherwise, you will receive the following response: ] ``` -This response is caused by a caught Propel exception, specifically an integrity constraint violation `(Integrity constraint violation: 1062 Duplicate entry 'WA' for key 'spy_country-iso2_code')`. +This response is caused by a caught Propel exception, specifically an integrity constraint violation `(Integrity constraint violation: 1062 Duplicate entry 'WA' for key 'spy_country-iso2_code')`. {% endinfo_block %} @@ -368,7 +365,7 @@ If `id_country` is not found you will get the following response: {% info_block infoBox %} -Similarly to the `POST` request, it is important to consider database-specific configurations when sending a `PATCH` request. +Similarly to the `POST` request, it is important to consider database-specific configurations when sending a `PATCH` request. {% endinfo_block %} @@ -467,9 +464,9 @@ Bellow you can find a list of error codes that you can receive when sending `GET | 1302 | Failed to persist the data. Please verify the provided data and try again. | The data could not be persisted in the database. Please verify the provided data entities and try again. | | 1303 | The entity could not be found in the database. | The requested entity could not be found in the database for retrieval or update. | | 1304 | Modification of immutable field `field` is prohibited. | The field is prohibited from being modified. Please check the configuration for this field. | -| 1305 | Invalid data type for field: `field` | The specified field has an incorrect type. Please check the configuration for this field and correct the value. | +| 1305 | Invalid data type for field: `field` | The specified field has an incorrect type. Please check the configuration for this field and correct the value. | | 1306 | Invalid data value for field: `field`, row number: `row`. Field rules: `validation rules`. | The error indicates a data row and a field that does not comply with the validation rules in the configuration. Here is an example of the error: `Invalid data value for field: id, row number: 2. Field rules: min: 0, max: 127`. | | 1307 | The required field must not be empty. Field: `field` | The specified field is required according to the configuration. The field was not provided. Please check the data you are sending and try again. | -| 1308 | Entity not found by identifier, and new identifier can not be persisted. Please update the request. | The entity could not be found using the provided identifier, and a new identifier cannot be persisted. Please update your request accordingly or check configuration for identifier field. | +| 1308 | Entity not found by identifier, and new identifier can not be persisted. Please update the request. | The entity could not be found using the provided identifier, and a new identifier cannot be persisted. Please update your request accordingly or check configuration for identifier field. | | 1309 | Failed to persist the data. Please verify the provided data and try again. Entry is duplicated. | Failed to persist the data. Please verify the provided data and try again. This error may occur if a record with the same information already exists in the database. | | 1310 | Incomplete Request - missing identifier. | The request is incomplete. The identifier is missing. Please check the request and try again. | From 24ef44935545f436d26a36e09358fbf1fd5cef79 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Thu, 7 Sep 2023 10:33:35 +0300 Subject: [PATCH 12/44] Update how-to-send-request-in-data-exchange-api.md --- ...ow-to-send-request-in-data-exchange-api.md | 68 ++++++------------- 1 file changed, 19 insertions(+), 49 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 6aa9213ddc0..6e040d4de4a 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -7,7 +7,7 @@ redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html --- -This guide shows how to send a request in Data Exchange API. +This guide shows how to send a request using the Data Exchange API. ## Prerequisites @@ -18,8 +18,7 @@ Let's say you have an endpoint `/dynamic-data/country` to operate with data in ` The Data Exchange API is a non-resource-based API and routes all specified endpoints directly to a controller. -By default, all routes within the Data Exchange API are protected to ensure data security. -To access the API, you need to obtain an access token by sending a POST request to the `/token/` endpoint with the appropriate credentials: +By default, all routes within the Data Exchange API are protected to ensure data security. To access the API, you need to obtain an access token by sending a POST request to the `/token/` endpoint with the appropriate credentials: ```bash POST /token/ HTTP/1.1 @@ -31,16 +30,12 @@ Content-Length: 67 grant_type=password&username={username}&password={password} ``` -### Sending a `GET` request +## Sending a `GET` request -To retrieve a collection of countries, a `GET` request should be sent to the `/dynamic-entity/country` endpoint. +To retrieve a collection of countries, you need to send the `GET https://glue.mysprykershop.com/dynamic-entity/country` request. This request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. -The response body will contain all the columns from the `spy_country` table that have been configured in the `spy_dynamic_entity_definition.definition`. -Each column will be represented using the `fieldVisibleName` as the key, providing a comprehensive view of the table's data in the API response. - -Pagination allows for efficient data retrieval by specifying the desired range of results. -To implement pagination, include the desired page limit and offset in the request: +Pagination allows for efficient data retrieval by specifying the desired range of results. To use pagination, include the desired page limit and offset in the request: ```bash GET /dynamic-entity/country?page[offset]=1&page[limit]=2 HTTP/1.1 @@ -50,9 +45,7 @@ Accept: application/json Authorization: Bearer {your_token} ``` -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: +Response sample: ```json [ @@ -75,16 +68,10 @@ If everything is set up correctly you will get the following response: ] ``` -{% endinfo_block %} - -{% info_block infoBox %} - -Note, by default the API `GET` request returns up to 20 records. +The response contains all the columns from the `spy_country` table that are configured in `spy_dynamic_entity_definition.definition`. Each column is represented using the `fieldVisibleName` as the key, providing a comprehensive view of the table's data in the API response. By default the API `GET` request returns up to 20 records. -{% endinfo_block %} -Filtering enables targeted data retrieval, refining the response to match the specified criteria. -To apply filtering to the results based on specific fields, include the appropriate filter parameter in the request: +Filtering enables targeted data retrieval, refining the response to match the specified criteria. To apply filtering to the results based on specific fields, include the appropriate filter parameter in the request: ```bash GET /dynamic-entity/country?filter[country.iso2_code]=AA HTTP/1.1 @@ -94,9 +81,7 @@ Accept: application/json Authorization: Bearer {your_token} ``` -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: +Response sample: ```json [ @@ -111,15 +96,13 @@ If everything is set up correctly you will get the following response: ] ``` -{% endinfo_block %} - {% info_block infoBox %} -Note, so far when you combine multiple filters in a single request, the system applies an "AND" condition to the retrieved results. +When you combine multiple filters in a single request, the system applies an `AND` condition to the retrieved results. {% endinfo_block %} -To retrieve a country by a specific ID, you can send a `GET` request with the following parameters: +To retrieve a country by a specific ID, send a `GET` request with the following parameters: ```bash GET /dynamic-entity/country/3 HTTP/1.1 @@ -128,9 +111,8 @@ Content-Type: application/json Accept: application/json Authorization: Bearer {your_token} ``` -{% info_block warningBox "Verification" %} -If everything is set up correctly you will get the following response: +Response sample: ```json [ @@ -145,11 +127,8 @@ If everything is set up correctly you will get the following response: ] ``` -{% endinfo_block %} -{% info_block infoBox %} - -Note if a current endpoint is not configured in `spy_dynamic_entity_configuration` and it's not found you'll get the following response: +If you send a request to an endpoint that's not configured in `spy_dynamic_entity_configuration`, the following is returned: ```json [ @@ -161,9 +140,8 @@ Note if a current endpoint is not configured in `spy_dynamic_entity_configuratio ] ``` -{% endinfo_block %} -### Sending `POST` request +## Sending `POST` request To create a collection of countries, submit the following HTTP request: @@ -186,9 +164,7 @@ Content-Length: 154 } ``` -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: +Response sample: ```json [ @@ -203,11 +179,9 @@ If everything is set up correctly you will get the following response: The response payload includes all the specified fields from the request body, along with the ID of the newly created entity. -{% endinfo_block %} - {% info_block infoBox %} -Note that all fields included in the request payload are marked as `isCreatable: true` in the configuration. +All fields included in the request payload are marked as `isCreatable: true` in the configuration. Therefore, the API will create a new record with all the provided fields. However, if any of the provided fields are configured as `isCreatable: false` it will result in an error. @@ -224,16 +198,12 @@ You will receive the following error response because a non-creatable field `iso ] ``` -{% endinfo_block %} - {% info_block infoBox %} -It is important to consider that certain database-specific configurations may result in issues independent of entity configurations. +Certain database-specific configurations may result in issues independent of entity configurations. -For instance, in the case of MariaDB, it is not possible to set the ID value for an auto-incremented field. -Additionally, for the `iso2_code` field in the `spy_country` table, it must have a unique value. -Therefore, before creating a new record, it is necessary to verify that you do not pass a duplicated value for this field. -Otherwise, you will receive the following response: +For instance, in case of MariaDB, it is impossible to set the ID value for an auto-incremented field. Additionally, for the `iso2_code` field in the `spy_country` table, it must have a unique value. Therefore, before creating a new record, you need to make sure you are not passing a duplicated value for this field. +Otherwise, the following response is returned: ```json [ From 3761a731e5af9e8246194a5c710c426225ef4455 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 11 Sep 2023 10:30:08 +0300 Subject: [PATCH 13/44] Update how-to-send-request-in-data-exchange-api.md --- ...ow-to-send-request-in-data-exchange-api.md | 72 +++++-------------- 1 file changed, 19 insertions(+), 53 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 6e040d4de4a..27b416bb62a 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -141,7 +141,7 @@ If you send a request to an endpoint that's not configured in `spy_dynamic_entit ``` -## Sending `POST` request +## Sending `POST` requests To create a collection of countries, submit the following HTTP request: @@ -164,7 +164,7 @@ Content-Length: 154 } ``` -Response sample: +The response payload includes all the specified fields from the request body, along with the ID of the created entity. Response sample: ```json [ @@ -177,16 +177,11 @@ Response sample: ] ``` -The response payload includes all the specified fields from the request body, along with the ID of the newly created entity. - -{% info_block infoBox %} -All fields included in the request payload are marked as `isCreatable: true` in the configuration. -Therefore, the API will create a new record with all the provided fields. -However, if any of the provided fields are configured as `isCreatable: false` it will result in an error. +All fields included in the request payload are marked as `isCreatable: true` in the configuration. So, the API creates a new record with all the provided fields. +However, if any of the provided fields are configured as `isCreatable: false`, the request results in an error. -Let's configure `isCreatable: false` for `iso3_code` and send the same request. -You will receive the following error response because a non-creatable field `iso3_code` is provided: +For example, configure `isCreatable: false` for `iso3_code` and send the same request. You should receive the following error response: ```json [ @@ -198,12 +193,8 @@ You will receive the following error response because a non-creatable field `iso ] ``` -{% info_block infoBox %} -Certain database-specific configurations may result in issues independent of entity configurations. - -For instance, in case of MariaDB, it is impossible to set the ID value for an auto-incremented field. Additionally, for the `iso2_code` field in the `spy_country` table, it must have a unique value. Therefore, before creating a new record, you need to make sure you are not passing a duplicated value for this field. -Otherwise, the following response is returned: +Certain database-specific configurations may result in issues independent of entity configurations. For example, with MariaDB, it is impossible to set the ID value for an auto-incremented field. Additionally, the `iso2_code` field in the `spy_country` table must have a unique value. Therefore, before creating a new record, you need to make sure you are not passing a duplicate value for this field. If a duplicate value is passed, the following is returned: ```json [ @@ -215,11 +206,11 @@ Otherwise, the following response is returned: ] ``` -This response is caused by a caught Propel exception, specifically an integrity constraint violation `(Integrity constraint violation: 1062 Duplicate entry 'WA' for key 'spy_country-iso2_code')`. +This response is caused by a caught Propel exception, specifically an integrity constraint violation: `(Integrity constraint violation: 1062 Duplicate entry 'WA' for key 'spy_country-iso2_code')`. + -{% endinfo_block %} -### Sending `PATCH` request +### Sending `PATCH` requests To update a collection of countries, submit the following HTTP request: @@ -242,9 +233,7 @@ Content-Length: 174 } ``` -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: +The response payload includes all the specified fields from the request body. Response sample: ```json [ @@ -257,13 +246,8 @@ If everything is set up correctly you will get the following response: ] ``` -The response payload includes all the specified fields from the request body. - -{% endinfo_block %} - -{% info_block infoBox %} -It is also possible to send a `PATCH` request for a specific ID instead of a collection, use the following request: +To update a specific country, send the following HTTP request: ```bash PATCH /dynamic-entity/country/1 HTTP/1.1 @@ -281,17 +265,10 @@ Content-Length: 143 } ``` -{% endinfo_block %} +All fields included in the request payload are marked as `isCreatable: true` in the configuration. So, the API creates a new record with all the provided fields. +However, if any of the provided fields are configured as `isCreatable: false`, the request results in an error. -{% info_block infoBox %} - -Note that all fields included in the request payload are marked as `isEditable: true` in the configuration. -Therefore, the API will update the found record with all the provided fields. -However, if any of the provided fields are configured as `isEditable: false` it will result in an error. - -Let's configure `isEditable: false` for `iso3_code` and send the same request. - -You will receive the following error response because a non-editable field `iso3_code` is provided: +For example, configure `isCreatable: false` for `iso3_code` and send the same request. You should receive the following error response: ```json [ @@ -303,11 +280,9 @@ You will receive the following error response because a non-editable field `iso3 ] ``` -{% endinfo_block %} -{% info_block infoBox %} -If `id_country` is not provided you will get the following response: +If `id_country` is not provided, the following is returned: ```json [ @@ -319,7 +294,7 @@ If `id_country` is not provided you will get the following response: ] ``` -If `id_country` is not found you will get the following response: +If `id_country` is not found, the following is returned: ```json [ @@ -331,7 +306,6 @@ If `id_country` is not found you will get the following response: ] ``` -{% endinfo_block %} {% info_block infoBox %} @@ -341,10 +315,9 @@ Similarly to the `POST` request, it is important to consider database-specific c ### Sending `PUT` request -When you send a PUT request, you provide the updated representation of the resource in the request -payload. The server then replaces the entire existing resource with the new representation provided. If the resource does not exist at the specified URL, a PUT request can also create a new resource. +When you send a PUT request, you provide the updated representation of the resource in the request payload. The server replaces the entire existing resource with the new representation provided. If the resource does not exist at the specified URL, the request creates a new resource. -Let's send the following `PUT` request to update the existing entity: +To replace an existing entity, send the following `PUT` request: ```bash PUT /dynamic-entity/country HTTP/1.1 @@ -365,9 +338,7 @@ Content-Length: 263 } ``` -{% info_block warningBox "Verification" %} - -If everything is set up correctly you will get the following response: +The response payload includes all touched fields for the provided resource. Response sample: ```json [ @@ -382,11 +353,6 @@ If everything is set up correctly you will get the following response: ] ``` -The response payload includes all touched fields for the provided resource. - -{% endinfo_block %} - -{% info_block infoBox %} It is also possible to send a `PUT` request for a specific ID instead of a collection using the following request: From d6a97a2c157c976077f48e644cc110c9ab40ab07 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 11 Sep 2023 11:02:36 +0300 Subject: [PATCH 14/44] Update how-to-send-request-in-data-exchange-api.md --- .../how-to-send-request-in-data-exchange-api.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 27b416bb62a..fff68efbaba 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -7,18 +7,16 @@ redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html --- -This guide shows how to send a request using the Data Exchange API. +This guide shows how to send a request using the Data Exchange API. Let's say you have an endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. + ## Prerequisites * [Install the Data Exchange API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html) * [Configure the Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html) -Let's say you have an endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. - -The Data Exchange API is a non-resource-based API and routes all specified endpoints directly to a controller. -By default, all routes within the Data Exchange API are protected to ensure data security. To access the API, you need to obtain an access token by sending a POST request to the `/token/` endpoint with the appropriate credentials: +The Data Exchange API is a non-resource-based API and routes all specified endpoints directly to a controller. By default, all routes within the Data Exchange API are protected to ensure data security. To access the API, you need to obtain an access token by sending the `POST /token/` request with the appropriate credentials: ```bash POST /token/ HTTP/1.1 @@ -30,10 +28,9 @@ Content-Length: 67 grant_type=password&username={username}&password={password} ``` -## Sending a `GET` request +## Retrieve a collection of fields -To retrieve a collection of countries, you need to send the `GET https://glue.mysprykershop.com/dynamic-entity/country` request. -This request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. +To retrieve a collection of countries, you need to send the `GET https://glue.mysprykershop.com/dynamic-entity/country` request. The request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. Pagination allows for efficient data retrieval by specifying the desired range of results. To use pagination, include the desired page limit and offset in the request: @@ -96,7 +93,6 @@ Response sample: ] ``` -{% info_block infoBox %} When you combine multiple filters in a single request, the system applies an `AND` condition to the retrieved results. From e2abd5ed189bb04b0358ca1c44bf83a7a4ff6829 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 13 Sep 2023 10:34:15 +0300 Subject: [PATCH 15/44] Update how-to-configure-data-exchange-api.md --- .../how-to-configure-data-exchange-api.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index d9494534b1a..15b26c70396 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -11,19 +11,19 @@ This document describes how to configure the Data Exchange API endpoints by exec ## Configuration of Data Exchange API endpoints -To create an endpoint for interacting with entities in the database, you need to add a corresponding row in the `spy_dynamic_entity_configuration` table. +To create an endpoint for interacting with entities in the database, you need to add a corresponding row to the `spy_dynamic_entity_configuration` table. The `spy_dynamic_entity_configuration` table contains the configuration of dynamic entity endpoints and has the following columns: | COLUMN | SPECIFICATION | | --- | --- | -| id_dynamic_entity_configuration | The unique ID of the configuration. | +| id_dynamic_entity_configuration | ID of the configuration. | | table_alias | An alias used in the request URL to refer to the endpoint. | -| table_name | The name of the corresponding table in the database to operate on. | -| is_active | Indicates whether the endpoint is enabled or disabled. | +| table_name | The name of the database table to operate on. | +| is_active | Defines if the endpoint can be interacted with. | | definition | A JSON-formatted string containing the configuration details for each field in the table. | | created_at | Date and time when the configuration was created. | -| updated_at | Date and time when the configuration was last updated. | +| updated_at | Date and time when the configuration was updated. | Dive deeper into the configuration of the `spy_dynamic_entity_definition.definition` field. @@ -95,7 +95,7 @@ The following table describes the purpose of each field: In this example, we are creating the `/dynamic-data/country` endpoint to operate with data in the `spy_country` table. When following the steps, adjust the data per your requirements: -1. In the Back Office, go to **Data Exchange API Configuration**. +1. In the Back Office, go to **Data Exchange API Configuration**. 2. On the **Data Exchange API Configuration** page, click **Create Data Exchange API configuration**. [PASTE SCREENSHOT HERE] From faf31172f7cad188b5d60afa5d627a4664432990 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 13 Sep 2023 16:49:50 +0300 Subject: [PATCH 16/44] review --- .../data-exchange-api/install-the-data-exchange-api.md | 8 ++++---- .../how-to-guides/how-to-configure-data-exchange-api.md | 8 +++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md index d10b4cdddc3..e23ac595afa 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md @@ -162,7 +162,7 @@ class DynamicEntityGuiConfig extends SprykerDynamicEntityGuiConfig ### Set up database schema and transfer objects -Apply database changes and generate entity and transfer changes: +1. Apply database changes and generate entity and transfer changes: ```bash console propel:install @@ -177,9 +177,7 @@ Make sure you've triggered the following changes by checking the database: | --- | --- | | spy_dynamic_entity_configuration | table | -Add configurations for dynamic entities. In order to do that follow the instructions here [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html) - -Ensure the following transfers have been created: +Make sure the following transfers have been created: | TRANSFER | TYPE | EVENT | PATH | | --- | --- | --- | --- | @@ -215,6 +213,8 @@ Ensure the following transfers have been created: {% endinfo_block %} +2. Add configurations for dynamic entities. For instructions, see [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). + ### Add translations 1. Append the glossary according to your language configuration: diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 15b26c70396..e3d03a9ec60 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -72,8 +72,10 @@ The following table describes the purpose of each field: | isCreatable | Defines if the field can be included in requests to provide an initial value during record creation. | | validation | Contains validation configurations. Proper validation ensures that the provided data meets the specified criteria. | | required | Defines if the field must be provided in API requests. | -| maxLength/minLength | Defines the minimum/maximum length allowed for the field with a string type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. | -| max/min | Defines the minimum/maximum value allowed for the field with an integer type. It enforces a lower boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. Optional. | +| maxLength | Defines the maximum length allowed for the field with a string type. It enforces a boundary, ensuring that the field's value meet or doesn't exceed the defined requirement. | +| minLength | Defines the minimum length allowed for the field with a string type. It enforces a boundary, ensuring that the field's value meets or exceeds the defined requirement. | +| max | Defines the maximum value allowed for the field with an integer type. It enforces a boundary, ensuring that the field's value meet or doesn't exceed the defined requirement. Optional. | +| min | Defines the minimum value allowed for the field with an integer type. It enforces a boundary, ensuring that the field's value meets or exceeds the defined minimum requirement. Optional. | {% info_block infoBox %} @@ -95,7 +97,7 @@ The following table describes the purpose of each field: In this example, we are creating the `/dynamic-data/country` endpoint to operate with data in the `spy_country` table. When following the steps, adjust the data per your requirements: -1. In the Back Office, go to **Data Exchange API Configuration**. +1. In the Back Office, go to **Data Exchange API Configuration**. 2. On the **Data Exchange API Configuration** page, click **Create Data Exchange API configuration**. [PASTE SCREENSHOT HERE] From 89147b4814423bc04ae9a7279ac1987f7e4ca5a9 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Wed, 13 Sep 2023 16:54:11 +0300 Subject: [PATCH 17/44] Update install-the-data-exchange-api.md --- .../data-exchange-api/install-the-data-exchange-api.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md index e23ac595afa..0dedd68d643 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md @@ -401,10 +401,6 @@ If the documentation cache is not invalidated, the documentation will not be upd {% endinfo_block %} -```bash -console navigation:build-cache -``` -
src/Pyz/Glue/DocumentationGeneratorOpenApi/DocumentationGeneratorOpenApiDependencyProvider.php From 9b838501987609df4db96c9b64a0c592ed46215f Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Thu, 14 Sep 2023 10:06:14 +0300 Subject: [PATCH 18/44] review --- .../install-the-data-exchange-api.md | 6 ++++-- .../how-to-configure-data-exchange-api.md | 21 +++++++------------ ...ow-to-send-request-in-data-exchange-api.md | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md index 0dedd68d643..ab7edcba193 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md @@ -213,8 +213,6 @@ Make sure the following transfers have been created: {% endinfo_block %} -2. Add configurations for dynamic entities. For instructions, see [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). - ### Add translations 1. Append the glossary according to your language configuration: @@ -488,3 +486,7 @@ vendor/bin/console scheduler:resume 2. Make sure `src\Generated\GlueBackend\Specification\spryker_backend_api.schema.yml` has been generated and contains the corresponding endpoint with correct configurations. {% endinfo_block %} + +## Related documents + +To add configurations for dynamic entities, see [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index e3d03a9ec60..f83fb3d9930 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -7,13 +7,14 @@ redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html --- -This document describes how to configure the Data Exchange API endpoints by executing SQL queries. +This document describes how to create and configure the Data Exchange API endpoints. -## Configuration of Data Exchange API endpoints -To create an endpoint for interacting with entities in the database, you need to add a corresponding row to the `spy_dynamic_entity_configuration` table. +The Data Exchange API lets you create endpoints to interact with any database tables. In this example, we are creating the `/dynamic-data/country` endpoint to interact with the `spy_country` table. When following the steps, adjust the data per your requirements. -The `spy_dynamic_entity_configuration` table contains the configuration of dynamic entity endpoints and has the following columns: +## Create and configure a Data Exchange API endpoint + +To register an endpoint for interacting with entities in the database, you need to add a corresponding row to the `spy_dynamic_entity_configuration` table. The table contains the configuration of dynamic entity endpoints and has the following columns: | COLUMN | SPECIFICATION | | --- | --- | @@ -25,9 +26,7 @@ The `spy_dynamic_entity_configuration` table contains the configuration of dynam | created_at | Date and time when the configuration was created. | | updated_at | Date and time when the configuration was updated. | -Dive deeper into the configuration of the `spy_dynamic_entity_definition.definition` field. - -The following example shows the structure of a possible definition value based on the `spy_country` table: +The following example shows a possible value of the `spy_dynamic_entity_configuration.definition` field configured for the `spy_country` table: ```json { @@ -59,9 +58,7 @@ The following example shows the structure of a possible definition value based o } ``` -The following table describes the purpose of each field: - -| FIELD | SPECIFICATION | +| FIELD | DESCRIPTION | | --- | --- | | identifier | The name of the column in the table that serves as an identifier. It can be any chosen column from the table, typically used as a unique ID for each record. | | fields | An array containing the descriptions of the columns from the table. It defines the columns that are included for interaction. The API exposes and operates on the included columns. Columns that are not included in the array are inaccessible through API requests. | @@ -92,9 +89,7 @@ The following table describes the purpose of each field: {% endinfo_block %} -## Create Data Exchange API endpoints - -In this example, we are creating the `/dynamic-data/country` endpoint to operate with data in the `spy_country` table. When following the steps, adjust the data per your requirements: +## Enable and configure the Data Exchange API endpoint in the Back Office 1. In the Back Office, go to **Data Exchange API Configuration**. diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index fff68efbaba..9f7868c928f 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -7,7 +7,7 @@ redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html --- -This guide shows how to send a request using the Data Exchange API. Let's say you have an endpoint `/dynamic-data/country` to operate with data in `spy_country` table in database. +This document describes how to send interact with databases using the Data Exchange API. The Data Exchange API lets you configure endpoints to interact with any database tables. In this document, we are using the `/dynamic-data/country` to interact with the `spy_country` table as an example. ## Prerequisites From ab767d270364229b27634f070c16837cc74efe30 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Thu, 14 Sep 2023 15:30:01 +0300 Subject: [PATCH 19/44] review --- .../install-the-data-exchange-api.md | 19 ++++++++------- .../how-to-configure-data-exchange-api.md | 24 +++++++------------ 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md index ab7edcba193..e4dcb7a0457 100644 --- a/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md +++ b/docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api/install-the-data-exchange-api.md @@ -6,6 +6,9 @@ template: feature-integration-guide-template redirect_from: - /docs/scos/dev/feature-integration-guides/202304.0/glue-api/data-exchange-api/data-exchange-api-integration.html - /docs/scos/dev/feature-integration-guides/202307.0/glue-api/data-exchange-api-integration.html +related: +- title: How to configure Data Exchange API + link: docs/scos/dev/glue-api-guides/page.version/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html --- This document describes how to install the Data Exchange API. @@ -130,7 +133,9 @@ class DynamicEntityBackendApiConfig extends SprykerDynamicEntityBackendApiConfig } ``` -4. Optional: The Data Exchange API comes with an exclusion list of database schemas that are not allowed to be configured. The `spy_dynamic_entity_configuration` schema is excluded by default. To exclude other database schemas from configuring, adjust `DynamicEntityGuiConfig`: + + +4. Optional: To exclude database schemas from configuring, define them as follows: **src/Pyz/Zed/DynamicEntityGui/DynamicEntityGuiConfig.php** @@ -301,7 +306,7 @@ console navigation:build-cache {% info_block warningBox "Verification" %} -Make sure the Data Exchange API section has been added to the Backoffice navigation. +Make sure the Data Exchange API section has been added to the Back Office navigation. {% endinfo_block %} @@ -392,7 +397,7 @@ class DocumentationGeneratorApiDependencyProvider extends SprykerDocumentationGe ```
-{% info_block infoBox "Info" %} +{% info_block infoBox "" %} The `DocumentationGeneratorApiDependencyProvider::getInvalidationVoterPlugins()` stack contains plugins that are used to invalidate the documentation cache. If the documentation cache is not invalidated, the documentation will not be updated. @@ -453,11 +458,11 @@ class GlueBackendApiApplicationDependencyProvider extends SprykerGlueBackendApiA {% info_block warningBox "Verification" %} -Make sure you can operate data. For instructions, see :[Requesting data using the Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) +Make sure you can operate data. For instructions, see [Requesting data using the Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) {% endinfo_block %} -### Configure Scheduler: +### Configure the scheduler 1. Adjust the scheduler project configuration: @@ -486,7 +491,3 @@ vendor/bin/console scheduler:resume 2. Make sure `src\Generated\GlueBackend\Specification\spryker_backend_api.schema.yml` has been generated and contains the corresponding endpoint with correct configurations. {% endinfo_block %} - -## Related documents - -To add configurations for dynamic entities, see [How to configure Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html). diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index f83fb3d9930..7a00f8e7772 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -9,8 +9,7 @@ redirect_from: This document describes how to create and configure the Data Exchange API endpoints. - -The Data Exchange API lets you create endpoints to interact with any database tables. In this example, we are creating the `/dynamic-data/country` endpoint to interact with the `spy_country` table. When following the steps, adjust the data per your requirements. +The Data Exchange API lets you create endpoints to interact with any database tables through API. In this example, we are creating the `/dynamic-data/country` endpoint to interact with the `spy_country` table. When following the steps, adjust the data per your requirements. ## Create and configure a Data Exchange API endpoint @@ -91,38 +90,33 @@ The following example shows a possible value of the `spy_dynamic_entity_configur ## Enable and configure the Data Exchange API endpoint in the Back Office - 1. In the Back Office, go to **Data Exchange API Configuration**. 2. On the **Data Exchange API Configuration** page, click **Create Data Exchange API configuration**. [PASTE SCREENSHOT HERE] -3. In **CREATE DATA EXCHANGE API CONFIGURATION** pane, select a **TABLE NAME**. In our example, it's `spy_country`. +3. In **CREATE DATA EXCHANGE API CONFIGURATION** pane, for **TABLE NAME**, select the table you want to configure the API for. In our example, it's `spy_country`. [PASTE SCREENSHOT HERE] {% info_block infoBox %} -You can only select the tables that are not excluded from configuring. To exclude a table from configuring, follow [Install the Data Exchange API](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html). +If you don't see the needed table, it may be [excluded from configuring](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api/install-the-data-exchange-api.html#exclude-database-schemas-from-configuring). {% endinfo_block %} -After you select a table, you will see a form for configuring the endpoint. Let's fill in the form with the following values: +4. For **RESOURCE NAME**, enter the name of the endpoint you want to create. In our case, it's `countries`. +5. Optional: On the ... , to enable the endpoint after it's configured, select **IS ENABLED**. +6. Configure the fields for interactions per your requirements. [PASTE SCREENSHOT HERE] -{% info_block infoBox %} - -Note, that you have to enable the endpoint in order to be able to use it. And besides that, you have to provide enable each field you want to use as well. -{% endinfo_block %} - -Click **Save**. +7. Click **Save**. This opens the **Data Exchange API Configuration** page with the endpoint displayed in the list. Now you can send requests to this endpoint. {% info_block warningBox "Verification" %} -If everything is set up correctly, you can follow [How to send request in Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) to discover how to request your API endpoint. -Or if you're in the middle of the integration process for the Data Exchange API follow [Data Exchange API integration](/docs/scos/dev/feature-integration-guides/{{page.version}}/glue-api/data-exchange-api-integration.html) to proceed with it. +## Next steps -{% endinfo_block %} +[How to send request in Data Exchange API](/docs/scos/dev/glue-api-guides/{{page.version}}/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html) From beecc7ac773897336125f653c1203b607682b110 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 18 Sep 2023 10:08:04 +0300 Subject: [PATCH 20/44] country>countries --- .../how-to-configure-data-exchange-api.md | 2 +- ...ow-to-send-request-in-data-exchange-api.md | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 7a00f8e7772..0dce01176da 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -9,7 +9,7 @@ redirect_from: This document describes how to create and configure the Data Exchange API endpoints. -The Data Exchange API lets you create endpoints to interact with any database tables through API. In this example, we are creating the `/dynamic-data/country` endpoint to interact with the `spy_country` table. When following the steps, adjust the data per your requirements. +The Data Exchange API lets you create endpoints to interact with any database tables through API. In this example, we are creating the `/dynamic-data/countries` endpoint to interact with the `spy_country` table. When following the steps, adjust the data per your requirements. ## Create and configure a Data Exchange API endpoint diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 9f7868c928f..55f1b43b39a 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -7,7 +7,7 @@ redirect_from: - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html --- -This document describes how to send interact with databases using the Data Exchange API. The Data Exchange API lets you configure endpoints to interact with any database tables. In this document, we are using the `/dynamic-data/country` to interact with the `spy_country` table as an example. +This document describes how to send interact with databases using the Data Exchange API. The Data Exchange API lets you configure endpoints to interact with any database tables. In this document, we are using the `/dynamic-data/countries` to interact with the `spy_country` table as an example. ## Prerequisites @@ -30,12 +30,12 @@ grant_type=password&username={username}&password={password} ## Retrieve a collection of fields -To retrieve a collection of countries, you need to send the `GET https://glue.mysprykershop.com/dynamic-entity/country` request. The request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. +To retrieve a collection of countries, you need to send the `GET https://glue.mysprykershop.com/dynamic-entity/countries` request. The request needs to include the necessary headers, such as Content-Type, Accept, and Authorization, with the access token provided. Pagination allows for efficient data retrieval by specifying the desired range of results. To use pagination, include the desired page limit and offset in the request: ```bash -GET /dynamic-entity/country?page[offset]=1&page[limit]=2 HTTP/1.1 +GET /dynamic-entity/countries?page[offset]=1&page[limit]=2 HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -71,7 +71,7 @@ The response contains all the columns from the `spy_country` table that are conf Filtering enables targeted data retrieval, refining the response to match the specified criteria. To apply filtering to the results based on specific fields, include the appropriate filter parameter in the request: ```bash -GET /dynamic-entity/country?filter[country.iso2_code]=AA HTTP/1.1 +GET /dynamic-entity/countries?filter[country.iso2_code]=AA HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -101,7 +101,7 @@ When you combine multiple filters in a single request, the system applies an `AN To retrieve a country by a specific ID, send a `GET` request with the following parameters: ```bash -GET /dynamic-entity/country/3 HTTP/1.1 +GET /dynamic-entity/countries/3 HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -142,7 +142,7 @@ If you send a request to an endpoint that's not configured in `spy_dynamic_entit To create a collection of countries, submit the following HTTP request: ```bash -POST /dynamic-entity/country HTTP/1.1 +POST /dynamic-entity/countries HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -211,7 +211,7 @@ This response is caused by a caught Propel exception, specifically an integrity To update a collection of countries, submit the following HTTP request: ```bash -PATCH /dynamic-entity/country HTTP/1.1 +PATCH /dynamic-entity/countries HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -246,7 +246,7 @@ The response payload includes all the specified fields from the request body. Re To update a specific country, send the following HTTP request: ```bash -PATCH /dynamic-entity/country/1 HTTP/1.1 +PATCH /dynamic-entity/countries/1 HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -316,7 +316,7 @@ When you send a PUT request, you provide the updated representation of the resou To replace an existing entity, send the following `PUT` request: ```bash -PUT /dynamic-entity/country HTTP/1.1 +PUT /dynamic-entity/countries HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json @@ -353,7 +353,7 @@ The response payload includes all touched fields for the provided resource. Resp It is also possible to send a `PUT` request for a specific ID instead of a collection using the following request: ```bash -PUT /dynamic-entity/country/1 HTTP/1.1 +PUT /dynamic-entity/countries/1 HTTP/1.1 Host: glue-backend.mysprykershop.com Content-Type: application/json Accept: application/json From 7e65b8500f1fa104c1ea8d6e2443116f0899ff42 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Mon, 18 Sep 2023 15:31:16 +0300 Subject: [PATCH 21/44] Update how-to-configure-data-exchange-api.md --- .../how-to-guides/how-to-configure-data-exchange-api.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index 0dce01176da..f6877124786 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -105,8 +105,10 @@ If you don't see the needed table, it may be [excluded from configuring](/docs/s {% endinfo_block %} -4. For **RESOURCE NAME**, enter the name of the endpoint you want to create. In our case, it's `countries`. -5. Optional: On the ... , to enable the endpoint after it's configured, select **IS ENABLED**. +4. Click **Create**. + This opens the **EDIT DATA EXCHANGE API CONFIGURATION** page. +5. For **RESOURCE NAME**, enter the name of the endpoint you want to create. In our case, it's `countries`. +5. Optional: To enable the endpoint after it's configured, select **IS ENABLED**. 6. Configure the fields for interactions per your requirements. [PASTE SCREENSHOT HERE] From 0fa1099c02b79e2faeef80cb95c8d3311f557e92 Mon Sep 17 00:00:00 2001 From: Andrii Tserkovnyi Date: Tue, 19 Sep 2023 10:16:08 +0300 Subject: [PATCH 22/44] Update how-to-configure-data-exchange-api.md --- .../how-to-guides/how-to-configure-data-exchange-api.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index f6877124786..e332d621b7e 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -117,7 +117,6 @@ If you don't see the needed table, it may be [excluded from configuring](/docs/s 7. Click **Save**. This opens the **Data Exchange API Configuration** page with the endpoint displayed in the list. Now you can send requests to this endpoint. -{% info_block warningBox "Verification" %} ## Next steps From ede487a755be62639bf2cbf83bd60cf2b37b5910 Mon Sep 17 00:00:00 2001 From: Yuriy Gerton Date: Fri, 22 Sep 2023 12:30:48 +0300 Subject: [PATCH 23/44] Update extend-the-marketplace-frontend.md --- .../202307.0/marketplace/extend-the-marketplace-frontend.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md b/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md index 4637a9dac7f..74a9db0add4 100644 --- a/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md +++ b/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md @@ -1,5 +1,5 @@ --- -title: Extend the Marketplace frontend +title: Extend the Merchant Portal frontend description: This document provides details about how to extend the new project. template: howto-guide-template redirect_from: @@ -13,7 +13,7 @@ This document can help you understand how you can extend the frontend project. ## Prerequisites -Prior to starting the project extension, verify that the marketplace modules are up-to-date: +Prior to starting the project extension, verify that the Merchant Portal modules are up-to-date: | NAME | VERSION | | ------------------------------------------- | --------- | @@ -197,7 +197,7 @@ console cache:empty-all ## Overriding CSS variables -CSS variables can be overridden in any `.less`/`.css` file related to the Marketplace at the project level. +CSS variables can be overridden in any `.less`/`.css` file related to the Merchant Portal at the project level. Global override changes a variable for the whole project: From ac15fa963bfbc911cf9184e4e6f6be397f550658 Mon Sep 17 00:00:00 2001 From: upgrader Date: Fri, 22 Sep 2023 17:39:08 +0300 Subject: [PATCH 24/44] SDK-2359 add spryker dev packages checker docs --- .../spryker-dev-packages-checker.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md new file mode 100644 index 00000000000..b8f4e16edf2 --- /dev/null +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md @@ -0,0 +1,48 @@ +--- +title: Spryker dev packages checker +description: Reference information for evaluator tools. +template: howto-guide-template +--- + +Spryker dev packages checker checks the project spryker dependencies for the "dev-*" constraints. + +## Problem description + +The project contains the spryker packages dependencies in the `require` section of the `composer.json` file. + +The integration can be broken if some of those packages has reference to the specific branch by using `dev-*` constraint version. + +To avoid it need to be sure that all the spryker packages has valid version constraints. + +## Example of code that causes an evaluator error + +composer.json +```json +{ + "name": "spryker-shop/b2b-demo-shop", + "description": "Spryker B2B Demo Shop", + "license": "proprietary", + "require": { + "spryker/asset": "dev-master", + "spryker/asset-storage": "dev-some-branch" + } +} +``` + +## Example of an evaluator error message + +```bash +============================ +SPRYKER DEV PACKAGES CHECKER +============================ + +Message: Spryker package "spryker/asset:dev-master" has forbidden "dev-*" constraint + Target: spryker/storage-gui + +Message: Spryker package "spryker/asset-storage:dev-some-branch" has forbidden "dev-*" constraint + Target: spryker/uuid + + +Read more: https://docs.spryker.com/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.html + +``` \ No newline at end of file From 6d63c609d76dd0f7eefa2f963015e6ee33d041d2 Mon Sep 17 00:00:00 2001 From: upgrader Date: Fri, 22 Sep 2023 17:58:26 +0300 Subject: [PATCH 25/44] SDK-2359 update docs --- .../upgradability-guidelines/spryker-dev-packages-checker.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md index b8f4e16edf2..421b90582bd 100644 --- a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md @@ -36,10 +36,10 @@ composer.json SPRYKER DEV PACKAGES CHECKER ============================ -Message: Spryker package "spryker/asset:dev-master" has forbidden "dev-*" constraint +Message: Spryker package "spryker/asset:dev-master" has forbidden "dev-*" version constraint Target: spryker/storage-gui -Message: Spryker package "spryker/asset-storage:dev-some-branch" has forbidden "dev-*" constraint +Message: Spryker package "spryker/asset-storage:dev-some-branch" has forbidden "dev-*" version constraint Target: spryker/uuid From b3345280c4e251e0cd22f05d5266b429947a949a Mon Sep 17 00:00:00 2001 From: lenadoc Date: Fri, 22 Sep 2023 18:02:42 +0200 Subject: [PATCH 26/44] Renaming the page and adding the redirect --- _data/sidebars/scos_dev_sidebar.yml | 4 ++-- ...ace-frontend.md => extend-the-merchant-portal-frontend.md} | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) rename docs/scos/dev/front-end-development/202307.0/marketplace/{extend-the-marketplace-frontend.md => extend-the-merchant-portal-frontend.md} (98%) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index bf98f79c25e..b6b7fb4f5eb 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -3416,8 +3416,8 @@ entries: - "202212.0" - "202307.0" nested: - - title: Extend the Marketplace frontend - url: /docs/scos/dev/front-end-development/marketplace/extend-the-marketplace-frontend.html + - title: Extend the Merchant Portal frontend + url: /docs/scos/dev/front-end-development/marketplace/extend-the-merchant-portal-frontend.html - title: "Table design" url: /docs/scos/dev/front-end-development/marketplace/table-design/table-design.html nested: diff --git a/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md b/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-merchant-portal-frontend.md similarity index 98% rename from docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md rename to docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-merchant-portal-frontend.md index 74a9db0add4..1cd81932ac9 100644 --- a/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.md +++ b/docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-merchant-portal-frontend.md @@ -5,6 +5,7 @@ template: howto-guide-template redirect_from: - /docs/marketplace/dev/front-end/extending-the-project/index.html - /docs/marketplace/dev/front-end/202212.0/extending-the-project/migration-guide-extending-the-project.html + - /docs/scos/dev/front-end-development/202307.0/marketplace/extend-the-marketplace-frontend.html --- To add additional frontend functionality beyond the one provisioned out-of-the-box, the project must be extended. From 15d0165445807faa7f10910a5a4113dbae6027f3 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Fri, 22 Sep 2023 17:12:41 +0100 Subject: [PATCH 27/44] PBC-3053: Update Vertex integration guide. --- .../tax-management/202400.0/base-shop/vertex/install-vertex.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md index c93d780e832..042f6bfd6ab 100644 --- a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md +++ b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md @@ -21,6 +21,9 @@ Before integrating Vertex, ensure the following prerequisites are met: - The Vertex app catalog page lists specific packages that must be installed or upgraded before you can use the Vertex app. To check the list of the necessary packages, in the Back Office, go to **Apps**-> **Vertex**. Ensure that your installation meets these requirements. +#### Notes +- Make sure that your deployment pipeline executes DB migrations. + ## 1. Integrate ACP connector module for tax calculation To enable the Vertex integration, you need to integrate the [spryker/tax-app](https://github.com/spryker/tax-app) ACP connector module first. From 7bfdd5613523a1b37a7779f26eec716e30a1de03 Mon Sep 17 00:00:00 2001 From: vol4onok Date: Mon, 25 Sep 2023 08:55:52 +0300 Subject: [PATCH 28/44] SDK-4885: Fixed link that for GitHab --- docs/scu/dev/run-spryker-code-upgrader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/scu/dev/run-spryker-code-upgrader.md b/docs/scu/dev/run-spryker-code-upgrader.md index 62b2d7d8fd2..a1e46d51f86 100644 --- a/docs/scu/dev/run-spryker-code-upgrader.md +++ b/docs/scu/dev/run-spryker-code-upgrader.md @@ -12,7 +12,7 @@ This document describes how to manually trigger Spryker Code Upgrader. Connect the Upgrader to your project using one of the following guides: -* [GitHub access token requirements](/docs/scu/dev/onboard-to-spryker-code-upgrader/connect-spryker-ci-to-a-gitlab-managed-project.html#prerequisites) +* [GitHub access token requirements](/docs/scu/dev/onboard-to-spryker-code-upgrader/connect-spryker-ci-to-a-github-managed-project.html#prerequisites) * [GitLab access token requirements](/docs/scu/dev/onboard-to-spryker-code-upgrader/connect-spryker-ci-to-a-gitlab-managed-project.html#prerequisites) * [GitLab access token requirements for self-hosted projects](/docs/scu/dev/onboard-to-spryker-code-upgrader/connect-spryker-ci-to-a-project-self-hosted-with-gitlab.html#prerequisites) * [Azure access token requirements](/docs/scu/dev/onboard-to-spryker-code-upgrader/connect-spryker-ci-to-a-azure-managed-project.html#prerequisites) From b1296411d25caaa9b4a784b6a1149bab77dc735d Mon Sep 17 00:00:00 2001 From: upgrader Date: Mon, 25 Sep 2023 10:43:39 +0300 Subject: [PATCH 29/44] SDK-2568 update evaluator configuration docs --- .../upgradability-guidelines/spryker-dev-packages-checker.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md index 421b90582bd..36b6568b145 100644 --- a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md @@ -10,9 +10,9 @@ Spryker dev packages checker checks the project spryker dependencies for the "de The project contains the spryker packages dependencies in the `require` section of the `composer.json` file. -The integration can be broken if some of those packages has reference to the specific branch by using `dev-*` constraint version. +Integration may break if some of these packages have references to specific branches using `dev-*` constraint versions. -To avoid it need to be sure that all the spryker packages has valid version constraints. +To prevent this, it is essential to ensure that all Spryker packages have valid version constraints. ## Example of code that causes an evaluator error From 2c1506acb52599579719d5a656ca2d13c91f875c Mon Sep 17 00:00:00 2001 From: Helen Kravchenko Date: Mon, 25 Sep 2023 10:08:12 +0200 Subject: [PATCH 30/44] fixing the sidebar --- _data/sidebars/scos_dev_sidebar.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index b6b7fb4f5eb..e768269160a 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -3411,13 +3411,14 @@ entries: url: /docs/scos/dev/front-end-development/oryx/architecture/oryx-server-side-rendering.html - title: Marketplace + url: /docs/scos/dev/front-end-development/marketplace/marketplace-frontend.html include_versions: - "202204.0" - "202212.0" - "202307.0" nested: - title: Extend the Merchant Portal frontend - url: /docs/scos/dev/front-end-development/marketplace/extend-the-merchant-portal-frontend.html + url: /docs/scos/dev/front-end-development/marketplace/extend-the-marketplace-frontend.html - title: "Table design" url: /docs/scos/dev/front-end-development/marketplace/table-design/table-design.html nested: From 981b65d5004032da093cf31e72d0280e48702694 Mon Sep 17 00:00:00 2001 From: Helen Kravchenko Date: Mon, 25 Sep 2023 10:17:22 +0200 Subject: [PATCH 31/44] Adding old versions of the doc to the sidebar --- _data/sidebars/scos_dev_sidebar.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index e768269160a..1909e27eb8e 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -3417,8 +3417,15 @@ entries: - "202212.0" - "202307.0" nested: - - title: Extend the Merchant Portal frontend + - title: Extend the Marketplace frontend url: /docs/scos/dev/front-end-development/marketplace/extend-the-marketplace-frontend.html + include_versions: + - "202204.0" + - "202212.0" + - title: Extend the Merchant Portal frontend + url: /docs/scos/dev/front-end-development/marketplace/extend-the-merchant-portal-frontend.html + include_versions: + - "202307.0" - title: "Table design" url: /docs/scos/dev/front-end-development/marketplace/table-design/table-design.html nested: From ea08ae0ac7fbca6dce85fc128dba9e54af070142 Mon Sep 17 00:00:00 2001 From: Jaume Malia Date: Mon, 25 Sep 2023 15:31:21 +0200 Subject: [PATCH 32/44] Reverts configuration to MB1 --- .../202400.0/base-shop/vertex/install-vertex.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md index 042f6bfd6ab..74ca43b823f 100644 --- a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md +++ b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md @@ -54,13 +54,13 @@ $config[MessageBrokerAwsConstants::MESSAGE_TO_CHANNEL_MAP] = [ $config[MessageBrokerConstants::CHANNEL_TO_RECEIVER_TRANSPORT_MAP] = [ // ... - 'tax-commands' => MessageBrokerAwsConfig::HTTP_CHANNEL_TRANSPORT, + 'tax-commands' => MessageBrokerAwsConfig::SQS_TRANSPORT, ]; $config[MessageBrokerConstants::CHANNEL_TO_SENDER_TRANSPORT_MAP] = [ // ... - 'payment-tax-invoice-commands' => MessageBrokerAwsConfig::HTTP_CHANNEL_TRANSPORT, + 'payment-tax-invoice-commands' => 'http', ]; ``` From a341b2b04696e7273ca297b76c47f379484f218f Mon Sep 17 00:00:00 2001 From: Jaume Malia Date: Wed, 27 Sep 2023 11:34:53 +0200 Subject: [PATCH 33/44] updates plugin name --- .../202400.0/base-shop/vertex/install-vertex.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md index 74ca43b823f..e5ff3fece9d 100644 --- a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md +++ b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md @@ -206,7 +206,7 @@ Add the config to `src/Pyz/Zed/Oms/OmsDependencyProvider.php`: ```php // ... -use Spryker\Zed\TaxApp\Communication\Plugin\Oms\Command\SendPaymentTaxInvoicePlugin; +use Spryker\Zed\TaxApp\Communication\Plugin\Oms\Command\SubmitPaymentTaxInvoicePlugin; // ... @@ -221,7 +221,7 @@ use Spryker\Zed\TaxApp\Communication\Plugin\Oms\Command\SendPaymentTaxInvoicePlu // ... - $commandCollection->add(new SendPaymentTaxInvoicePlugin(), 'TaxApp/SubmitPaymentTaxInvoice'); + $commandCollection->add(new SubmitPaymentTaxInvoicePlugin(), 'TaxApp/SubmitPaymentTaxInvoice'); // ... From a349add89d9b607ef7afcbdbae6e39083fdd4689 Mon Sep 17 00:00:00 2001 From: Thomas Lehner <67914368+ThomasLehnerSpryker@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:44:02 +0200 Subject: [PATCH 34/44] Update best-practises-jenkins-stability.md Added explanation about resource contention --- .../best-practices/best-practises-jenkins-stability.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md b/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md index 9e1ad20d05b..0e87c82ad4c 100644 --- a/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md +++ b/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md @@ -15,7 +15,7 @@ Unlike in cloud, in a local environment, these commands are executed by a CLI co ## Memory management -One of the most common issues encountered with Jenkins is excessive memory usage. In a local development environment, Docker containers are usually set up to use as much RAM as they need as long as they stay within the RAM limit configured in Docker. This limit often corresponds to the total RAM available on the machine. However, when deployed to cloud, the Jenkins container is deployed to its own dedicated server, which limits the available RAM based on the server's configuration. Non-production environments have different RAM configuration tiers, which can be found in our Service Description. Standard environments typically assign 2 GB of RAM to Jenkins. This means that the server running Jenkins has a total of 2%nbspGB of RAM. Considering some overhead for the operating system, Docker, and Jenkins itself, around 1-1.5 GB of memory is usually available for PHP code execution. This shared memory needs to accommodate all console commands run on Jenkins. Therefore, if you set `php memory_limit` to 1 GB and have a job that requires 1 GB at any given time, no other job can run in parallel without risking a memory constraint and potential job failures. The `php memory_limit` does not control the total memory consumption by any PHP process but limits the amount each individual process can take. +One of the most common issues encountered with Jenkins is excessive memory usage. In a local development environment, Docker containers are usually set up to use as much RAM as they need as long as they stay within the RAM limit configured in Docker. This limit often corresponds to the total RAM available on the machine. However, when deployed to cloud, the Jenkins container is deployed to its own dedicated server, which limits the available RAM based on the server's configuration. Non-production environments have different RAM configuration tiers, which can be found in our Service Description. Standard environments typically assign 2 GB of RAM to Jenkins. This means that the server running Jenkins has a total of 2 GB of RAM. Considering some overhead for the operating system, Docker, and Jenkins itself, around 1-1.5 GB of memory is usually available for PHP code execution. This shared memory needs to accommodate all console commands run on Jenkins. Therefore, if you set `php memory_limit` to 1 GB and have a job that requires 1 GB at any given time, no other job can run in parallel without risking a memory constraint and potential job failures. The `php memory_limit` does not control the total memory consumption by any PHP process but limits the amount each individual process can take. We recommend profiling your application to understand how much RAM your Jenkins jobs require. A good way to do this is by utilizing XDebug Profiling in your local development environment. Jobs that may have unexpected memory demands are the `queue:worker:start` commands. These commands are responsible for spawning the `queue:task:start` commands, which consume messages from RabbitMQ. Depending on the complexity and configured chunk size of these messages, these jobs can easily consume multiple GBs of RAM. @@ -24,3 +24,7 @@ We recommend profiling your application to understand how much RAM your Jenkins Jenkins executors let you orchestrate Jenkins jobs and introduce parallel processing. By default, Jenkins instances have two executors configured, similar to local environment setups. You can adjust the executor count freely and run many console commands in parallel. While this may speed up processing in your application, it increases the importance of understanding the memory utilization profile of your application. For stable job execution, you need to ensure that no parallelized jobs collectively consume more memory than what is available to the Jenkins container. Also, it is common practice to set the number of executors to the count of CPUs available to Jenkins. Standard environments are equipped with two vCPUs, which means that configuring more than the standard two executors risks jobs "fighting" for CPU cycles. This severely limits the performance of all jobs run in parallel and potentially introduces instability to the container itself. We recommend sticking to the default executor count or the concurrent job limit recommended in the Spryker Service Description for your package. This will help ensure the stability of Jenkins, as configuring more Jenkins Executors is the most common cause of Jenkins instability and crashes. + +## Queue Worker Configuration + +If you have configured multiple queue workers per queue, be mindful that the comments made above regarding memory management also apply here. Each configured queue worker can take up to PHP max_memory and increase the total memory demand excessively as they get spawned. Another factor to consider is CPU utilization. If you have configured more workers than you have cores available it will become more likely that processes will wait for CPU, which can ultimately lead to suboptimal performance and even stability issues. You should avoid resource contention like this, by adjusting the workers in a way that will be compatible with your environment package. Our service description includes the number of CPU cores available to you in each package. From 34aa0170d5cf249c3da932c864701eab6bb53aa0 Mon Sep 17 00:00:00 2001 From: lenadoc Date: Wed, 27 Sep 2023 12:17:45 +0200 Subject: [PATCH 35/44] fixing the links --- _data/sidebars/scos_dev_sidebar.yml | 6 +++--- .../how-to-send-request-in-data-exchange-api.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index 6c3d92b3da2..319f443280e 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -999,7 +999,7 @@ entries: - "201907.0" - "202108.0" - "202204.0" - - title: Dynamic data API + - title: Data Exchange API include_versions: - "202307.0" nested: @@ -1378,8 +1378,8 @@ entries: url: /docs/scos/dev/feature-integration-guides/glue-api/decoupled-glue-infrastructure/glue-api-documentation-generation.html include_versions: - "202204.0" - - title: Data Exchange API integration - url: /docs/scos/dev/feature-integration-guides/glue-api/data-exchange-api/data-exchange-api-integration.html + - title: Install the Data Exchange API + url: /docs/scos/dev/feature-integration-guides/glue-api/data-exchange-api/install-the-data-exchange-api.html include_versions: - "202307.0" - title: Agent Assist diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 55f1b43b39a..4760e390e3b 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -4,7 +4,7 @@ description: This guide shows how to send a request in Data Exchange API. last_updated: June 23, 2023 template: howto-guide-template redirect_from: - - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html + - /docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-send-request-in-data-exchange-api.html --- This document describes how to send interact with databases using the Data Exchange API. The Data Exchange API lets you configure endpoints to interact with any database tables. In this document, we are using the `/dynamic-data/countries` to interact with the `spy_country` table as an example. From 4a99c7f4b833c2f2c9abf72d2cbd93ae3a872aa2 Mon Sep 17 00:00:00 2001 From: Dmytro Klyman Date: Wed, 27 Sep 2023 15:50:12 +0200 Subject: [PATCH 36/44] SDK-2359: Add new page to the sidebar --- _data/sidebars/scos_dev_sidebar.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index 1909e27eb8e..36a983132bd 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -4798,6 +4798,8 @@ entries: url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-security-checker.html - title: Single plugin argument url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/single-plugin-argument.html + - title: Spryker dev packages checker + url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md - title: Ignore evaluation errors url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-errors.html - title: Performance guidelines From 7bd944b16b9d176453c21acb39b68d28e60a7a87 Mon Sep 17 00:00:00 2001 From: Dmytro Klyman Date: Wed, 27 Sep 2023 16:14:35 +0200 Subject: [PATCH 37/44] SDK-2359: Add new page to the sidebar --- _data/sidebars/scos_dev_sidebar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/sidebars/scos_dev_sidebar.yml b/_data/sidebars/scos_dev_sidebar.yml index 36a983132bd..e957d0e88fa 100644 --- a/_data/sidebars/scos_dev_sidebar.yml +++ b/_data/sidebars/scos_dev_sidebar.yml @@ -4799,7 +4799,7 @@ entries: - title: Single plugin argument url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/single-plugin-argument.html - title: Spryker dev packages checker - url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md + url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.html - title: Ignore evaluation errors url: /docs/scos/dev/guidelines/keeping-a-project-upgradable/ignore-evaluation-errors.html - title: Performance guidelines From ad0f3fcd9b07508f6f09dea5ff045829f2ff09dc Mon Sep 17 00:00:00 2001 From: lenadoc Date: Wed, 27 Sep 2023 16:44:41 +0200 Subject: [PATCH 38/44] adjusting the file --- .../spryker-dev-packages-checker.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md index 36b6568b145..709e851635b 100644 --- a/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md +++ b/docs/scos/dev/guidelines/keeping-a-project-upgradable/upgradability-guidelines/spryker-dev-packages-checker.md @@ -4,17 +4,13 @@ description: Reference information for evaluator tools. template: howto-guide-template --- -Spryker dev packages checker checks the project spryker dependencies for the "dev-*" constraints. +Spryker dev packages checker checks the project Spryker dependencies for the _dev-*_ constraints. ## Problem description -The project contains the spryker packages dependencies in the `require` section of the `composer.json` file. +Projects contain the Spryker packages dependencies in the `require` section of the `composer.json` file. The integration of new versions of Spryker modules by the Spryker Code Upgrader may fail if some of these packages have references to specific branches that use `dev-*` constraint versions. To prevent this, it is essential to ensure that all Spryker packages have valid version constraints. -Integration may break if some of these packages have references to specific branches using `dev-*` constraint versions. - -To prevent this, it is essential to ensure that all Spryker packages have valid version constraints. - -## Example of code that causes an evaluator error +## Example of code that causes the evaluator error composer.json ```json @@ -29,7 +25,7 @@ composer.json } ``` -## Example of an evaluator error message +## Example of the evaluator error message ```bash ============================ From 318a1636f2eaba83c955e8a371a6afd70bd4ddee Mon Sep 17 00:00:00 2001 From: lenadoc Date: Wed, 27 Sep 2023 16:58:23 +0200 Subject: [PATCH 39/44] fixing syntax --- _scripts/sidebar_checker/excludelist.yml | 3 ++- .../how-to-guides/how-to-send-request-in-data-exchange-api.md | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/_scripts/sidebar_checker/excludelist.yml b/_scripts/sidebar_checker/excludelist.yml index d0ddce7e989..44f5187cfa2 100644 --- a/_scripts/sidebar_checker/excludelist.yml +++ b/_scripts/sidebar_checker/excludelist.yml @@ -14,4 +14,5 @@ drafts-dev # Documents to exclude: docs/scos/user/overview-of-features/202204.0/overview-of-features.md docs/scos/user/overview-of-features/202212.0/overview-of-features.md -index.md \ No newline at end of file +index.md +docs/scos/dev/feature-integration-guides/202307.0/glue-api/dynamic-data-api/data-exchange-api-integration.md \ No newline at end of file diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md index 4760e390e3b..eedd1ecdaa1 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.md @@ -92,7 +92,7 @@ Response sample: } ] ``` - +{% info_block infoBox %} When you combine multiple filters in a single request, the system applies an `AND` condition to the retrieved results. @@ -368,8 +368,6 @@ Content-Length: 143 } ``` -{% endinfo_block %} - {% info_block infoBox %} When using `PUT` requests, it's important to consider that the same rules and configurations apply From 85f8da8c412e25e0a6c0250424410f8edd911557 Mon Sep 17 00:00:00 2001 From: lenadoc Date: Thu, 28 Sep 2023 13:50:09 +0200 Subject: [PATCH 40/44] adding screenshots --- .../how-to-guides/how-to-configure-data-exchange-api.md | 8 ++++---- docs/scos/user/intro-to-spryker/docs-release-notes.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md index e332d621b7e..0003b5ca12d 100644 --- a/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md +++ b/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.md @@ -4,7 +4,7 @@ description: This guide shows how to configure the Data Exchange API endpoints. last_updated: June 23, 2023 template: howto-guide-template redirect_from: - - /docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-configure-data-exchange-api.html + - /docs/scos/dev/glue-api-guides/202304.0/dynamic-data-api/how-to-guides/how-to-configure-data-exchange-api.html --- This document describes how to create and configure the Data Exchange API endpoints. @@ -93,11 +93,11 @@ The following example shows a possible value of the `spy_dynamic_entity_configur 1. In the Back Office, go to **Data Exchange API Configuration**. 2. On the **Data Exchange API Configuration** page, click **Create Data Exchange API configuration**. -[PASTE SCREENSHOT HERE] +![configure-data-exchange-in-back-office](https://spryker.s3.eu-central-1.amazonaws.com/docs/pbc/all/data-exchange/configure-data-exchange-api/configure-data-exchange-in-back-office.png) 3. In **CREATE DATA EXCHANGE API CONFIGURATION** pane, for **TABLE NAME**, select the table you want to configure the API for. In our example, it's `spy_country`. -[PASTE SCREENSHOT HERE] +![create-data-exchange-api-configuration](https://spryker.s3.eu-central-1.amazonaws.com/docs/pbc/all/data-exchange/configure-data-exchange-api/create-data-exchange-api-configuration.png) {% info_block infoBox %} @@ -111,7 +111,7 @@ If you don't see the needed table, it may be [excluded from configuring](/docs/s 5. Optional: To enable the endpoint after it's configured, select **IS ENABLED**. 6. Configure the fields for interactions per your requirements. -[PASTE SCREENSHOT HERE] +![edit-data-exchange-api-configuration](https://spryker.s3.eu-central-1.amazonaws.com/docs/pbc/all/data-exchange/configure-data-exchange-api/edit-data-exchange-api-configuration.png) 7. Click **Save**. diff --git a/docs/scos/user/intro-to-spryker/docs-release-notes.md b/docs/scos/user/intro-to-spryker/docs-release-notes.md index 372a23b980e..38c7f9eb5b0 100644 --- a/docs/scos/user/intro-to-spryker/docs-release-notes.md +++ b/docs/scos/user/intro-to-spryker/docs-release-notes.md @@ -75,7 +75,7 @@ In July 2023, we have added and updated the following pages: - [Security Release Notes 202306.0](/docs/scos/user/intro-to-spryker/releases/release-notes/release-notes-202306.0/security-release-notes-202306.0.html): Added missing security HTTP headers. - [Merchant Users Overview](/docs/pbc/all/merchant-management/202212.0/marketplace/marketplace-merchant-feature-overview/merchant-users-overview.html): Added information about the assignment of groups for the merchant user. - [Handle data with Publish and Synchronization](/docs/scos/dev/back-end-development/data-manipulation/data-publishing/handle-data-with-publish-and-synchronization.html): Publish and Synchronization (P&S) lets you export data from Spryker backend (Zed) to external endpoints. -- [How send a request in Data Exchange API](/docs/scos/dev/glue-api-guides/202304.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html): Added error codes and error code descriptions. +- [How send a request in Data Exchange API](/docs/scos/dev/glue-api-guides/202307.0/data-exchange-api/how-to-guides/how-to-send-request-in-data-exchange-api.html): Added error codes and error code descriptions. - [Install the Spryker Core feature](/docs/pbc/all/miscellaneous/202307.0/install-and-upgrade/install-features/install-the-spryker-core-feature.html): Updated code sample. - [Install Docker prerequisites on Linux](/docs/scos/dev/set-up-spryker-locally/install-spryker/install-docker-prerequisites/install-docker-prerequisites-on-linux.html): Learn about the steps you need to take before you can start working with Spryker in Docker on Linux. - [Payment Service Provider](/docs/pbc/all/payment-service-provider/202212.0/payment-service-provider.html): Different payment methods for your shop. From 4aad02a3421b060186729eccb90c46d4eaba36ac Mon Sep 17 00:00:00 2001 From: lenadoc Date: Thu, 28 Sep 2023 13:55:25 +0200 Subject: [PATCH 41/44] adding the note to the prerequisites list --- .../tax-management/202400.0/base-shop/vertex/install-vertex.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md index e5ff3fece9d..4e4e0f4c7c1 100644 --- a/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md +++ b/docs/pbc/all/tax-management/202400.0/base-shop/vertex/install-vertex.md @@ -21,7 +21,6 @@ Before integrating Vertex, ensure the following prerequisites are met: - The Vertex app catalog page lists specific packages that must be installed or upgraded before you can use the Vertex app. To check the list of the necessary packages, in the Back Office, go to **Apps**-> **Vertex**. Ensure that your installation meets these requirements. -#### Notes - Make sure that your deployment pipeline executes DB migrations. ## 1. Integrate ACP connector module for tax calculation From e7b2cb32118287e0a7ad4bd03a6f768d72ae03bd Mon Sep 17 00:00:00 2001 From: lenadoc Date: Thu, 28 Sep 2023 14:13:58 +0200 Subject: [PATCH 42/44] adjusting the text --- .../best-practices/best-practises-jenkins-stability.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md b/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md index 0e87c82ad4c..6ada0de6915 100644 --- a/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md +++ b/docs/cloud/dev/spryker-cloud-commerce-os/best-practices/best-practises-jenkins-stability.md @@ -25,6 +25,6 @@ Jenkins executors let you orchestrate Jenkins jobs and introduce parallel proces We recommend sticking to the default executor count or the concurrent job limit recommended in the Spryker Service Description for your package. This will help ensure the stability of Jenkins, as configuring more Jenkins Executors is the most common cause of Jenkins instability and crashes. -## Queue Worker Configuration +## Queue worker configuration -If you have configured multiple queue workers per queue, be mindful that the comments made above regarding memory management also apply here. Each configured queue worker can take up to PHP max_memory and increase the total memory demand excessively as they get spawned. Another factor to consider is CPU utilization. If you have configured more workers than you have cores available it will become more likely that processes will wait for CPU, which can ultimately lead to suboptimal performance and even stability issues. You should avoid resource contention like this, by adjusting the workers in a way that will be compatible with your environment package. Our service description includes the number of CPU cores available to you in each package. +If you have configured multiple queue workers per queue, keep in mind that the comments made above regarding memory management also apply in this scenario. Each configured queue worker can consume up to PHP's max_memory, causing a significant increase in total memory demand as they are spawned. Another crucial factor to take into consideration is CPU utilization. If you have configured more workers than the number of available cores, it becomes increasingly likely that processes will need to wait for CPU resources. This can ultimately lead to suboptimal performance and potentially even stability issues. We recommend avoiding resource contention of this nature by adjusting the number of workers in a manner that aligns with your environment package. Our service description specifies the number of CPU cores available to you in each package. \ No newline at end of file From c25e791bc63ec17aa193d74d003312f56f5d5749 Mon Sep 17 00:00:00 2001 From: Helen Kravchenko Date: Mon, 2 Oct 2023 10:22:44 +0200 Subject: [PATCH 43/44] Updating the changelog file --- .github/workflows/build-changelog.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-changelog.yml b/.github/workflows/build-changelog.yml index 30196c5c1ff..6d286dde804 100644 --- a/.github/workflows/build-changelog.yml +++ b/.github/workflows/build-changelog.yml @@ -2,7 +2,7 @@ name: Build changelog on: push: tags: - - "08.2023" + - "09.2023" jobs: release: @@ -31,6 +31,8 @@ jobs: } ] }' + fromTag: "09.2023" + toTag: "09.2023" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From e83ddfbc9d8e40d59c57b673ad57b62a55b8de59 Mon Sep 17 00:00:00 2001 From: Helen Kravchenko Date: Mon, 2 Oct 2023 11:57:13 +0200 Subject: [PATCH 44/44] Updating the changelog file --- .github/workflows/build-changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-changelog.yml b/.github/workflows/build-changelog.yml index 6d286dde804..1a697aa454d 100644 --- a/.github/workflows/build-changelog.yml +++ b/.github/workflows/build-changelog.yml @@ -31,7 +31,7 @@ jobs: } ] }' - fromTag: "09.2023" + fromTag: "08.2023" toTag: "09.2023" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}