<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoPlainText">Hi Christian,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">You need to have the editor role in the GBIF user registry, and be associated with the institution under which the data is going to be published.<o:p></o:p></p>
<p class="MsoPlainText">I have done that and you should be able to publish using the API by posting your user name and password along with the request.<o:p></o:p></p>
<p class="MsoPlainText">At this point I need to know which publishers you would like to have editor rights for.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">A little warning: Please be aware that publishing with the API is a much more fragile process than using the IPT. We have previously had organizations getting entangled in the API publication process, so be careful. I suggest publishing
 against the gbif-uat.org test site to begin with.<o:p></o:p></p>
<p class="MsoPlainText">You have been registered as editor with the user name 'chrissvi' and the account should work soon.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Here is an example using CURL in the Cygwin console:<o:p></o:p></p>
<p class="MsoPlainText"><img width="1276" height="81" id="Picture_x0020_1" src="cid:image001.jpg@01D314F5.5B7D55C0"><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">The last line next to the red arrow is the return value after creating a dataset. This is the dataset UUID.<o:p></o:p></p>
<p class="MsoPlainText">I also have some python code for doing these things.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Let me know if you need any help down the line.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Best,<o:p></o:p></p>
<p class="MsoPlainText">Jan<o:p></o:p></p>
<p class="MsoPlainText"><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<br>
From: API-users [mailto:api-users-bounces@lists.gbif.org] On Behalf Of Christian Svindseth<br>
Sent: 14. august 2017 02:00<br>
To: api-users@lists.gbif.org<br>
Subject: [API-users] Registry API and authentication</p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hello,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">We have a number of datasets we'd like to publish to GBIF directly through the registry APIs, bypassing our IPT completely. I've been looking through the documentation, but got stuck trying to figure out how to authenticate against the
 registry API. I suppose the organization name/password pairs used in the IPT might come into play at some point, but this isn't obvious from the documentation..? Or maybe my own account needs to be authorized to access the registry?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Would love to get some input on this, and if anyone else is doing something similar code samples would be much appreciated!<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Thanks,<o:p></o:p></p>
<p class="MsoPlainText">Christian Svindseth<o:p></o:p></p>
<p class="MsoPlainText">GBIF Norway<o:p></o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">API-users mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:API-users@lists.gbif.org"><span style="color:windowtext;text-decoration:none">API-users@lists.gbif.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="https://lists.gbif.org/mailman/listinfo/api-users"><span style="color:windowtext;text-decoration:none">https://lists.gbif.org/mailman/listinfo/api-users</span></a><o:p></o:p></p>
</div>
</body>
</html>