{"id":1043,"date":"2014-12-23T13:47:42","date_gmt":"2014-12-23T21:47:42","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=1043"},"modified":"2014-12-23T13:47:42","modified_gmt":"2014-12-23T21:47:42","slug":"civicase-civicrm-php-command-line-for-apis","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2014\/12\/23\/civicase-civicrm-php-command-line-for-apis\/","title":{"rendered":"civiCase civiCRM php command line for apis"},"content":{"rendered":"<p>The basics<\/p>\n<p><a href=\"https:\/\/civicrm.org\/blogs\/xavier\/api_batch_tools\">https:\/\/civicrm.org\/blogs\/xavier\/api_batch_tools<\/a><\/p>\n<p style=\"padding-left: 30px;\">Here are the new usage directions for 4.2:<\/p>\n<p style=\"padding-left: 30px;\">\u00a0* Usage:<br \/>\n* php bin\/csv\/import.php -e &lt;entity&gt; &#8211;file \/path\/to\/csv\/file [ -s site.org ]<br \/>\n* e.g.: php bin\/csv\/import.php -e Contact &#8211;file \/tmp\/import.csv<\/p>\n<p style=\"padding-left: 30px;\">\u00a0* Usage:<br \/>\n* php bin\/csv\/export.php -e &lt;entity&gt; [ &#8211;field=value &#8211;field=value ] [ -s site.org ]<br \/>\n* e.g.: php bin\/csv\/export.php -e Contact &#8211;email=<a href=\"mailto:jamie@progressivetech.org\">jamie@progressivetech.org<\/a> -s mygroup.org<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Step one: Open myPHP and export fields for groups<\/p>\n<p>Setp two: Create csv of new values with relevant fields in first row (use comma separated values)<\/p>\n<p>Step three: run import.php with relevant csv file<\/p>\n<p>as super user<\/p>\n<pre>php \/var\/www\/drupal\/sites\/all\/modules\/contrib\/civicrm\/bin\/cli.php -e contact -a get --output --id=2<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/localhost\/?q=civicrm\/api\/doc\">http:\/\/localhost\/?q=civicrm\/api\/doc<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/localhost\/?q=civicrm\/api\/explorer\">http:\/\/localhost\/?q=civicrm\/api\/explorer<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The basics https:\/\/civicrm.org\/blogs\/xavier\/api_batch_tools Here are the new usage directions for 4.2: \u00a0* Usage: * php bin\/csv\/import.php -e &lt;entity&gt; &#8211;file \/path\/to\/csv\/file [ -s site.org ] * e.g.: php bin\/csv\/import.php -e Contact &#8211;file \/tmp\/import.csv \u00a0* Usage: * php bin\/csv\/export.php -e &lt;entity&gt; [ &#8211;field=value &#8211;field=value ] [ -s site.org ] * e.g.: php bin\/csv\/export.php -e Contact &#8211;email=jamie@progressivetech.org -s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-1043","post","type-post","status-publish","format-standard","hentry","category-civicrm","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=1043"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/1043\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=1043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=1043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=1043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}