• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="admin_directory_v1.html">Admin Directory API</a> . <a href="admin_directory_v1.schemas.html">schemas</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#delete">delete(customerId, schemaKey)</a></code></p>
79<p class="firstline">Delete schema</p>
80<p class="toc_element">
81  <code><a href="#get">get(customerId, schemaKey)</a></code></p>
82<p class="firstline">Retrieve schema</p>
83<p class="toc_element">
84  <code><a href="#insert">insert(customerId, body)</a></code></p>
85<p class="firstline">Create schema.</p>
86<p class="toc_element">
87  <code><a href="#list">list(customerId)</a></code></p>
88<p class="firstline">Retrieve all schemas for a customer</p>
89<p class="toc_element">
90  <code><a href="#patch">patch(customerId, schemaKey, body)</a></code></p>
91<p class="firstline">Update schema. This method supports patch semantics.</p>
92<p class="toc_element">
93  <code><a href="#update">update(customerId, schemaKey, body)</a></code></p>
94<p class="firstline">Update schema</p>
95<h3>Method Details</h3>
96<div class="method">
97    <code class="details" id="delete">delete(customerId, schemaKey)</code>
98  <pre>Delete schema
99
100Args:
101  customerId: string, Immutable ID of the G Suite account (required)
102  schemaKey: string, Name or immutable ID of the schema (required)
103</pre>
104</div>
105
106<div class="method">
107    <code class="details" id="get">get(customerId, schemaKey)</code>
108  <pre>Retrieve schema
109
110Args:
111  customerId: string, Immutable ID of the G Suite account (required)
112  schemaKey: string, Name or immutable ID of the schema (required)
113
114Returns:
115  An object of the form:
116
117    { # JSON template for Schema resource in Directory API.
118      "kind": "admin#directory#schema", # Kind of resource this is.
119      "displayName": "A String", # Display name for the schema.
120      "fields": [ # Fields of Schema
121        { # JSON template for FieldSpec resource for Schemas in Directory API.
122          "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
123          "displayName": "A String", # Display Name of the field.
124          "etag": "A String", # ETag of the resource.
125          "fieldName": "A String", # Name of the field.
126          "fieldType": "A String", # Type of the field.
127          "indexed": true, # Boolean specifying whether the field is indexed or not.
128          "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
129          "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
130            "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
131            "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
132          },
133          "fieldId": "A String", # Unique identifier of Field (Read-only)
134          "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
135        },
136      ],
137      "schemaId": "A String", # Unique identifier of Schema (Read-only)
138      "etag": "A String", # ETag of the resource.
139      "schemaName": "A String", # Schema name
140    }</pre>
141</div>
142
143<div class="method">
144    <code class="details" id="insert">insert(customerId, body)</code>
145  <pre>Create schema.
146
147Args:
148  customerId: string, Immutable ID of the G Suite account (required)
149  body: object, The request body. (required)
150    The object takes the form of:
151
152{ # JSON template for Schema resource in Directory API.
153    "kind": "admin#directory#schema", # Kind of resource this is.
154    "displayName": "A String", # Display name for the schema.
155    "fields": [ # Fields of Schema
156      { # JSON template for FieldSpec resource for Schemas in Directory API.
157        "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
158        "displayName": "A String", # Display Name of the field.
159        "etag": "A String", # ETag of the resource.
160        "fieldName": "A String", # Name of the field.
161        "fieldType": "A String", # Type of the field.
162        "indexed": true, # Boolean specifying whether the field is indexed or not.
163        "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
164        "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
165          "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
166          "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
167        },
168        "fieldId": "A String", # Unique identifier of Field (Read-only)
169        "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
170      },
171    ],
172    "schemaId": "A String", # Unique identifier of Schema (Read-only)
173    "etag": "A String", # ETag of the resource.
174    "schemaName": "A String", # Schema name
175  }
176
177
178Returns:
179  An object of the form:
180
181    { # JSON template for Schema resource in Directory API.
182      "kind": "admin#directory#schema", # Kind of resource this is.
183      "displayName": "A String", # Display name for the schema.
184      "fields": [ # Fields of Schema
185        { # JSON template for FieldSpec resource for Schemas in Directory API.
186          "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
187          "displayName": "A String", # Display Name of the field.
188          "etag": "A String", # ETag of the resource.
189          "fieldName": "A String", # Name of the field.
190          "fieldType": "A String", # Type of the field.
191          "indexed": true, # Boolean specifying whether the field is indexed or not.
192          "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
193          "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
194            "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
195            "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
196          },
197          "fieldId": "A String", # Unique identifier of Field (Read-only)
198          "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
199        },
200      ],
201      "schemaId": "A String", # Unique identifier of Schema (Read-only)
202      "etag": "A String", # ETag of the resource.
203      "schemaName": "A String", # Schema name
204    }</pre>
205</div>
206
207<div class="method">
208    <code class="details" id="list">list(customerId)</code>
209  <pre>Retrieve all schemas for a customer
210
211Args:
212  customerId: string, Immutable ID of the G Suite account (required)
213
214Returns:
215  An object of the form:
216
217    { # JSON response template for List Schema operation in Directory API.
218    "kind": "admin#directory#schemas", # Kind of resource this is.
219    "etag": "A String", # ETag of the resource.
220    "schemas": [ # List of UserSchema objects.
221      { # JSON template for Schema resource in Directory API.
222          "kind": "admin#directory#schema", # Kind of resource this is.
223          "displayName": "A String", # Display name for the schema.
224          "fields": [ # Fields of Schema
225            { # JSON template for FieldSpec resource for Schemas in Directory API.
226              "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
227              "displayName": "A String", # Display Name of the field.
228              "etag": "A String", # ETag of the resource.
229              "fieldName": "A String", # Name of the field.
230              "fieldType": "A String", # Type of the field.
231              "indexed": true, # Boolean specifying whether the field is indexed or not.
232              "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
233              "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
234                "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
235                "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
236              },
237              "fieldId": "A String", # Unique identifier of Field (Read-only)
238              "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
239            },
240          ],
241          "schemaId": "A String", # Unique identifier of Schema (Read-only)
242          "etag": "A String", # ETag of the resource.
243          "schemaName": "A String", # Schema name
244        },
245    ],
246  }</pre>
247</div>
248
249<div class="method">
250    <code class="details" id="patch">patch(customerId, schemaKey, body)</code>
251  <pre>Update schema. This method supports patch semantics.
252
253Args:
254  customerId: string, Immutable ID of the G Suite account (required)
255  schemaKey: string, Name or immutable ID of the schema. (required)
256  body: object, The request body. (required)
257    The object takes the form of:
258
259{ # JSON template for Schema resource in Directory API.
260    "kind": "admin#directory#schema", # Kind of resource this is.
261    "displayName": "A String", # Display name for the schema.
262    "fields": [ # Fields of Schema
263      { # JSON template for FieldSpec resource for Schemas in Directory API.
264        "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
265        "displayName": "A String", # Display Name of the field.
266        "etag": "A String", # ETag of the resource.
267        "fieldName": "A String", # Name of the field.
268        "fieldType": "A String", # Type of the field.
269        "indexed": true, # Boolean specifying whether the field is indexed or not.
270        "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
271        "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
272          "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
273          "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
274        },
275        "fieldId": "A String", # Unique identifier of Field (Read-only)
276        "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
277      },
278    ],
279    "schemaId": "A String", # Unique identifier of Schema (Read-only)
280    "etag": "A String", # ETag of the resource.
281    "schemaName": "A String", # Schema name
282  }
283
284
285Returns:
286  An object of the form:
287
288    { # JSON template for Schema resource in Directory API.
289      "kind": "admin#directory#schema", # Kind of resource this is.
290      "displayName": "A String", # Display name for the schema.
291      "fields": [ # Fields of Schema
292        { # JSON template for FieldSpec resource for Schemas in Directory API.
293          "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
294          "displayName": "A String", # Display Name of the field.
295          "etag": "A String", # ETag of the resource.
296          "fieldName": "A String", # Name of the field.
297          "fieldType": "A String", # Type of the field.
298          "indexed": true, # Boolean specifying whether the field is indexed or not.
299          "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
300          "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
301            "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
302            "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
303          },
304          "fieldId": "A String", # Unique identifier of Field (Read-only)
305          "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
306        },
307      ],
308      "schemaId": "A String", # Unique identifier of Schema (Read-only)
309      "etag": "A String", # ETag of the resource.
310      "schemaName": "A String", # Schema name
311    }</pre>
312</div>
313
314<div class="method">
315    <code class="details" id="update">update(customerId, schemaKey, body)</code>
316  <pre>Update schema
317
318Args:
319  customerId: string, Immutable ID of the G Suite account (required)
320  schemaKey: string, Name or immutable ID of the schema. (required)
321  body: object, The request body. (required)
322    The object takes the form of:
323
324{ # JSON template for Schema resource in Directory API.
325    "kind": "admin#directory#schema", # Kind of resource this is.
326    "displayName": "A String", # Display name for the schema.
327    "fields": [ # Fields of Schema
328      { # JSON template for FieldSpec resource for Schemas in Directory API.
329        "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
330        "displayName": "A String", # Display Name of the field.
331        "etag": "A String", # ETag of the resource.
332        "fieldName": "A String", # Name of the field.
333        "fieldType": "A String", # Type of the field.
334        "indexed": true, # Boolean specifying whether the field is indexed or not.
335        "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
336        "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
337          "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
338          "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
339        },
340        "fieldId": "A String", # Unique identifier of Field (Read-only)
341        "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
342      },
343    ],
344    "schemaId": "A String", # Unique identifier of Schema (Read-only)
345    "etag": "A String", # ETag of the resource.
346    "schemaName": "A String", # Schema name
347  }
348
349
350Returns:
351  An object of the form:
352
353    { # JSON template for Schema resource in Directory API.
354      "kind": "admin#directory#schema", # Kind of resource this is.
355      "displayName": "A String", # Display name for the schema.
356      "fields": [ # Fields of Schema
357        { # JSON template for FieldSpec resource for Schemas in Directory API.
358          "kind": "admin#directory#schema#fieldspec", # Kind of resource this is.
359          "displayName": "A String", # Display Name of the field.
360          "etag": "A String", # ETag of the resource.
361          "fieldName": "A String", # Name of the field.
362          "fieldType": "A String", # Type of the field.
363          "indexed": true, # Boolean specifying whether the field is indexed or not.
364          "readAccessType": "ALL_DOMAIN_USERS", # Read ACLs on the field specifying who can view values of this field. Valid values are "ALL_DOMAIN_USERS" and "ADMINS_AND_SELF".
365          "numericIndexingSpec": { # Indexing spec for a numeric field. By default, only exact match queries will be supported for numeric fields. Setting the numericIndexingSpec allows range queries to be supported.
366            "maxValue": 3.14, # Maximum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
367            "minValue": 3.14, # Minimum value of this field. This is meant to be indicative rather than enforced. Values outside this range will still be indexed, but search may not be as performant.
368          },
369          "fieldId": "A String", # Unique identifier of Field (Read-only)
370          "multiValued": True or False, # Boolean specifying whether this is a multi-valued field or not.
371        },
372      ],
373      "schemaId": "A String", # Unique identifier of Schema (Read-only)
374      "etag": "A String", # ETag of the resource.
375      "schemaName": "A String", # Schema name
376    }</pre>
377</div>
378
379</body></html>