{"id":14968698,"url":"https://github.com/colorfield/rest_import","last_synced_at":"2026-01-15T23:03:30.928Z","repository":{"id":150261773,"uuid":"76017097","full_name":"colorfield/rest_import","owner":"colorfield","description":"Import and convert Rest resources into Drupal 8 entities.","archived":false,"fork":false,"pushed_at":"2017-03-22T14:07:36.000Z","size":24,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T12:33:05.867Z","etag":null,"topics":["converter","drupal","drupal8","entity","json","rest"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/colorfield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-09T08:34:07.000Z","updated_at":"2017-04-15T10:08:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"b605b6ec-4a8e-4bbd-9d8a-b0466d6442dc","html_url":"https://github.com/colorfield/rest_import","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"0adb827effb0796f25762fbd7c4f6cd84dc7e841"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/colorfield/rest_import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfield%2Frest_import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfield%2Frest_import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfield%2Frest_import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfield%2Frest_import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/colorfield","download_url":"https://codeload.github.com/colorfield/rest_import/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/colorfield%2Frest_import/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28473974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:27:41.514Z","status":"ssl_error","status_checked_at":"2026-01-15T21:54:47.910Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","drupal","drupal8","entity","json","rest"],"created_at":"2024-09-24T13:40:25.299Z","updated_at":"2026-01-15T23:03:30.913Z","avatar_url":"https://github.com/colorfield.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST import\n\n*Currently under development, issues that needs to be fixed prior to publishing on Drupal.org are marked as 8.1.x-dev*\n\nThe focus of this module is to allow import and conversion of REST resources into Drupal 8 entities. \nIt provides the tools for easily import contents from other applications via a web service.\nThe approach is to use inheritance of converters instead of configuration via YAML (this is the main difference with Migrate style).\n\nCurrently, only JSON is supported, further development can include XML and HAL.\n\nThe scope of the operations are create, update, translate and delete.\n\nIt is based on a mapping defined in in the EntityMapper class that \n- maps a source entity (e.g. \"news\") and a target\nDrupal 8 entity type and entity id, also known as \"bundle\" (e.g. \"node\" and \"article\").\n- defines a converter class, each external entity can be converted into a Drupal entity by defining a class that implements \nthe EntityConverterInterface.\n\n## JSON model definition\n\nThe proposed web service definition is based on [jsonapi.org](http://jsonapi.org/).\nFurther explanations can be found in the json directory.\n\nThe import can be triggered by a cron or manually. Each request to import resources \nare then enqueued via the Queue API.\n\n## Installation\n\n1. Enable the rest_import module\n2. Configure the web service (/admin/config/rest_import/web_service), see config below or get the active one from configuration management.\n3. Make sure that the web service is reachable.\n\n## One time import\n\nUse manual operations\n\n1. Populate the queue by entity, respect the sequence: /admin/rest_import/operations\n2. Click on Process queue or process the queue using drush `drush queue-run manual_entity_process`\n\n## Regular import\n\nThis handles regular import based on update of each entity, each time. \nIt triggers a sequence of entity types for each language then enqueue the results and execute the queue via a cron worker.\n\n## Diff import\n\nThis import method relies on bi-directional web service exchange : the web service waits for confirmation of import then provides only the items that were not imported yet.\nThe action passed for each entity can the be create, update or delete.\n\nIt is not currently being implemented.\n\n## Example of web service configuration\n\n- Endpoint: http://my.domain.org/webservice\n- Debug endpoint: http://my.local.dev/modules/custom/rest_import/json\n- Debug mode: No\n- Limit per batch: 0\n- Default language: en\n- Import user: admin\n- Format: JSON\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolorfield%2Frest_import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcolorfield%2Frest_import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcolorfield%2Frest_import/lists"}