-
Notifications
You must be signed in to change notification settings - Fork 11
/
example.txt
243 lines (212 loc) · 9.93 KB
/
example.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
Copyright 2008 Boomi, Inc.
All rights reserved.
Metadata browsing:
==================
* GET http://localhost:8080/rest/metadata
** (gets all known types)
- Result:
<?xml version="1.0" encoding="utf-8"?>
<types>
<type>WholeEnchilada</type>
<type>DynoGreeting</type>
<type>Greeting</type>
</types>
* GET http://localhost:8080/rest/metadata/Greeting
** (gets the Greeting type profile)
- Result:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Greeting">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="key" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="content" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="0" name="date" type="xs:dateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="author" type="xs:normalizedString"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
* GET http://localhost:8080/rest/metadata/DynoGreeting
** (gets the DynoGreeting type profile)
- Result:
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="DynoGreeting">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="key" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="content" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="0" name="date" type="xs:dateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="author" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="taglist" type="xs:string"/>
<xs:any maxOccurs="unbounded" minOccurs="0" namespace="##any"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
* GET http://localhost:8080/rest/metadata/DynoGreeting
** (gets the WholeEnchilada type profile)
- Result:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="WholeEnchilada">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="key" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_rating" type="xs:integer"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_list">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="0" minOccurs="0" name="item" type="xs:dateTime"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="some_text" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_category" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_email" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_geopt" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_date" type="xs:date"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_key" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_float" type="xs:double"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_date_time" type="xs:dateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_string" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_time" type="xs:time"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_blob" type="xs:base64Binary"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_boolean" type="xs:boolean"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_link" type="xs:anyURI"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_integer" type="xs:long"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_postal_address" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_phone_number" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_im" type="xs:normalizedString"/>
<xs:element maxOccurs="1" minOccurs="0" name="some_user" type="xs:normalizedString"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Object Retrieval:
=================
* GET http://localhost:8080/rest/DynoGreeting
** (gets the first N DynoGreeting instances)
* GET http://localhost:8080/rest/DynoGreeting?offset=10
** (gets the next N DynoGreeting instances, starting at offset 10. Note
the returned list element contains an "offset" attribute. If it has a
value, that is the next offset to use to retrieve more results. If it is
empty, there are no more results).
* GET http://localhost:8080/rest/DynoGreeting?offset=10&feq_date=2008-08-05T00:21:19.080553
** (gets the next N DynoGreeting instances, starting at offset 10 with a date
property "greater than" 2008-08-05T00:21:19.080553.
Available operators:
- "feq_" -> "equal to"
- "flt_" -> "less than"
- "fgt_" -> "greater than"
- "fle_" -> "less than or equal to"
- "fge_" -> "greater than or equal to"
- "fne_" -> "not equal to"
- "fin_" -> "in <comma_separated_list>"
Multiple operators may be provided, they are AND'ed together).
- Result:
<?xml version="1.0" encoding="utf-8"?>
<list offset="50">
<DynoGreeting>
<key>aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA</key>
<content>some posted content</content>
<date>2008-08-05T00:21:19.080553</date>
<extra type="StringProperty">some other stuff</extra>
</DynoGreeting>
<DynoGreeting>
<key>aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgGDA</key>
<date>2008-08-06T16:16:52.323027</date>
</DynoGreeting>
<DynoGreeting>
<key>aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgHDA</key>
<content>replaced content</content>
</DynoGreeting>
<DynoGreeting>
<key>aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgIDA</key>
<content>replaced content</content>
<date>2008-08-05T00:21:19.080553</date>
<taglist>foo,bar,bazz</taglist>
<extra type="StringProperty">some other stuff</extra>
</DynoGreeting>
</list>
* GET http://localhost:8080/rest/WholeEnchilada/aglndWVzdGJvb2tyFAsSDldob2xlRW5jaGlsYWRhGAkM
** (gets a single WholeEnchilada instance)
- Result:
<?xml version="1.0" encoding="utf-8"?>
<WholeEnchilada>
<key>aglndWVzdGJvb2tyFAsSDldob2xlRW5jaGlsYWRhGAkM</key>
<some_rating>42</some_rating>
<some_list>
<item>2008-08-05T00:21:19.080553</item>
<item>2008-08-06T00:21:19.080553</item>
<item>2008-08-07T00:21:19</item>
<item>2008-08-08T00:21:19.080553</item>
</some_list>
<some_text>laTda this is some very long text that i don't want to type</some_text>
<some_category>awesome</some_category>
<some_email>bob@example.com</some_email>
<some_geopt>4.3,-38.32</some_geopt>
<some_date>2008-08-11</some_date>
<some_key>aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgGDA</some_key>
<some_float>34345.345434</some_float>
<some_date_time>2008-08-05T00:21:19.080553</some_date_time>
<some_string>laTda</some_string>
<some_time>15:00:19.430000</some_time>
<some_blob>
asDFasdfAsdfAsfdeasfdasdfAsdFasdFasdfasdsdfasdf345345sadf435aSADFsafAS345aew
</some_blob>
<some_boolean>false</some_boolean>
<some_link>http://localhost:8080/rest/metadata/WholeEnchilada</some_link>
<some_integer>345908452309842432</some_integer>
<some_postal_address>123 Main St, Anytown, PA 12345</some_postal_address>
<some_phone_number>1-610-543-5432</some_phone_number>
<some_im>sip bob</some_im>
<some_user>bobster</some_user>
</WholeEnchilada>
Object Creation/Modification:
=================
* POST http://localhost:8080/rest/Greeting
** (create new Greeting instance)
Request:
<?xml version="1.0" encoding="utf-8"?>
<Greeting>
<author>bob@example.com</author>
<content>some posted content</content>
<date>2008-08-05T00:21:19.080553</date>
<taglist>foo,bar,bazz</taglist>
</Greeting>
- Result (default):
aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA
- Result (with "?type=structured" in url):
<?xml version="1.0" encoding="utf-8"?><key>aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA</key>
- Result (with "?type=full" in url):
Complete current version of the new Greeting instance.
* POST http://localhost:8080/rest/Greeting/aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA
** (partial update of existing Greeting instance)
Request:
<?xml version="1.0" encoding="utf-8"?>
<Greeting>
<content>some new content</content>
</Greeting>
- Result (default):
aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA
- Result (with "?type=full" in url):
Complete current version of the updated Greeting instance.
* PUT http://localhost:8080/rest/Greeting/aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA
** (complete replacement of existing Greeting instance)
Request:
<?xml version="1.0" encoding="utf-8"?>
<Greeting>
<author>mike@example.com</author>
<content>some completely new content</content>
<date>2008-08-11T10:21:19.080553</date>
</Greeting>
- Result (default):
aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA
- Result (with "?type=full" in url):
Complete current version of the updated Greeting instance.
* DELETE http://localhost:8080/rest/Greeting/aglndWVzdGJvb2tyEgsSDER5bm9HcmVldGluZxgEDA
** (delete existing Greeting instance)
- Result: (200 okay)