{"id":45,"date":"2018-05-07T14:51:51","date_gmt":"2018-05-07T14:51:51","guid":{"rendered":"http:\/\/ross2.oas.inaf.it\/wp\/imprs18\/?page_id=45"},"modified":"2021-12-10T11:51:57","modified_gmt":"2021-12-10T09:51:57","slug":"step-by-step-commands","status":"publish","type":"page","link":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/the-course\/step-by-step-commands\/","title":{"rendered":"Step by step commands"},"content":{"rendered":"<blockquote><p>You must have <a href=\"\/wp\/imprs18\/software\/installing-sid\/\">SID<\/a> or <a href=\"\/wp\/imprs18\/software\/installing-dif\/\">DIF<\/a> installed to run the SQL commands that use spherical coordinates functions \/ procedures.<\/p><\/blockquote>\n<p>Open <strong>two terminals<\/strong> and in one start the MySQL client application as <tt>root<\/tt>, preferably from the <tt>Data<\/tt> working directory (and with the files used in the examples present in it), and give the (MySQL) root password:<br \/>\nshell> <code>mysql --local-infile=1 -u root -p<\/code><br \/>\nBelow the MySQL client default prompt <tt>mysql&gt;<\/tt> (or <tt>MariaDB [...]><\/tt>) is omitted for an easier cut-and-paste.<\/p>\n<p>Create the <tt>mpe2018db<\/tt> database:<\/p>\n<pre>\r\ncreate database mpe2018db;\r\n<\/pre>\n<p>Create a course reference user <tt>mpeusr<\/tt>:<\/p>\n<pre>\r\ncreate user mpeusr@localhost identified by \"mpe2018pass\";\r\n<\/pre>\n<p>Grant all privileges (<tt>select, insert, delete, update, ...<\/tt>) to user <tt>mpeusr<\/tt> on the database <tt>mpe2018db<\/tt>:<\/p>\n<pre>\r\ngrant all privileges on mpe2018db.* to mpeusr@localhost;\r\nflush privileges;\r\nexit;\r\n<\/pre>\n<p>Because you can perform SQL queries directly from the shell command line using the option <tt>-e<\/tt> for the <tt>mysql<\/tt> command, lets give some simple usage examples:<\/p>\n<pre>\r\nshell&gt; mysql -u mpeusr -pmpe2018pass mpe2018db -e \"show databases\"\r\nshell&gt; mysql -u mpeusr -pmpe2018pass mpe2018db -e \"show tables from information_schema\"\r\nshell&gt; mysql -u mpeusr -pmpe2018pass -e \"describe information_schema.tables\"\r\nshell&gt; mysql -u mpeusr -pmpe2018pass -e \"describe columns\" information_schema\r\nshell&gt; mysql -u mpeusr -p -e \"select version(), database(), user(), connection_id()\"\r\nEnter password: mpe2018pass\r\nshell&gt; mysql -u mpeusr -p -e \"select curdate(), curtime(), now()\" mpe2018db\r\nEnter password: mpe2018pass\r\n<\/pre>\n<p>In these cases the database name <tt>mpe2018db<\/tt> could be omitted because we are not using any table in it. It will be mandatory for other queries we will use in the course.<br \/>\nNow let&#8217;s login as <tt>mpeusr<\/tt> and move to the <tt>mpe2018db<\/tt> DB:<\/p>\n<pre>\r\nshell&gt; mysql -u mpeusr -p\r\nEnter password: mpe2018pass\r\n<\/pre>\n<p>If you want to avoid to give user and password at each <tt>mysql<\/tt> invocation, you can set the default values in the special file <tt>.my.cnf<\/tt> placed in your home directory (<tt>$HOME<\/tt>):<\/p>\n<pre>\r\n[client]\r\nuser = mpeusr\r\npassword = mpe2018pass\r\n<\/pre>\n<p>Of course, if you prefer to work always with the root privileges, can set <code>user = root<\/code> and set the corresponding password. See also below.<\/p>\n<pre>\r\nuse mpe2018db;\r\n-- see who you are and in which database\r\nselect user(), current_user(), database();\r\n+------------------+------------------+------------+\r\n| user()           | current_user()   | database() |\r\n+------------------+------------------+------------+\r\n| mpeusr@localhost | mpeusr@localhost | mpe2018db  |\r\n+------------------+------------------+------------+\r\n<\/pre>\n<blockquote><p>In MySQL commands \/ functions \/ procedures \/ column names \/ etc. are <strong>NOT<\/strong> case sensitive. However, to be compliant with any operating system, you must assume that anything connected to your machine, like the <strong>database<\/strong>, <strong>table<\/strong> and <strong>user<\/strong> names <strong>ARE<\/strong> case sensitive!<\/p><\/blockquote>\n<h3>First demo tables<\/h3>\n<p><strong>Note:<\/strong> We assume that you have created a working directory, e.g. <tt>mpe2018<\/tt>, in your <tt>$HOME<\/tt><\/p>\n<pre>\r\nshell&gt; cd\r\nshell&gt; mkdir mpe2018\r\nshell&gt; cd mpe2018\r\nshell&gt; mkdir Data\r\nshell&gt; ...\r\n<\/pre>\n<p>and downloaded there (or will download when requested) the files with a directory structure like that reported in the <a href=\"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/the-course\/#mpe2018_dirtree\">course summary<\/a>.<\/p>\n<p><strong>An optical catalogue: the UCAC-2<\/strong><br \/>\nFrom the second terminal just copy the UCAC2 table files (MyISAM format) from the <tt>Data<\/tt> directory into the <tt>mpe2018db<\/tt> database directory. Can check its location in several ways, depending on installation and OS. These methods are generic:<br \/>\nshell> <code>mysqladmin -u root -p variables | grep datadir<\/code><br \/>\nor<br \/>\nshell> <code>mysql -u root -p -e \"show variables like 'datadir'\"<\/code><\/p>\n<p>or from the MySQL client terminal:<\/p>\n<pre>\r\nSHOW VARIABLES LIKE 'datadir'; \r\n+---------------+-----------------------+\r\n| Variable_name | Value                 |\r\n+---------------+-----------------------+\r\n| datadir       | \/usr\/local\/mysql\/var\/ |\r\n+---------------+-----------------------+\r\n<\/pre>\n<p>Assuming it is in <tt>\/var\/lib\/mysql\/<\/tt>:<br \/>\nshell> <code>sudo chown mysql:mysql ~\/mpe2018\/Data\/ucac2_initial.*<\/code><br \/>\nshell> <code>sudo cp -a ~\/mpe2018\/Data\/ucac2_initial.* \/var\/lib\/mysql\/mpe2018db\/<\/code><\/p>\n<p>To avoid duplicated file, instead of <tt>cp -a<\/tt> you could have used <tt>mv<\/tt> !<br \/>\nLet&#8217;s check the catalogue:<\/p>\n<pre>\r\n-- be sure the table is visible\r\nflush tables;\r\n-- show its structure\r\ndescribe ucac2_initial;\r\n-- show the number of rows it has\r\nselect count(*) from ucac2_initial;\r\n<\/pre>\n<p>We&#8217;ll use this catalogue later (see below).<\/p>\n<p>The system <code>information_schema<\/code> table:<\/p>\n<pre>\r\nshow tables from information_schema;\r\ndescribe information_schema.tables;\r\ndescribe information_schema.columns;\r\nselect * from information_schema.tables where table_name='ucac2_initial';\r\nselect * from information_schema.columns where table_name='ucac2_initial';\r\nSELECT table_name FROM INFORMATION_SCHEMA.TABLES where table_schema='mpe2018db' AND table_type != 'View';\r\nSELECT table_name FROM INFORMATION_SCHEMA.TABLES where table_schema='mpe2018db' AND table_type = 'View';\r\nSELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_name like 'sky%';\r\n<\/pre>\n<p><strong>An X-ray catalogue from the Chandra archive<\/strong> (see <a href=\"https:\/\/cxc.cfa.harvard.edu\/csc\/cli\/\" rel=\"noopener\" target=\"_blank\">https:\/\/cxc.cfa.harvard.edu\/csc\/cli\/<\/a>).<br \/>\nCreate the Chandra sources demo table using the SQL dump file (see file):<\/p>\n<pre>\r\nsource ~\/mpe2018\/Soft\/SQL\/crea_cx_tab.sql\r\nshow create table cx_src1;\r\n\r\n-- show the number of rows\r\nselect count(*) from cx_src1;\r\n<\/pre>\n<p>Import the Chandra sources demo table created with the command (in the <tt>Data<\/tt> dir., where <tt>csc_query.sql<\/tt> is located):<br \/>\n<code>shell> curl -o csc_out.csv --form coordFormat=decimal --form outputFormat=csv --form nullAppearance=NULL --form query=@csc_query.sql \"https:\/\/cda.cfa.harvard.edu\/csccli\/getProperties\"<\/code><br \/>\nHave a look to the output file <tt>csc_query.csv<\/tt>.<\/p>\n<pre>\r\nload data local infile \"~\/mpe2018\/Data\/csc_out.csv\" into table cx_src1 IGNORE 11 LINES;\r\n<\/pre>\n<p>or, to make explicit the defaults parameters:<\/p>\n<pre>\r\nload data local infile \"~\/mpe2018\/Data\/csc_out.csv\" into table cx_src1 FIELDS TERMINATED BY '\\t' LINES TERMINATED BY '\\n' IGNORE 11 LINES;\r\n<\/pre>\n<p>If <code class=\"nohighlight\">LOCAL<\/code> capability is disabled, on either the server or client side, a client that attempts to issue a <tt>LOAD DATA LOCAL<\/tt> statement receives the following error message:<\/p>\n<pre class=\"nohighlight\">\r\n<code class=\"nohighlight\"><tt>ERROR 1148: The used command is not allowed with this MySQL version<\/tt><\/code>\r\n<\/pre>\n<p>See the <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/load-data.html\" rel=\"noopener\" target=\"_blank\">MySQL reference page<\/a>.<\/p>\n<p>Will note <tt>Warnings: 35862<\/tt>. That is because of logical fields marked TRUE\/FALSE and empty fields that are not managed correctly. In fact:<\/p>\n<pre>\r\nshow warnings;\r\nselect * from cx_src1 limit 10;\r\n\r\nselect count(*) from cx_src1 where extent_flag=1 or conf_flag=1;\r\n-- will return 0\r\n<\/pre>\n<p>We should have used BIT datatype, but it is not recommended. Then we use the correct import transforming them into 1\/0 and also consider empty flux columns:<\/p>\n<pre>\r\nload data infile \"~\/mpe2018\/Data\/csc_out.csv\" into table cx_src1 IGNORE 11 LINES (name,ra,de,@c4,err_ellipse_r0,err_ellipse_r1,@c7,@c8,@c9,significance) set extent_flag=(@c4 like \"%TRUE\"), conf_flag=(@c7 like \"%TRUE\"), flux_aper_w = nullif(@c8,\"\"), flux_aper_b = nullif(@c9,\"\");\r\n<\/pre>\n<p>Note the use of local variables (starting with <tt>@<\/tt>) and the <tt>%<\/tt> in the <tt>like<\/tt> comparison. Note also that <code>nullif(exp1,expx2)<\/code> returns <tt>NULL<\/tt> if <tt>expr1=expr2<\/tt>:<\/p>\n<pre>\r\nselect * from cx_src1 limit 10;\r\nselect count(*) from cx_src1 where extent_flag=1 or conf_flag=1;\r\n-- will now return 3282\r\n<\/pre>\n<pre>\r\nselect count(*) from cx_src1 where isnull(flux_aper_b);\r\n<\/pre>\n<p>or<\/p>\n<pre>\r\nselect count(*) from cx_src1 where flux_aper_b is null;\r\n-- will return 11193\r\n<\/pre>\n<p>See also the function <code>ifnull()<\/code>.<\/p>\n<p>Some SQL commands you can try:<\/p>\n<pre>\r\nhelp\r\nhelp contents\r\nstatus\r\nprompt MySQL&gt;\r\nprompt \\u@\\h [\\d]&gt;\r\nprompt  -- back to default prompt\r\nshow tables;\r\nshow table status like \"cx%\" ;\r\ndelimiter \/\/  -- change the end command delimiter\r\nshow collation \/\/\r\nshow engines\\G\r\ndelimiter ;  -- back to default delimiter\r\nselect version(), database(), user(), connection_id();\r\nselect curdate(), curtime(), now();\r\n\r\nselect @sql_mode;\r\nselect @@sql_mode;\r\n<\/pre>\n<p>Let&#8217;s perform a query on the <tt>INFORMATION_SCHEMA<\/tt> to see which tables I have access to, excluding those in <tt>INFORMATION_SCHEMA<\/tt> itself:<\/p>\n<pre>\r\n-- see who you are and in which database\r\nselect current_user(), database();\r\n+------------------+------------+\r\n| current_user()   | database() |\r\n+------------------+------------+\r\n| mpeusr@localhost | mpe2018db  |\r\n+------------------+------------+\r\n\r\nuse mpe2018db;\r\nSELECT table_schema, table_name from INFORMATION_SCHEMA.TABLES WHERE table_schema != 'INFORMATION_SCHEMA';\r\n<\/pre>\n<p>You can customize the MySQL client editing the user specific configuration file <tt>$HOME\/.my.cnf<\/tt> (or the system level <tt>my.cnf<\/tt>) in the section <tt>[client]<\/tt> or using environment variables. An example file content is (comment rows start with <tt>#<\/tt>):<\/p>\n<pre>\r\n[client]\r\nuser     = root\r\npassword = _root_password_\r\nhost     = localhost\r\nsocket   = \/tmp\/mysql.sock\r\n#port     = 3306\r\n<\/pre>\n<p>This would allow the user to enter the MySQL client without the need to enter user and password, but simply typing <tt>mysql<\/tt>. For example to list the table in the <tt>mpe2018db<\/tt> database:<\/p>\n<pre>\r\nshell&gt; mysql -e \"show tables from mpe2018db\"\r\n<\/pre>\n<p>Some environment variable also affect the MySQL behavior. From the terminal you can, for example, change the prompt like this:<br \/>\n(bash) <code>export MYSQL_PS1=\"\\u@\\h [\\d]&gt; \"<\/code><br \/>\n(tcsh) <code>setenv MYSQL_PS1 \"\\u@\\h [\\d]&gt; \"<\/code><br \/>\nwhich will produce something like: <tt>mpeusr@localhost [mpe2018db]&gt;<\/tt><\/p>\n<p><strong>Let&#8217;s practice with SQL performing SELECT queries, creating new tables and changing columns format.<\/strong> You do not need to follow the examples in this order. Just make sure you have SID (or DIF) installed.<\/p>\n<h3>Practicing with the <strong>Messier Catalogue<\/strong><\/h3>\n<p>TSV files used: <a href=\"\/imprs-db\/Data\/messier.tsv\">messier.tsv<\/a> and <a href=\"\/imprs-db\/Data\/messier_legend.tsv\">messier_legend.tsv<\/a><br \/>\nDownload the files into your working data directory <tt>Data<\/tt> and go to the MySQL client terminal.<br \/>\nStep by step exercises using SID <a href=\"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/the-course\/sid-messier-catalogue-demo\/\">here<\/a>.<br \/>\nStep by step exercises using DIF <a href=\"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/the-course\/dif-messier-catalogue-demo\/\">here<\/a>.<\/p>\n<h3>Practicing with the <strong>Bright Stars Catalogue<\/strong><\/h3>\n<p>Catalogue reference: <a href=\"https:\/\/cdsarc.u-strasbg.fr\/viz-bin\/Cat?V\/50\" rel=\"noopener\" target=\"_blank\">https:\/\/cdsarc.u-strasbg.fr\/viz-bin\/Cat?V\/50<\/a><br \/>\nSQL dump files used: <a href=\"\/imprs-db\/Data\/bsc.sql\">bsc.sql<\/a> and <a href=\"\/imprs-db\/Data\/bsc.sql\">bsc.sql<\/a><a href=\"\/imprs-db\/Data\/simpleBSC.sql\">simpleBSC.sql<\/a> (compact version).<br \/>\nDownload the files into your working data directory <tt>Data<\/tt> and go to the MySQL client terminal.<br \/>\nStep by step exercises <a href=\"\/wp\/imprs18\/the-course\/the-bright-stars-catalogue\/\">here<\/a>.<\/p>\n<h3>Practicing with the <strong>ASCC2.5<\/strong><\/h3>\n<p>Catalogue reference: <a href=\"https:\/\/cdsarc.u-strasbg.fr\/viz-bin\/Cat?I\/280A\" rel=\"noopener\" target=\"_blank\">https:\/\/cdsarc.u-strasbg.fr\/viz-bin\/Cat?I\/280A<\/a><br \/>\nSQL dump file used: <a href=\"\/imprs-db\/Data\/ascc25_initial.sql.gz\">ascc25_initial.sql.gz<\/a><br \/>\nCopy and decompress it into the data directory <tt>Data<\/tt> and go to the MySQL client terminal.<br \/>\nStep by step exercises <a href=\"\/wp\/imprs18\/the-course\/the-ascc2-5-catalogue\/\">here<\/a>.<\/p>\n<h3>Practicing with a sample of <strong>SDSS<\/strong> galaxies<\/h3>\n<p>Catalogue reference: <a href=\"https:\/\/skyserver.sdss.org\/dr14\/en\/tools\/search\/form\/searchform.aspx\" rel=\"noopener\" target=\"_blank\">SDSS SkyServer<\/a><br \/>\nCSV file used: <a href=\"\/imprs-db\/Data\/abell2065_2deg_radius.csv\">abell2065_2deg_radius.csv<\/a><br \/>\nCopy it into the directory <tt>Data<\/tt> and go to the MySQL client terminal.<br \/>\nStep by step exercises <a href=\"\/wp\/imprs18\/the-course\/sdss-sample-of-galaxies\/\">here<\/a>.<\/p>\n<h3>Exporting data to CSV file<\/h3>\n<p>First check which is the MySQL predefined dump directory you can write into:<\/p>\n<pre>\r\nshell> mysqladmin -u root -p  variables | grep secure_file_priv\r\n<\/pre>\n<p>Returning for example <tt>\/var\/lib\/mysql-files\/<\/tt>.<br \/>\nThe default value is platform specific and can be changed using the <tt>--secure-file-priv=dir<\/tt> option given to the MySQL server deamon <tt>mysqld<\/tt>. See the manual page for more details.<\/p>\n<p>Then use this directory in the query:<\/p>\n<pre>\r\nSELECT ramas\/3.6e6 as radeg, decmas\/3.6e6 as decdeg, Vmm\/1000 as Vmag, (Bmm-Vmm)\/1000 as color\r\nFROM ascc25\r\nWHERE Bmm > -9999 AND Vmm > -9999\r\nLIMIT 1000 -- remove to dump the whole catalogue\r\nINTO OUTFILE '\/var\/lib\/mysql-files\/ascc25_out.csv'\r\nFIELDS TERMINATED BY ',' \r\nOPTIONALLY ENCLOSED BY '\"'\r\nESCAPED BY '\\\\'\r\nLINES TERMINATED BY '\\n';\r\n<\/pre>\n<p>Check the output file, e.g. <code>sudo vi \/var\/lib\/mysql-files\/ascc25_out.csv<\/code>.<\/p>\n<p>So let&#8217;s explain the various pieces.<br \/>\nThe first part before the <tt>INTO<\/tt> line is your query. This can be any <tt>SELECT<\/tt> query, including conditions and joins, to retrieve the data-set you wish.<br \/>\nAfter the <tt>SELECT<\/tt> query, the CSV output data definitions start:<\/p>\n<p><tt>INTO OUTFILE<\/tt>: here you state the path where you want MySQL to store the CSV file. Keep in mind that the path needs to be writable for the MySQL user.<br \/>\n<tt>FIELD TERMINATED BY ','<\/tt>: this is the field delimiter character. You could have used a semi-colon or a tab (<tt>\\t<\/tt>) instead.<br \/>\n<tt>OPTIONALLY ENCLOSED BY<\/tt>: the character you use to enclose the fields in.<br \/>\n<tt>ESCAPED BY<\/tt>: the escape character used in case of special characters in your output<br \/>\n<tt>LINES TERMINATED BY<\/tt>: here you define the line-end.<\/p>\n<p>The <tt>LIMIT 1000<\/tt> is just to reduce the output file size.<br \/>\nIn the output CSV you might see values as <tt>\\N<\/tt> when <tt>NULL<\/tt> values are present in the table. This is a required if you want to re-import that CSV file into a DB table.<\/p>\n<h3>User defined SQL functions<\/h3>\n<p>Let&#8217;s add a function to display in scientific notation real\/double values. First exit the MySQL client session and enter as user root:<\/p>\n<pre>\r\nmysql&gt; exit;\r\nshell&gt; mysql -u root -p mpe2018db;\r\n<\/pre>\n<p>Then let&#8217;s create the function (we keep 6 fractional digits):<\/p>\n<pre>\r\ndrop function if exists sci;\r\nDELIMITER $$\r\ncreate function sci (val DOUBLE) returns text\r\ndeterministic language sql\r\nbegin\r\n  set @exp = IF(val=0, 0, FLOOR(LOG10(ABS(val))));\r\n  return CONCAT(FORMAT(val*POWER(10,-@exp), 6), 'e', @exp);\r\nend$$\r\nDELIMITER ;\r\n\r\nselect sci(min(Vmm\/1000)), sci(max(Vmm\/1000)), sci(avg(Vmm\/1000)) from ascc25 where Vmm > -9999;\r\n\r\n+--------------------+--------------------+--------------------+\r\n| sci(min(Vmm\/1000)) | sci(max(Vmm\/1000)) | sci(avg(Vmm\/1000)) |\r\n+--------------------+--------------------+--------------------+\r\n| -1.110000e0        | 1.675000e1         | 1.107064e1         |\r\n+--------------------+--------------------+--------------------+\r\n<\/pre>\n<p>Assuming the <tt>color<\/tt> field is present (if not, create it as the difference between <tt>Bmm\/1000<\/tt> and <tt>Vmm\/1000<\/tt>):<\/p>\n<pre>\r\nselect sci(min(color)), sci(max(color)), sci(avg(color)) from ascc25 where color != -900;\r\n<\/pre>\n<p>And now let&#8217;s extend the privileges for the user <tt>mpeusr<\/tt>:<\/p>\n<pre>\r\nshow grants for mpeusr@localhost;\r\n\r\ngrant execute on function mpe2018db.sci to mpeusr@localhost;\r\n<\/pre>\n<blockquote><p>Note how in the examples above we mixed the use of lower \/ upper case for command and function names, as well as for column names. Again, this is because MySQL is not case sensitive!<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You must have SID or DIF installed to run the SQL commands that use spherical coordinates functions \/ procedures. Open two terminals [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":16,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-45","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/pages\/45"}],"collection":[{"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":2,"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/pages\/45\/revisions"}],"predecessor-version":[{"id":779,"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/pages\/45\/revisions\/779"}],"up":[{"embeddable":true,"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/pages\/16"}],"wp:attachment":[{"href":"https:\/\/ross2.oas.inaf.it\/wp\/imprs18\/wp-json\/wp\/v2\/media?parent=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}