Difference between revisions of "GOCDB/PI/get user method"

From EGIWiki
< GOCDB‎ | PI
Jump to: navigation, search
(Output Example)
(Method: get_user)
 
(11 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
{| {{egi-table}}  
 
{| {{egi-table}}  
 
|-
 
|-
| '''Description''' || Returns a user or a list of users with associated details and roles
+
| '''Description''' || Returns a user or a list of users with associated details and roles. Note that roles apply to a particular project – this is shown in the XML which qualifies which user-roles apply to which project using the RECOGNISED_IN_PROJECTS element.
 
|-
 
|-
 
| '''Protection Level''' || Protected (level 2)  
 
| '''Protection Level''' || Protected (level 2)  
Line 29: Line 29:
 
| surname || Limit results to user(s) with given surename || any string || all || ?method=get_user&surname=Smith  
 
| surname || Limit results to user(s) with given surename || any string || all || ?method=get_user&surname=Smith  
 
|-
 
|-
| roletype || Limit results to user(s) with the specified role type(s) || comma separated list of role types || all || ?method=get_user&roletype=EGI CSIRT Officer,Chief Operations Officer
+
| roletype || Limit results to user(s) with the specified role type(s) || single or comma separated list of role types (multiple roles are OR'd together) || all || ?method=get_user&roletype=EGI CSIRT Officer,Chief Operations Officer
 +
|-
 +
| Docs for cursor params coming soon.
 +
| Limit results and use cursor paging to iterate over all results
 +
| [https://wiki.egi.eu/wiki/GOCDB/notifications#Optional_Cursor_Paging_on_Read_API See here for info]
 +
|
 +
|
 
|}
 
|}
  
 +
<!--- Removed from V5
 
=== XML schema ===
 
=== XML schema ===
  
 
https://goc.egi.eu/gocdbpi/private/?method=get_user&output=xmlschema
 
https://goc.egi.eu/gocdbpi/private/?method=get_user&output=xmlschema
 +
-->
  
 
=== Output Example ===
 
=== Output Example ===
 
+
Note, values for ENTITY_TYPE element are: site, project, servicegroup, ngi
<?xml version="1.0" encoding="UTF-8"?>
+
<Source Lang="XML">
 
<results>
 
<results>
  <EGEE_USER ID="1484G0" PRIMARY_KEY="1484G0">
+
    <EGEE_USER ID="1484G0" PRIMARY_KEY="1484G0">
    <FORENAME>David</FORENAME>
+
<FORENAME>David</FORENAME>
    <SURNAME>Meredith</SURNAME>
+
<SURNAME>Meredith</SURNAME>
    <TITLE>Dr</TITLE>
+
<TITLE>Dr</TITLE>
    <DESCRIPTION></DESCRIPTION>
+
<DESCRIPTION/>
    <GOCDB_PORTAL_URL>https://goc.egi.eu/portal/index.php?Page_Type=User&amp;id=1484</GOCDB_PORTAL_URL>
+
<GOCDB_PORTAL_URL>https://gocdb-test.esc.rl.ac.uk/portal/index.php?Page_Type=User;ampid=1484</GOCDB_PORTAL_URL>
    <EMAIL>david.meredith@stfc.ac.uk</EMAIL>
+
<EMAIL>david.meredith@stfc.ac.uk</EMAIL>
    <TEL>+44 1925 603762</TEL>
+
<TEL>+44 1925 603762</TEL>
    <WORKING_HOURS_START/>
+
<WORKING_HOURS_START/>
    <WORKING_HOURS_END/>
+
<WORKING_HOURS_END/>
    <CERTDN>/C=UK/O=eScience/OU=CLRC/L=DL/CN=david meredith</CERTDN>
+
<CERTDN>/C=UK/O=eScience/OU=CLRC/L=DL/CN=david meredith</CERTDN>
    <APPROVED/>
+
<SSOUSERNAME>davidm</SSOUSERNAME>
    <ACTIVE/>
+
<APPROVED/>
    <HOMESITE></HOMESITE>
+
<ACTIVE/>
    <USER_ROLE>
+
<HOMESITE/>
      <USER_ROLE>Service Group Administrator</USER_ROLE>
+
<USER_ROLE>
      <ON_ENTITY>OPSTOOLS</ON_ENTITY>
+
    <USER_ROLE>Service Group Administrator</USER_ROLE>
      <ENTITY_TYPE>servicegroup</ENTITY_TYPE>
+
    <ON_ENTITY>OPSTOOLS</ON_ENTITY>
    </USER_ROLE>
+
    <ENTITY_TYPE>servicegroup</ENTITY_TYPE>
    <USER_ROLE>
+
    <PRIMARY_KEY>722G0</PRIMARY_KEY>
      <USER_ROLE>Service Group Administrator</USER_ROLE>
+
    <RECOGNISED_IN_PROJECTS/>            <!-- ***new element (ServiceGroup role is Project agnostic)*** -->
      <ON_ENTITY>DAVETESTSG</ON_ENTITY>
+
</USER_ROLE>
      <ENTITY_TYPE>servicegroup</ENTITY_TYPE>
+
<USER_ROLE>
    </USER_ROLE>
+
    <USER_ROLE>Chief Operations Officer</USER_ROLE>
    <USER_ROLE>
+
    <ON_ENTITY>StandaloneProjectX</ON_ENTITY>
      <USER_ROLE>Site Operations Manager</USER_ROLE>
+
    <ENTITY_TYPE>project</ENTITY_TYPE>
      <ON_ENTITY>GRIDOPS-GOCDB</ON_ENTITY>
+
    <PRIMARY_KEY>1505</PRIMARY_KEY>
      <ENTITY_TYPE>site</ENTITY_TYPE>
+
    <RECOGNISED_IN_PROJECTS>                    <!-- ***new element*** -->
    </USER_ROLE>
+
<PROJECT ID="1505">StandaloneProjectX</PROJECT>
  </EGEE_USER>
+
    </RECOGNISED_IN_PROJECTS>
 +
</USER_ROLE>
 +
<USER_ROLE>
 +
    <USER_ROLE>Site Operations Manager</USER_ROLE>
 +
    <ON_ENTITY>GRIDOPS-GOCDB</ON_ENTITY>
 +
    <ENTITY_TYPE>site</ENTITY_TYPE>
 +
    <PRIMARY_KEY>123G0</PRIMARY_KEY>
 +
    <RECOGNISED_IN_PROJECTS>                  <!-- ***new element*** -->
 +
<PROJECT ID="1">EGI</PROJECT>
 +
    </RECOGNISED_IN_PROJECTS>
 +
</USER_ROLE>
 +
<USER_ROLE></USER_ROLE>
 +
    </EGEE_USER>
 +
</results>
 +
</Source>
 
<!--
 
<!--
 
</EGEE_USER>
 
</EGEE_USER>
Line 100: Line 122:
 
   </EGEE_USER>
 
   </EGEE_USER>
 
-->
 
-->
</results>
+
 
 +
 
 +
 
  
 
[[GOCDB/PI/Technical_Documentation|Back to GOCDB technical Documentation main page]]
 
[[GOCDB/PI/Technical_Documentation|Back to GOCDB technical Documentation main page]]

Latest revision as of 15:24, 16 December 2016

Main EGI.eu operations services Support Documentation Tools Activities Performance Technology Catch-all Services Resource Allocation Security


GOC DB menu: Home Documentation Index


Method: get_user

Description Returns a user or a list of users with associated details and roles. Note that roles apply to a particular project – this is shown in the XML which qualifies which user-roles apply to which project using the RECOGNISED_IN_PROJECTS element.
Protection Level Protected (level 2)

Entry point

https://goc.egi.eu/gocdbpi/private/?method=get_user

parameters

parameter effect format/value(s) default example
dn Limit results to user with given certificate DN DN in standard string chain format all ?method=get_user&dn=/C=ZZ/O=certif/OU=users/OU=ngi.org/CN=Foo Bar
dnlike Limit results to user with certificate that matches given wildcard Search string (SQL syntax) all ?method=get_user&dnlike=%/OU=ngi.org%
forename Limit results to user(s) with given forename any string all ?method=get_user&forename=Robert
surname Limit results to user(s) with given surename any string all ?method=get_user&surname=Smith
roletype Limit results to user(s) with the specified role type(s) single or comma separated list of role types (multiple roles are OR'd together) all ?method=get_user&roletype=EGI CSIRT Officer,Chief Operations Officer
Docs for cursor params coming soon. Limit results and use cursor paging to iterate over all results See here for info


Output Example

Note, values for ENTITY_TYPE element are: site, project, servicegroup, ngi

<results>
    <EGEE_USER ID="1484G0" PRIMARY_KEY="1484G0">
	<FORENAME>David</FORENAME>
	<SURNAME>Meredith</SURNAME>
	<TITLE>Dr</TITLE>
	<DESCRIPTION/>
	<GOCDB_PORTAL_URL>https://gocdb-test.esc.rl.ac.uk/portal/index.php?Page_Type=User;ampid=1484</GOCDB_PORTAL_URL>
	<EMAIL>david.meredith@stfc.ac.uk</EMAIL>
	<TEL>+44 1925 603762</TEL>
	<WORKING_HOURS_START/>
	<WORKING_HOURS_END/>
	<CERTDN>/C=UK/O=eScience/OU=CLRC/L=DL/CN=david meredith</CERTDN>
	<SSOUSERNAME>davidm</SSOUSERNAME>
	<APPROVED/>
	<ACTIVE/>
	<HOMESITE/>
	<USER_ROLE>
	    <USER_ROLE>Service Group Administrator</USER_ROLE>
	    <ON_ENTITY>OPSTOOLS</ON_ENTITY>
	    <ENTITY_TYPE>servicegroup</ENTITY_TYPE>
	    <PRIMARY_KEY>722G0</PRIMARY_KEY>
	    <RECOGNISED_IN_PROJECTS/>            <!-- ***new element (ServiceGroup role is Project agnostic)*** -->
	</USER_ROLE>
	<USER_ROLE>
	    <USER_ROLE>Chief Operations Officer</USER_ROLE>
	    <ON_ENTITY>StandaloneProjectX</ON_ENTITY>
	    <ENTITY_TYPE>project</ENTITY_TYPE>
	    <PRIMARY_KEY>1505</PRIMARY_KEY>
	    <RECOGNISED_IN_PROJECTS>                    <!-- ***new element*** -->
		<PROJECT ID="1505">StandaloneProjectX</PROJECT>
	    </RECOGNISED_IN_PROJECTS>
	</USER_ROLE>
	<USER_ROLE>
	    <USER_ROLE>Site Operations Manager</USER_ROLE>
	    <ON_ENTITY>GRIDOPS-GOCDB</ON_ENTITY>
	    <ENTITY_TYPE>site</ENTITY_TYPE>
	    <PRIMARY_KEY>123G0</PRIMARY_KEY>
	    <RECOGNISED_IN_PROJECTS>                  <!-- ***new element*** -->
		<PROJECT ID="1">EGI</PROJECT>
	    </RECOGNISED_IN_PROJECTS>
	</USER_ROLE>
	<USER_ROLE></USER_ROLE>
    </EGEE_USER>
</results>



Back to GOCDB technical Documentation main page