raml_ruby 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.travis.yml +6 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +71 -0
  7. data/Rakefile +1 -0
  8. data/fixtures/include_1.raml +7 -0
  9. data/fixtures/schemas/canonicalSchemas.raml +3 -0
  10. data/fixtures/schemas/filesystem/file.json +1 -0
  11. data/fixtures/schemas/filesystem/files.json +1 -0
  12. data/fixtures/schemas/filesystem/fileupdate.json +1 -0
  13. data/fixtures/schemas/filesystem/relative/test.json +1 -0
  14. data/lib/raml.rb +104 -0
  15. data/lib/raml/exceptions.rb +27 -0
  16. data/lib/raml/mixin/bodies.rb +32 -0
  17. data/lib/raml/mixin/documentable.rb +32 -0
  18. data/lib/raml/mixin/global.rb +20 -0
  19. data/lib/raml/mixin/headers.rb +22 -0
  20. data/lib/raml/mixin/merge.rb +24 -0
  21. data/lib/raml/mixin/parent.rb +54 -0
  22. data/lib/raml/mixin/validation.rb +49 -0
  23. data/lib/raml/node.rb +219 -0
  24. data/lib/raml/node/abstract_method.rb +61 -0
  25. data/lib/raml/node/abstract_resource.rb +165 -0
  26. data/lib/raml/node/abstract_resource_circular.rb +5 -0
  27. data/lib/raml/node/body.rb +94 -0
  28. data/lib/raml/node/documentation.rb +28 -0
  29. data/lib/raml/node/header.rb +4 -0
  30. data/lib/raml/node/method.rb +106 -0
  31. data/lib/raml/node/parameter/abstract_parameter.rb +251 -0
  32. data/lib/raml/node/parameter/base_uri_parameter.rb +6 -0
  33. data/lib/raml/node/parameter/form_parameter.rb +6 -0
  34. data/lib/raml/node/parameter/query_parameter.rb +6 -0
  35. data/lib/raml/node/parameter/uri_parameter.rb +7 -0
  36. data/lib/raml/node/parametized_reference.rb +15 -0
  37. data/lib/raml/node/reference.rb +4 -0
  38. data/lib/raml/node/resource.rb +26 -0
  39. data/lib/raml/node/resource_type.rb +20 -0
  40. data/lib/raml/node/resource_type_reference.rb +5 -0
  41. data/lib/raml/node/response.rb +32 -0
  42. data/lib/raml/node/root.rb +246 -0
  43. data/lib/raml/node/schema.rb +41 -0
  44. data/lib/raml/node/schema_reference.rb +5 -0
  45. data/lib/raml/node/template.rb +55 -0
  46. data/lib/raml/node/trait.rb +18 -0
  47. data/lib/raml/node/trait_reference.rb +5 -0
  48. data/lib/raml/parser.rb +57 -0
  49. data/lib/raml/parser/include.rb +25 -0
  50. data/lib/raml/patch/hash.rb +6 -0
  51. data/lib/raml/patch/module.rb +12 -0
  52. data/lib/raml/version.rb +3 -0
  53. data/raml_ruby.gemspec +35 -0
  54. data/raml_spec_reqs.md +276 -0
  55. data/templates/abstract_parameter.slim +68 -0
  56. data/templates/body.slim +15 -0
  57. data/templates/collapse.slim +10 -0
  58. data/templates/documentation.slim +2 -0
  59. data/templates/method.slim +38 -0
  60. data/templates/resource.slim +33 -0
  61. data/templates/response.slim +13 -0
  62. data/templates/root.slim +39 -0
  63. data/templates/style.sass +119 -0
  64. data/test/apis/box-api.raml +4224 -0
  65. data/test/apis/instagram-api.raml +3378 -0
  66. data/test/apis/stripe-api.raml +12227 -0
  67. data/test/apis/twilio-rest-api.raml +6618 -0
  68. data/test/apis/twitter-rest-api.raml +34284 -0
  69. data/test/raml/body_spec.rb +268 -0
  70. data/test/raml/documentation_spec.rb +49 -0
  71. data/test/raml/header_spec.rb +17 -0
  72. data/test/raml/include_spec.rb +40 -0
  73. data/test/raml/method_spec.rb +701 -0
  74. data/test/raml/parameter/abstract_parameter_spec.rb +564 -0
  75. data/test/raml/parameter/form_parameter_spec.rb +17 -0
  76. data/test/raml/parameter/query_parameter_spec.rb +33 -0
  77. data/test/raml/parameter/uri_parameter_spec.rb +44 -0
  78. data/test/raml/parser_spec.rb +53 -0
  79. data/test/raml/raml_spec.rb +32 -0
  80. data/test/raml/resource_spec.rb +440 -0
  81. data/test/raml/resource_type_spec.rb +51 -0
  82. data/test/raml/response_spec.rb +251 -0
  83. data/test/raml/root_spec.rb +655 -0
  84. data/test/raml/schema_spec.rb +110 -0
  85. data/test/raml/spec_helper.rb +11 -0
  86. data/test/raml/template_spec.rb +98 -0
  87. data/test/raml/trait_spec.rb +31 -0
  88. metadata +337 -0
@@ -0,0 +1,68 @@
1
+ - if has_multiple_types?
2
+ div
3
+ span.param_names
4
+ span.param_name> => name
5
+ | (multiple types)
6
+ - for child in children
7
+ == child.document
8
+
9
+ - else
10
+ .param
11
+ div
12
+ span.param_names
13
+ span.param_name> => name
14
+ - unless display_name.nil?
15
+ | (#{ display_name })
16
+
17
+ span.param_attrs
18
+ - if required
19
+ span.param_attr required
20
+ - else
21
+ span.param_attr optional
22
+
23
+ - if repeat
24
+ span.param_attr can repeat
25
+
26
+ - unless type.nil?
27
+ span.param_attr #{ type } type
28
+
29
+ - unless default.nil?
30
+ span.param_attr
31
+ | default
32
+ span.param_val< = default
33
+
34
+ - unless enum.nil?
35
+ span.param_attr
36
+ | one of
37
+ span.param_val< = enum.join ', '
38
+
39
+ - unless pattern.nil?
40
+ span.param_attr must match #{ pattern.inspect }
41
+
42
+ - if min_length and max_length
43
+ - if min_length == max_length
44
+ span.param_attr length #{ min_length }
45
+ - else
46
+ span.param_attr #{ min_length }-#{ max_length } length
47
+ - elsif min_length
48
+ span.param_attr min length #{ min_length }
49
+ - elsif max_length
50
+ span.param_attr max length #{ max_length }
51
+
52
+ - unless minimum.nil?
53
+ span.param_attr
54
+ | minimum
55
+ span.param_val< = minimum
56
+
57
+ - unless maximum.nil?
58
+ span.param_attr
59
+ | maximum
60
+ span.param_val< = maximum
61
+
62
+ - unless example.nil?
63
+ span.param_attr
64
+ | example
65
+ span.param_val< = example
66
+
67
+ - unless description.nil?
68
+ .param_description == html_description
@@ -0,0 +1,15 @@
1
+ == collapse 5, media_type
2
+ - if schema
3
+ == collapse 5, 'Schema'
4
+ pre: code.schema
5
+ == schema.document
6
+
7
+ - elsif web_form? and not form_parameters.empty?
8
+ == collapse 5, 'Web Form Parameters'
9
+ - for parameter in form_parameters.values
10
+ == parameter.document
11
+
12
+ - if example
13
+ == collapse 5, 'Example'
14
+ pre: code.example
15
+ == highlight example, media_type
@@ -0,0 +1,10 @@
1
+ section
2
+ label for="collapse-#{cid}"
3
+ <h#{level}>
4
+ ==> highlight_url_params Temple::Utils.escape_html title
5
+ - if display_name
6
+ | (#{display_name})
7
+ </h#{level}>
8
+ input type="checkbox" id="collapse-#{cid}" checked=true aria-hidden="true"
9
+ .collapse_content
10
+ == content
@@ -0,0 +1,2 @@
1
+ == collapse 2, title
2
+ == html_content
@@ -0,0 +1,38 @@
1
+ == collapse 3, name, display_name
2
+
3
+ - unless traits.empty? and protocols.empty?
4
+ .properties
5
+ - unless traits.empty?
6
+ div
7
+ span.property traits:
8
+ =< traits.map(&:name).join ', '
9
+
10
+ - unless protocols.empty?
11
+ div
12
+ span.property protocols:
13
+ =< protocols.join ', '
14
+
15
+ - if description
16
+ .method_description == html_description
17
+
18
+ - unless headers.empty? and query_parameters.empty? and bodies.empty?
19
+ == collapse 4, 'Request'
20
+
21
+ - unless headers.empty?
22
+ == collapse 5, 'Request Headers'
23
+ - for header in headers.values
24
+ == header.document
25
+
26
+ - unless query_parameters.empty?
27
+ == collapse 5, 'Query Parameters'
28
+ - for parameter in query_parameters.values
29
+ == parameter.document
30
+
31
+ - unless bodies.empty?
32
+ - for body in bodies.values
33
+ == body.document
34
+
35
+ - unless responses.empty?
36
+ == collapse 4, 'Responses'
37
+ - for response in responses.values
38
+ == response.document
@@ -0,0 +1,33 @@
1
+ - if description || type || !traits.empty? || !methods.empty?
2
+ == collapse 2, resource_path, display_name
3
+
4
+ - if description
5
+ div == html_description
6
+
7
+ .properties
8
+ - if type
9
+ div
10
+ span.property type:
11
+ =< type.name
12
+
13
+ - unless traits.empty?
14
+ div
15
+ span.property traits:
16
+ =< traits.map(&:name).join ', '
17
+
18
+ - unless base_uri_parameters.empty?
19
+ == collapse 5, 'Base URI Parameters'
20
+ - for parameter in base_uri_parameters.values
21
+ == parameter.document
22
+
23
+ - unless uri_parameters.empty?
24
+ == collapse 5, 'URI Parameters'
25
+ - for parameter in uri_parameters.values
26
+ == parameter.document
27
+
28
+ - unless methods.empty?
29
+ - for method in methods.values
30
+ == method.document
31
+
32
+ - for resource in resources.values
33
+ == resource.document
@@ -0,0 +1,13 @@
1
+ == collapse 5, name, display_name
2
+
3
+ - if description
4
+ .response_description == html_description
5
+
6
+ - unless headers.empty?
7
+ == collapse 6, 'Headers'
8
+ - for header in headers.values
9
+ == header.document
10
+
11
+ - unless bodies.empty?
12
+ - for body in bodies.values
13
+ == body.document
@@ -0,0 +1,39 @@
1
+ doctype html
2
+
3
+ head
4
+ meta charset="utf-8"
5
+ title
6
+ => title
7
+ - if version
8
+ = version
9
+ style type="text/css" == Rouge::Themes::Github.render(scope: '.highlight')
10
+ style type="text/css" == style_sheet
11
+
12
+ main
13
+ h1.title
14
+ => title
15
+ - if version
16
+ = version
17
+
18
+ section
19
+ - if base_uri
20
+ .properties
21
+ - unless protocols.nil? or protocols.empty?
22
+ div
23
+ span.property protocols:
24
+ =< protocols.join ', '
25
+ div
26
+ span.property base uri:
27
+ ==< highlight_url_params base_uri
28
+ - unless base_uri_parameters.empty?
29
+ == collapse 5, 'Base URI Parameters'
30
+ - for parameter in base_uri_parameters.values
31
+ == parameter.document
32
+
33
+ - unless documents.empty?
34
+ .documentation
35
+ - for document in documents
36
+ == document.document
37
+
38
+ - for resource in resources.values
39
+ == resource.document
@@ -0,0 +1,119 @@
1
+ @import url(http://fonts.googleapis.com/css?family=Inconsolata);
2
+
3
+ html {
4
+ -webkit-font-smoothing: antialiased;
5
+ font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
6
+ font-size: 11pt;
7
+ }
8
+ main {
9
+ display: block;
10
+ width: 75em;
11
+ margin-left: auto;
12
+ margin-right: auto;
13
+ margin-top: 2em;
14
+ margin-bottom: 2em;
15
+ }
16
+
17
+ h1.title {
18
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
19
+ font-weight: 300;
20
+ font-size: 24pt;
21
+ }
22
+ h2 {
23
+ font-family: "Inconsolata", monospace;
24
+ font-size: 16pt;
25
+ font-weight: normal;
26
+ margin-bottom: 0.25em;
27
+ }
28
+ h3 {
29
+ font-size: 15pt;
30
+ font-weight: normal;
31
+ color: #444;
32
+ }
33
+ h4 {
34
+ font-size: 14pt;
35
+ font-weight: normal;
36
+ font-style: italic;
37
+ color: #444;
38
+ }
39
+ h5 {
40
+ font-size: 11pt;
41
+ font-style: italic;
42
+ color: #333;
43
+ margin-top: 1em;
44
+ margin-bottom: 1em;
45
+ }
46
+ h6 {
47
+ font-size: 11pt;
48
+ font-weight: normal;
49
+ text-decoration: underline;
50
+ margin-top: 1em;
51
+ margin-bottom: 1em;
52
+ }
53
+
54
+ .documentation {
55
+ margin-bottom: 3em;
56
+ }
57
+
58
+ .properties {
59
+ margin-bottom: 1.25em;
60
+ }
61
+
62
+ .property {
63
+ font-variant: small-caps;
64
+ font-size: 1.15em;
65
+ color: #252525;
66
+ margin-right: 0.3em;
67
+ }
68
+
69
+ .param {
70
+ margin-bottom: .75em;
71
+ }
72
+ .param_names {
73
+ margin-right: 1em;
74
+ }
75
+ .param_name {
76
+ font-family: "Inconsolata", monospace;
77
+ font-weight: bold;
78
+ color: #444;
79
+ }
80
+ .param_attrs {
81
+ // float: right;
82
+ color: #555;
83
+ font-style: italic;
84
+ }
85
+ .param_attr {
86
+ margin-right: 0.5em;
87
+ }
88
+ .param_attr:after {
89
+ content: ', '
90
+ }
91
+ .param_attr:last-child:after {
92
+ content: ''
93
+ }
94
+ .param_val {
95
+ color: #000;
96
+ }
97
+ .param_description {
98
+ margin-top: 0.5em;
99
+ margin-left: 1em;
100
+ color: #252525;
101
+ }
102
+
103
+ .method_description {
104
+ color: #252525;
105
+ }
106
+ .response_description {
107
+ color: #252525;
108
+ }
109
+
110
+ .url_param {
111
+ color: red;
112
+ }
113
+
114
+ main section > .collapse_content { margin-left: 1em; }
115
+ .subsection { margin-left: 1em; }
116
+
117
+ label { cursor: pointer }
118
+ input[type=checkbox] { display: none }
119
+ input[type=checkbox]:checked ~ div { display: none }
@@ -0,0 +1,4224 @@
1
+ #%RAML 0.8
2
+ ---
3
+ title: Box.com API
4
+ version: "2.0"
5
+ baseUri: https://api.box.com/{version}/
6
+ securitySchemes:
7
+ - oauth_2_0:
8
+ description: |
9
+ The Box API uses OAuth 2 for authentication. An authorization header containing
10
+ a valid access_token must be included in every request.
11
+ type: OAuth 2.0
12
+ describedBy:
13
+ headers:
14
+ Authorization:
15
+ description: |
16
+ Used to send a valid OAuth 2 access token. Do not use together with
17
+ the "access_token" query string parameter.
18
+ type: string
19
+ queryParameters:
20
+ access_token:
21
+ description: |
22
+ Used to send a valid OAuth 2 access token. Do not use together with
23
+ the "Authorization" header
24
+ type: string
25
+ settings:
26
+ authorizationUri: https://www.box.com/api/oauth2/authorize
27
+ accessTokenUri: https://www.box.com/api/oauth2/token
28
+ authorizationGrants: [ code ]
29
+ securedBy: [ oauth_2_0 ]
30
+ mediaType: application/json
31
+ resourceTypes:
32
+ - base:
33
+ get?:
34
+ headers:
35
+ If-None-Match?:
36
+ description: |
37
+ If-None-Match headers ensure that you don'''t retrieve unnecessary data
38
+ if you already have the most current version on-hand.
39
+ type: string
40
+ On-Behalf-Of?:
41
+ description: |
42
+ Used for enterprise administrators to make API calls on behalf of their
43
+ managed users. To enable this functionality, please contact us with your
44
+ API key.
45
+ type: string
46
+ responses:
47
+ 200?:
48
+ description: |
49
+ The request has succeeded. The information returned with the response
50
+ is dependent on the method used in the request.
51
+ 202?:
52
+ description: |
53
+ The request has been accepted for processing, but the processing has
54
+ not been completed.
55
+ 302?:
56
+ description: "Found. The requested resource resides temporarily under a different URI."
57
+ 304?:
58
+ description: |
59
+ Not Modified. If the client has performed a conditional GET request
60
+ and access is allowed, but the document has not been modified
61
+ 400:
62
+ description: |
63
+ Bad Request. The request could not be understood by the server due
64
+ to malformed syntax.
65
+ 401:
66
+ description: "Unauthorized. The request requires user authentication."
67
+ 404:
68
+ description: "Not Found. The server has not found anything matching the Request-URI."
69
+ 429:
70
+ description: "Your application is sending too many simultaneous requests."
71
+ 500:
72
+ description: "We couldn't return the representation due to an internal server error."
73
+ 507:
74
+ description: |
75
+ Insufficient Storage. The server is unable to store the representation
76
+ needed to complete the request
77
+ post?:
78
+ headers:
79
+ If-Match?:
80
+ description: |
81
+ If-Match header let you ensure that your app only alters files/folders
82
+ on Box if you have the current version.
83
+ type: string
84
+ Content-MD5:
85
+ description: The SHA1 hash of the file.
86
+ type: string
87
+ responses:
88
+ 201?:
89
+ description: |
90
+ The request has been fulfilled and resulted in a new resource being
91
+ created.
92
+ 403:
93
+ description: |
94
+ Forbidden. The server understood the request, but is refusing to
95
+ fulfill it.
96
+ 405:
97
+ description: |
98
+ Method Not Allowed. The method specified in the Request-Line is not
99
+ allowed for the resource identified by the Request-URI.
100
+ 409:
101
+ description: |
102
+ Conflict. The request could not be completed due to a conflict with
103
+ the current state of the resource. Often happened because of file
104
+ names duplication.
105
+ 429:
106
+ description: "Your application is sending too many simultaneous requests."
107
+ put?:
108
+ headers:
109
+ If-Match?:
110
+ description: |
111
+ If-Match header let you ensure that your app only alters files/folders
112
+ on Box if you have the current version.
113
+ type: string
114
+ responses:
115
+ 200?:
116
+ description: |
117
+ The request has succeeded. The information returned with the response
118
+ is dependent on the method used in the request.
119
+ 429:
120
+ description: "Your application is sending too many simultaneous requests."
121
+ delete?:
122
+ headers:
123
+ If-Match?:
124
+ description: |
125
+ If-Match header let you ensure that your app only alters files/folders
126
+ on Box if you have the current version.
127
+ type: string
128
+ responses:
129
+ 204?:
130
+ description: |
131
+ "No Content. The server has fulfilled the request but does not need to
132
+ return an entity-body, and might want to return updated metainformation."
133
+ 404:
134
+ description: "The file is not in the trash."
135
+ 412:
136
+ description: |
137
+ Precondition Failed. The precondition given in one or more of the
138
+ request-header fields evaluated to false when it was tested on the
139
+ server.
140
+ 429:
141
+ description: "Your application is sending too many simultaneous requests."
142
+ /folders:
143
+ type: base
144
+ post:
145
+ description: |
146
+ Used to create a new empty folder. The new folder will be created
147
+ inside of the specified parent folder
148
+ body:
149
+ schema: |
150
+ {
151
+ "$schema": "http://json-schema.org/draft-03/schema",
152
+ "type": "object" ,
153
+ "properties": {
154
+ "name": {
155
+ "description": "The desired name for the folder.",
156
+ "type": "string",
157
+ "required": true
158
+ },
159
+ "parent": {
160
+ "description": "The parent folder.",
161
+ "type": "object",
162
+ "required": true
163
+ },
164
+ "id": {
165
+ "description": "The ID of the parent folder.",
166
+ "type": "string",
167
+ "required": true
168
+ }
169
+ }
170
+ }
171
+ responses:
172
+ 200:
173
+ body:
174
+ example: |
175
+ {
176
+ "type": "folder",
177
+ "id": "11446498",
178
+ "sequence_id": "1",
179
+ "etag": "1",
180
+ "name": "Pictures",
181
+ "created_at": "2012-12-12T10:53:43-08:00",
182
+ "modified_at": "2012-12-12T11:15:04-08:00",
183
+ "description": "Some pictures I took",
184
+ "size": 629644,
185
+ "path_collection": {
186
+ "total_count": 1,
187
+ "entries": [
188
+ {
189
+ "type": "folder",
190
+ "id": "0",
191
+ "sequence_id": null,
192
+ "etag": null,
193
+ "name": "All Files"
194
+ }
195
+ ]
196
+ },
197
+ "created_by": {
198
+ "type": "user",
199
+ "id": "17738362",
200
+ "name": "sean rose",
201
+ "login": "sean@box.com"
202
+ },
203
+ "modified_by": {
204
+ "type": "user",
205
+ "id": "17738362",
206
+ "name": "sean rose",
207
+ "login": "sean@box.com"
208
+ },
209
+ "owned_by": {
210
+ "type": "user",
211
+ "id": "17738362",
212
+ "name": "sean rose",
213
+ "login": "sean@box.com"
214
+ },
215
+ "shared_link": {
216
+ "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
217
+ "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk",
218
+ "vanity_url": null,
219
+ "is_password_enabled": false,
220
+ "unshared_at": null,
221
+ "download_count": 0,
222
+ "preview_count": 0,
223
+ "access": "open",
224
+ "permissions": {
225
+ "can_download": true,
226
+ "can_preview": true
227
+ }
228
+ },
229
+ "folder_upload_email": {
230
+ "access": "open",
231
+ "email": "upload.Picture.k13sdz1@u.box.com"
232
+ },
233
+ "parent": {
234
+ "type": "folder",
235
+ "id": "0",
236
+ "sequence_id": null,
237
+ "etag": null,
238
+ "name": "All Files"
239
+ },
240
+ "item_status": "active",
241
+ "item_collection": {
242
+ "total_count": 0,
243
+ "entries": [],
244
+ "offset": 0,
245
+ "limit": 100
246
+ }
247
+ }
248
+ /{folderId}:
249
+ type: base
250
+ uriParameters:
251
+ folderId:
252
+ description: |
253
+ The ID of the parent folder
254
+ type: string
255
+ get:
256
+ description: |
257
+ Retrieves the full metadata about a folder, including information about
258
+ when it was last updated as well as the files and folders contained in it.
259
+ The root folder of a Box account is always represented by the id "0".
260
+ responses:
261
+ 200:
262
+ body:
263
+ example: |
264
+ {
265
+ "type": "folder",
266
+ "id": "11446498",
267
+ "sequence_id": "1",
268
+ "etag": "1",
269
+ "name": "Pictures",
270
+ "created_at": "2012-12-12T10:53:43-08:00",
271
+ "modified_at": "2012-12-12T11:15:04-08:00",
272
+ "description": "Some pictures I took",
273
+ "size": 629644,
274
+ "path_collection": {
275
+ "total_count": 1,
276
+ "entries": [
277
+ {
278
+ "type": "folder",
279
+ "id": "0",
280
+ "sequence_id": null,
281
+ "etag": null,
282
+ "name": "All Files"
283
+ }
284
+ ]
285
+ },
286
+ "created_by": {
287
+ "type": "user",
288
+ "id": "17738362",
289
+ "name": "sean rose",
290
+ "login": "sean@box.com"
291
+ },
292
+ "modified_by": {
293
+ "type": "user",
294
+ "id": "17738362",
295
+ "name": "sean rose",
296
+ "login": "sean@box.com"
297
+ },
298
+ "owned_by": {
299
+ "type": "user",
300
+ "id": "17738362",
301
+ "name": "sean rose",
302
+ "login": "sean@box.com"
303
+ },
304
+ "shared_link": {
305
+ "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
306
+ "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk",
307
+ "vanity_url": null,
308
+ "is_password_enabled": false,
309
+ "unshared_at": null,
310
+ "download_count": 0,
311
+ "preview_count": 0,
312
+ "access": "open",
313
+ "permissions": {
314
+ "can_download": true,
315
+ "can_preview": true
316
+ }
317
+ },
318
+ "folder_upload_email": {
319
+ "access": "open",
320
+ "email": "upload.Picture.k13sdz1@u.box.com"
321
+ },
322
+ "parent": {
323
+ "type": "folder",
324
+ "id": "0",
325
+ "sequence_id": null,
326
+ "etag": null,
327
+ "name": "All Files"
328
+ },
329
+ "item_status": "active",
330
+ "item_collection": {
331
+ "total_count": 1,
332
+ "entries": [
333
+ {
334
+ "type": "file",
335
+ "id": "5000948880",
336
+ "sequence_id": "3",
337
+ "etag": "3",
338
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
339
+ "name": "tigers.jpeg"
340
+ }
341
+ ],
342
+ "offset": 0,
343
+ "limit": 100
344
+ }
345
+ }
346
+ put:
347
+ description: |
348
+ Used to update information about the folder. To move a folder, update the ID
349
+ of its parent. To enable an email address that can be used to upload files
350
+ to this folder, update the folder_upload_email attribute. An optional
351
+ If-Match header can be included to ensure that client only updates the folder
352
+ if it knows about the latest version.
353
+ body:
354
+ schema: |
355
+ {
356
+ "$schema": "http://json-schema.org/draft-03/schema",
357
+ "type": "object" ,
358
+ "properties": {
359
+ "name": {
360
+ "description": "The desired name for the folder.",
361
+ "type": "string",
362
+ "required": true
363
+ },
364
+ "parent": {
365
+ "description": "The parent folder.",
366
+ "type": "object",
367
+ "required": true
368
+ },
369
+ "id": {
370
+ "description": "The ID of the parent folder.",
371
+ "type": "string",
372
+ "required": true
373
+ },
374
+ "description": {
375
+ "description": "The description of the folder.",
376
+ "type": "string"
377
+ },
378
+ "shared_link": {
379
+ "description": "An object representing this item'''s shared link and associated permissions.",
380
+ "type": "object"
381
+ },
382
+ "access": {
383
+ "description": "The level of access required for this shared link.",
384
+ "type": [ "open", "company", "collaborators"]
385
+ },
386
+ "unshared_at": {
387
+ "description": "The day that this link should be disabled at. Timestamps are rounded off to the given day.",
388
+ "type": "timestamp"
389
+ }
390
+ }
391
+ }
392
+ responses:
393
+ 200:
394
+ body:
395
+ example: |
396
+ {
397
+ "type": "folder",
398
+ "id": "11446498",
399
+ "sequence_id": "1",
400
+ "etag": "1",
401
+ "name": "New Folder Name!",
402
+ "created_at": "2012-12-12T10:53:43-08:00",
403
+ "modified_at": "2012-12-12T11:15:04-08:00",
404
+ "description": "Some pictures I took",
405
+ "size": 629644,
406
+ "path_collection": {
407
+ "total_count": 1,
408
+ "entries": [
409
+ {
410
+ "type": "folder",
411
+ "id": "0",
412
+ "sequence_id": null,
413
+ "etag": null,
414
+ "name": "All Files"
415
+ }
416
+ ]
417
+ },
418
+ "created_by": {
419
+ "type": "user",
420
+ "id": "17738362",
421
+ "name": "sean rose",
422
+ "login": "sean@box.com"
423
+ },
424
+ "modified_by": {
425
+ "type": "user",
426
+ "id": "17738362",
427
+ "name": "sean rose",
428
+ "login": "sean@box.com"
429
+ },
430
+ "owned_by": {
431
+ "type": "user",
432
+ "id": "17738362",
433
+ "name": "sean rose",
434
+ "login": "sean@box.com"
435
+ },
436
+ "shared_link": {
437
+ "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
438
+ "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk",
439
+ "vanity_url": null,
440
+ "is_password_enabled": false,
441
+ "unshared_at": null,
442
+ "download_count": 0,
443
+ "preview_count": 0,
444
+ "access": "open",
445
+ "permissions": {
446
+ "can_download": true,
447
+ "can_preview": true
448
+ }
449
+ },
450
+ "folder_upload_email": {
451
+ "access": "open",
452
+ "email": "upload.Picture.k13sdz1@u.box.com"
453
+ },
454
+ "parent": {
455
+ "type": "folder",
456
+ "id": "0",
457
+ "sequence_id": null,
458
+ "etag": null,
459
+ "name": "All Files"
460
+ },
461
+ "item_status": "active",
462
+ "item_collection": {
463
+ "total_count": 1,
464
+ "entries": [
465
+ {
466
+ "type": "file",
467
+ "id": "5000948880",
468
+ "sequence_id": "3",
469
+ "etag": "3",
470
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
471
+ "name": "tigers.jpeg"
472
+ }
473
+ ],
474
+ "offset": 0,
475
+ "limit": 100
476
+ }
477
+ }
478
+ delete:
479
+ description: |
480
+ Used to delete a folder. A recursive parameter must be included in order to
481
+ delete folders that have items inside of them. An optional If-Match header
482
+ can be included to ensure that client only deletes the folder if it knows
483
+ about the latest version.
484
+ queryParameters:
485
+ recursive:
486
+ description: Whether to delete this folder if it has items inside of it.
487
+ type: boolean
488
+ responses:
489
+ 204:
490
+ description: Folder removed.
491
+ post:
492
+ description: |
493
+ Restores an item that has been moved to the trash. Default behavior is to
494
+ restore the item to the folder it was in before it was moved to the trash.
495
+ If that parent folder no longer exists or if there is now an item with the
496
+ same name in that parent folder, the new parent folder and/or new name
497
+ will need to be included in the request.
498
+ body:
499
+ schema: |
500
+ {
501
+ "$schema": "http://json-schema.org/draft-03/schema",
502
+ "type": "object" ,
503
+ "properties": {
504
+ "name": {
505
+ "description": "The new name for this item.",
506
+ "type": "string"
507
+ },
508
+ "parent": {
509
+ "description": "The new parent folder for this item.",
510
+ "type": "object"
511
+ },
512
+ "id": {
513
+ "description": "The id of the new parent folder.",
514
+ "type": "string"
515
+ }
516
+ }
517
+ }
518
+ responses:
519
+ 201:
520
+ description: Item was succesfully created.
521
+ body:
522
+ example: |
523
+ {
524
+ "type": "folder",
525
+ "id": "588970022",
526
+ "sequence_id": "2",
527
+ "etag": "2",
528
+ "name": "heloo world",
529
+ "created_at": "2013-01-15T16:15:27-08:00",
530
+ "modified_at": "2013-02-07T13:26:00-08:00",
531
+ "description": "",
532
+ "size": 0,
533
+ "path_collection": {
534
+ "total_count": 1,
535
+ "entries": [
536
+ {
537
+ "type": "folder",
538
+ "id": "0",
539
+ "sequence_id": null,
540
+ "etag": null,
541
+ "name": "All Files"
542
+ }
543
+ ]
544
+ },
545
+ "created_by": {
546
+ "type": "user",
547
+ "id": "181757341",
548
+ "name": "sean test",
549
+ "login": "sean test@box.com"
550
+ },
551
+ "modified_by": {
552
+ "type": "user",
553
+ "id": "181757341",
554
+ "name": "sean test",
555
+ "login": "sean test@box.com"
556
+ },
557
+ "trashed_at": null,
558
+ "purged_at": null,
559
+ "content_created_at": "2013-01-15T16:15:27-08:00",
560
+ "content_modified_at": "2013-02-07T13:26:00-08:00",
561
+ "owned_by": {
562
+ "type": "user",
563
+ "id": "181757341",
564
+ "name": "sean test",
565
+ "login": "sean test@box.com"
566
+ },
567
+ "shared_link": null,
568
+ "folder_upload_email": null,
569
+ "parent": {
570
+ "type": "folder",
571
+ "id": "0",
572
+ "sequence_id": null,
573
+ "etag": null,
574
+ "name": "All Files"
575
+ },
576
+ "item_status": "active"
577
+ }
578
+ /copy:
579
+ type: base
580
+ post:
581
+ description: |
582
+ Used to create a copy of a folder in another folder. The original version
583
+ of the folder will not be altered.
584
+ body:
585
+ schema: |
586
+ {
587
+ "$schema": "http://json-schema.org/draft-03/schema",
588
+ "type": "object" ,
589
+ "properties": {
590
+ "name": {
591
+ "description": "An optional new name for the folder.",
592
+ "type": "string"
593
+ },
594
+ "parent": {
595
+ "description": "Object representing the new location of the folder.",
596
+ "type": "string",
597
+ "required": true
598
+ },
599
+ "id": {
600
+ "description": "The ID of the destination folder.",
601
+ "type": "string",
602
+ "required": true
603
+ }
604
+ }
605
+ }
606
+ responses:
607
+ 200:
608
+ body:
609
+ example: |
610
+ {
611
+ "type": "folder",
612
+ "id": "11446498",
613
+ "sequence_id": "1",
614
+ "etag": "1",
615
+ "name": "Pictures",
616
+ "created_at": "2012-12-12T10:53:43-08:00",
617
+ "modified_at": "2012-12-12T11:15:04-08:00",
618
+ "description": "Some pictures I took",
619
+ "size": 629644,
620
+ "path_collection": {
621
+ "total_count": 1,
622
+ "entries": [
623
+ {
624
+ "type": "folder",
625
+ "id": "0",
626
+ "sequence_id": null,
627
+ "etag": null,
628
+ "name": "All Files"
629
+ }
630
+ ]
631
+ },
632
+ "created_by": {
633
+ "type": "user",
634
+ "id": "17738362",
635
+ "name": "sean rose",
636
+ "login": "sean@box.com"
637
+ },
638
+ "modified_by": {
639
+ "type": "user",
640
+ "id": "17738362",
641
+ "name": "sean rose",
642
+ "login": "sean@box.com"
643
+ },
644
+ "owned_by": {
645
+ "type": "user",
646
+ "id": "17738362",
647
+ "name": "sean rose",
648
+ "login": "sean@box.com"
649
+ },
650
+ "shared_link": {
651
+ "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
652
+ "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk",
653
+ "vanity_url": null,
654
+ "is_password_enabled": false,
655
+ "unshared_at": null,
656
+ "download_count": 0,
657
+ "preview_count": 0,
658
+ "access": "open",
659
+ "permissions": {
660
+ "can_download": true,
661
+ "can_preview": true
662
+ }
663
+ },
664
+ "folder_upload_email": {
665
+ "access": "open",
666
+ "email": "upload.Picture.k13sdz1@u.box.com"
667
+ },
668
+ "parent": {
669
+ "type": "folder",
670
+ "id": "0",
671
+ "sequence_id": null,
672
+ "etag": null,
673
+ "name": "All Files"
674
+ },
675
+ "item_status": "active",
676
+ "item_collection": {
677
+ "total_count": 1,
678
+ "entries": [
679
+ {
680
+ "type": "file",
681
+ "id": "5000948880",
682
+ "sequence_id": "3",
683
+ "etag": "3",
684
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
685
+ "name": "tigers.jpeg"
686
+ }
687
+ ],
688
+ "offset": 0,
689
+ "limit": 100
690
+ }
691
+ }
692
+ /trash:
693
+ type: base
694
+ get:
695
+ description: |
696
+ Retrieves an item that has been moved to the trash. The full item will be
697
+ returned, including information about when the it was moved to the trash.
698
+ responses:
699
+ 200:
700
+ body:
701
+ example: |
702
+ {
703
+ "type": "folder",
704
+ "id": "588970022",
705
+ "sequence_id": "1",
706
+ "etag": "1",
707
+ "name": "heloo world",
708
+ "created_at": "2013-01-15T16:15:27-08:00",
709
+ "modified_at": "2013-01-17T13:48:23-08:00",
710
+ "description": "",
711
+ "size": 0,
712
+ "path_collection": {
713
+ "total_count": 1,
714
+ "entries": [
715
+ {
716
+ "type": "folder",
717
+ "id": "1",
718
+ "sequence_id": null,
719
+ "etag": null,
720
+ "name": "Trash"
721
+ }
722
+ ]
723
+ },
724
+ "created_by": {
725
+ "type": "user",
726
+ "id": "181757341",
727
+ "name": "sean test",
728
+ "login": "sean test@box.com"
729
+ },
730
+ "modified_by": {
731
+ "type": "user",
732
+ "id": "181757341",
733
+ "name": "sean test",
734
+ "login": "sean test@box.com"
735
+ },
736
+ "trashed_at": "2013-02-07T12:53:32-08:00",
737
+ "purged_at": "2013-03-09T12:53:32-08:00",
738
+ "content_created_at": "2013-01-15T16:15:27-08:00",
739
+ "content_modified_at": "2013-01-17T13:48:23-08:00",
740
+ "owned_by": {
741
+ "type": "user",
742
+ "id": "181757341",
743
+ "name": "sean test",
744
+ "login": "sean test@box.com"
745
+ },
746
+ "shared_link": null,
747
+ "folder_upload_email": null,
748
+ "parent": {
749
+ "type": "folder",
750
+ "id": "0",
751
+ "sequence_id": null,
752
+ "etag": null,
753
+ "name": "All Files"
754
+ },
755
+ "item_status": "trashed"
756
+ }
757
+ delete:
758
+ description: |
759
+ Permanently deletes an item that is in the trash. The item will no longer
760
+ exist in Box. This action cannot be undone.
761
+ responses:
762
+ 204:
763
+ description: Item successfully removed.
764
+ /items:
765
+ type: base
766
+ get:
767
+ description: |
768
+ Retrieves the files and/or folders contained within this folder
769
+ without any other metadata about the folder.
770
+ queryParameters:
771
+ fields:
772
+ description: Attribute(s) to include in the response
773
+ type: string
774
+ limit:
775
+ description: The number of items to return
776
+ type: integer
777
+ default: 100
778
+ maximum: 1000
779
+ offset:
780
+ description: The item at which to begin the response
781
+ type: integer
782
+ default: 0
783
+ responses:
784
+ 200:
785
+ body:
786
+ example: |
787
+ {
788
+ "total_count": 24,
789
+ "entries": [
790
+ {
791
+ "type": "folder",
792
+ "id": "192429928",
793
+ "sequence_id": "1",
794
+ "etag": "1",
795
+ "name": "Stephen Curry Three Pointers"
796
+ },
797
+ {
798
+ "type": "file",
799
+ "id": "818853862",
800
+ "sequence_id": "0",
801
+ "etag": "0",
802
+ "name": "Warriors.jpg"
803
+ }
804
+ ],
805
+ "offset": 0,
806
+ "limit": 2,
807
+ "order": [
808
+ {
809
+ "by": "type",
810
+ "direction": "ASC"
811
+ },
812
+ {
813
+ "by": "name",
814
+ "direction": "ASC"
815
+ }
816
+ ]
817
+ }
818
+ /collaborations:
819
+ type: base
820
+ get:
821
+ description: |
822
+ Use this to get a list of all the collaborations on a folder i.e. all of
823
+ the users that have access to that folder.
824
+ responses:
825
+ 200:
826
+ body:
827
+ example: |
828
+ {
829
+ "total_count": 1,
830
+ "entries": [
831
+ {
832
+ "type": "collaboration",
833
+ "id": "14176246",
834
+ "created_by": {
835
+ "type": "user",
836
+ "id": "4276790",
837
+ "name": "David Lee",
838
+ "login": "david@box.com"
839
+ },
840
+ "created_at": "2011-11-29T12:56:35-08:00",
841
+ "modified_at": "2012-09-11T15:12:32-07:00",
842
+ "expires_at": null,
843
+ "status": "accepted",
844
+ "accessible_by": {
845
+ "type": "user",
846
+ "id": "755492",
847
+ "name": "Simon Tan",
848
+ "login": "simon@box.net"
849
+ },
850
+ "role": "editor",
851
+ "acknowledged_at": "2011-11-29T12:59:40-08:00",
852
+ "item": null
853
+ }
854
+ ]
855
+ }
856
+ /trash/items:
857
+ type: base
858
+ get:
859
+ description: |
860
+ Retrieves the files and/or folders that have been moved to the trash. Any
861
+ attribute in the full files or folders objects can be passed in with the
862
+ fields parameter to get specific attributes, and only those specific
863
+ attributes back; otherwise, the mini format is returned for each item by
864
+ default. Multiple attributes can be passed in separated by commas e.g.
865
+ fields=name,created_at. Paginated results can be retrieved using the limit
866
+ and offset parameters.
867
+ queryParameters:
868
+ fields:
869
+ description: Attribute(s) to include in the response
870
+ type: string
871
+ limit:
872
+ description: The number of items to return
873
+ type: integer
874
+ default: 100
875
+ maximum: 1000
876
+ offset:
877
+ description: The item at which to begin the response
878
+ type: integer
879
+ default: 0
880
+ responses:
881
+ 200:
882
+ body:
883
+ example: |
884
+ {
885
+ "total_count": 49542,
886
+ "entries": [
887
+ {
888
+ "type": "file",
889
+ "id": "2701979016",
890
+ "sequence_id": "1",
891
+ "etag": "1",
892
+ "sha1": "9d976863fc849f6061ecf9736710bd9c2bce488c",
893
+ "name": "file Tue Jul 24 145436 2012KWPX5S.csv"
894
+ },
895
+ {
896
+ "type": "file",
897
+ "id": "2698211586",
898
+ "sequence_id": "1",
899
+ "etag": "1",
900
+ "sha1": "09b0e2e9760caf7448c702db34ea001f356f1197",
901
+ "name": "file Tue Jul 24 010055 20129Z6GS3.csv"
902
+ }
903
+ ],
904
+ "offset": 0,
905
+ "limit": 2
906
+ }
907
+ /files/{fileId}:
908
+ type: base
909
+ uriParameters:
910
+ fileId:
911
+ description: Box'''s unique string identifying this file.
912
+ type: string
913
+ get:
914
+ description: Used to retrieve the metadata about a file.
915
+ responses:
916
+ 200:
917
+ body:
918
+ example: |
919
+ {
920
+ "type": "file",
921
+ "id": "5000948880",
922
+ "sequence_id": "3",
923
+ "etag": "3",
924
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
925
+ "name": "tigers.jpeg",
926
+ "description": "a picture of tigers",
927
+ "size": 629644,
928
+ "path_collection": {
929
+ "total_count": 2,
930
+ "entries": [
931
+ {
932
+ "type": "folder",
933
+ "id": "0",
934
+ "sequence_id": null,
935
+ "etag": null,
936
+ "name": "All Files"
937
+ },
938
+ {
939
+ "type": "folder",
940
+ "id": "11446498",
941
+ "sequence_id": "1",
942
+ "etag": "1",
943
+ "name": "Pictures"
944
+ }
945
+ ]
946
+ },
947
+ "created_at": "2012-12-12T10:55:30-08:00",
948
+ "modified_at": "2012-12-12T11:04:26-08:00",
949
+ "created_by": {
950
+ "type": "user",
951
+ "id": "17738362",
952
+ "name": "sean rose",
953
+ "login": "sean@box.com"
954
+ },
955
+ "modified_by": {
956
+ "type": "user",
957
+ "id": "17738362",
958
+ "name": "sean rose",
959
+ "login": "sean@box.com"
960
+ },
961
+ "owned_by": {
962
+ "type": "user",
963
+ "id": "17738362",
964
+ "name": "sean rose",
965
+ "login": "sean@box.com"
966
+ },
967
+ "shared_link": {
968
+ "url": "https://www.box.com/s/rh935iit6ewrmw0unyul",
969
+ "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
970
+ "vanity_url": null,
971
+ "is_password_enabled": false,
972
+ "unshared_at": null,
973
+ "download_count": 0,
974
+ "preview_count": 0,
975
+ "access": "open",
976
+ "permissions": {
977
+ "can_download": true,
978
+ "can_preview": true
979
+ }
980
+ },
981
+ "parent": {
982
+ "type": "folder",
983
+ "id": "11446498",
984
+ "sequence_id": "1",
985
+ "etag": "1",
986
+ "name": "Pictures"
987
+ },
988
+ "item_status": "active"
989
+ }
990
+ put:
991
+ description: |
992
+ Used to update individual or multiple fields in the file object, including
993
+ renaming the file, changing it'''s description, and creating a shared link
994
+ for the file. To move a file, change the ID of its parent folder. An optional
995
+ If-Match header can be included to ensure that client only updates the file
996
+ if it knows about the latest version.
997
+ body:
998
+ schema: |
999
+ {
1000
+ "$schema": "http://json-schema.org/draft-03/schema",
1001
+ "type": "object" ,
1002
+ "properties": {
1003
+ "name": {
1004
+ "description": "The new name for the file.",
1005
+ "type": "string"
1006
+ },
1007
+ "description": {
1008
+ "description": "The new description for the file.",
1009
+ "type": "string"
1010
+ },
1011
+ "parent": {
1012
+ "description": "The parent folder of this file.",
1013
+ "type": "object"
1014
+ },
1015
+ "id": {
1016
+ "description": "The ID of the parent folder.",
1017
+ "type": "string"
1018
+ },
1019
+ "shared_link": {
1020
+ "description": "An object representing this item'''s shared link and associated permissions.",
1021
+ "type": "object"
1022
+ },
1023
+ "access": {
1024
+ "description": "The level of access required for this shared link.",
1025
+ "type": ["open", "company", "collaborators" ]
1026
+ },
1027
+ "unshared_at": {
1028
+ "description": "The day that this link should be disabled at. Timestamps are rounded off to the given day.",
1029
+ "type": "timestamp"
1030
+ },
1031
+ "permissions": {
1032
+ "description": "The set of permissions that apply to this link.",
1033
+ "type": "object"
1034
+ },
1035
+ "permissions.download": {
1036
+ "description": "Whether this link allows downloads.",
1037
+ "type": "boolean"
1038
+ },
1039
+ "permissions.preview": {
1040
+ "description": "Whether this link allows previews.",
1041
+ "type": "boolean"
1042
+ }
1043
+ }
1044
+ }
1045
+ responses:
1046
+ 200:
1047
+ body:
1048
+ example: |
1049
+ {
1050
+ "type": "file",
1051
+ "id": "5000948880",
1052
+ "sequence_id": "3",
1053
+ "etag": "3",
1054
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
1055
+ "name": "new name.jpg",
1056
+ "description": "a picture of tigers",
1057
+ "size": 629644,
1058
+ "path_collection": {
1059
+ "total_count": 2,
1060
+ "entries": [
1061
+ {
1062
+ "type": "folder",
1063
+ "id": "0",
1064
+ "sequence_id": null,
1065
+ "etag": null,
1066
+ "name": "All Files"
1067
+ },
1068
+ {
1069
+ "type": "folder",
1070
+ "id": "11446498",
1071
+ "sequence_id": "1",
1072
+ "etag": "1",
1073
+ "name": "Pictures"
1074
+ }
1075
+ ]
1076
+ },
1077
+ "created_at": "2012-12-12T10:55:30-08:00",
1078
+ "modified_at": "2012-12-12T11:04:26-08:00",
1079
+ "created_by": {
1080
+ "type": "user",
1081
+ "id": "17738362",
1082
+ "name": "sean rose",
1083
+ "login": "sean@box.com"
1084
+ },
1085
+ "modified_by": {
1086
+ "type": "user",
1087
+ "id": "17738362",
1088
+ "name": "sean rose",
1089
+ "login": "sean@box.com"
1090
+ },
1091
+ "owned_by": {
1092
+ "type": "user",
1093
+ "id": "17738362",
1094
+ "name": "sean rose",
1095
+ "login": "sean@box.com"
1096
+ },
1097
+ "shared_link": {
1098
+ "url": "https://www.box.com/s/rh935iit6ewrmw0unyul",
1099
+ "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
1100
+ "vanity_url": null,
1101
+ "is_password_enabled": false,
1102
+ "unshared_at": null,
1103
+ "download_count": 0,
1104
+ "preview_count": 0,
1105
+ "access": "open",
1106
+ "permissions": {
1107
+ "can_download": true,
1108
+ "can_preview": true
1109
+ }
1110
+ },
1111
+ "parent": {
1112
+ "type": "folder",
1113
+ "id": "11446498",
1114
+ "sequence_id": "1",
1115
+ "etag": "1",
1116
+ "name": "Pictures"
1117
+ },
1118
+ "item_status": "active"
1119
+ }
1120
+ delete:
1121
+ description: |
1122
+ Discards a file to the trash. The 'etag' of the file can be included as an
1123
+ 'If-Match' header to prevent race conditions.
1124
+ Trash: Depending on the enterprise settings for this user, the item will
1125
+ either be actually deleted from Box or moved to the trash.
1126
+ responses:
1127
+ 204:
1128
+ description: Confirm deletion.
1129
+ 412:
1130
+ description: If the 'If-Match' header is sent and fails.
1131
+ post:
1132
+ description: |
1133
+ Restores an item that has been moved to the trash. Default behavior is to
1134
+ restore the item to the folder it was in before it was moved to the trash.
1135
+ If that parent folder no longer exists or if there is now an item with the
1136
+ same name in that parent folder, the new parent folder and/or new name will
1137
+ need to be included in the request.
1138
+ body:
1139
+ schema: |
1140
+ {
1141
+ "$schema": "http://json-schema.org/draft-03/schema",
1142
+ "type": "object" ,
1143
+ "properties": {
1144
+ "name": {
1145
+ "description": "The new name for this item.",
1146
+ "type": "string"
1147
+ },
1148
+ "parent": {
1149
+ "description": "The new parent folder for this item.",
1150
+ "type": "object"
1151
+ },
1152
+ "id": {
1153
+ "description": "The id of the new parent folder.",
1154
+ "type": "string"
1155
+ }
1156
+ }
1157
+ }
1158
+ responses:
1159
+ 201:
1160
+ body:
1161
+ example: |
1162
+ {
1163
+ "type": "file",
1164
+ "id": "5859258256",
1165
+ "sequence_id": "3",
1166
+ "etag": "3",
1167
+ "sha1": "4bd9e98652799fc57cf9423e13629c151152ce6c",
1168
+ "name": "Screenshot_1_30_13_6_37_PM.png",
1169
+ "description": "",
1170
+ "size": 163265,
1171
+ "path_collection": {
1172
+ "total_count": 1,
1173
+ "entries": [
1174
+ {
1175
+ "type": "folder",
1176
+ "id": "0",
1177
+ "sequence_id": null,
1178
+ "etag": null,
1179
+ "name": "All Files"
1180
+ }
1181
+ ]
1182
+ },
1183
+ "created_at": "2013-01-30T18:43:56-08:00",
1184
+ "modified_at": "2013-02-07T10:56:58-08:00",
1185
+ "trashed_at": null,
1186
+ "purged_at": null,
1187
+ "content_created_at": "2013-01-30T18:43:56-08:00",
1188
+ "content_modified_at": "2013-02-07T10:56:58-08:00",
1189
+ "created_by": {
1190
+ "type": "user",
1191
+ "id": "181757341",
1192
+ "name": "sean test",
1193
+ "login": "sean test@box.com"
1194
+ },
1195
+ "modified_by": {
1196
+ "type": "user",
1197
+ "id": "181757341",
1198
+ "name": "sean test",
1199
+ "login": "sean test@box.com"
1200
+ },
1201
+ "owned_by": {
1202
+ "type": "user",
1203
+ "id": "181757341",
1204
+ "name": "sean test",
1205
+ "login": "sean test@box.com"
1206
+ },
1207
+ "shared_link": {
1208
+ "url": "https://seanrose.box.com/s/ebgti08mtmhbpb4vlp55",
1209
+ "download_url": "https://seanrose.box.com/shared/static/ebgti08mtmhbpb4vlp55.png",
1210
+ "vanity_url": null,
1211
+ "is_password_enabled": false,
1212
+ "unshared_at": null,
1213
+ "download_count": 0,
1214
+ "preview_count": 4,
1215
+ "access": "open",
1216
+ "permissions": {
1217
+ "can_download": true,
1218
+ "can_preview": true
1219
+ }
1220
+ },
1221
+ "parent": {
1222
+ "type": "folder",
1223
+ "id": "0",
1224
+ "sequence_id": null,
1225
+ "etag": null,
1226
+ "name": "All Files"
1227
+ },
1228
+ "item_status": "active"
1229
+ }
1230
+ /content:
1231
+ type: base
1232
+ get:
1233
+ description: |
1234
+ Retrieves the actual data of the file. An optional version parameter can be
1235
+ set to download a previous version of the file.
1236
+ queryParameters:
1237
+ version:
1238
+ description: The ID specific version of this file to download.
1239
+ type: string
1240
+ responses:
1241
+ 302:
1242
+ description: Found
1243
+ 202:
1244
+ description: |
1245
+ If the file is not ready to be downloaded (i.e. in the case where the
1246
+ file was uploaded immediately before the download request), a response
1247
+ with an HTTP status of 202 Accepted will be returned with a 'Retry-After'
1248
+ header indicating the time in seconds after which the file will be
1249
+ available for the client to download.
1250
+ /versions:
1251
+ type: base
1252
+ get:
1253
+ description: |
1254
+ If there are previous versions of this file, this method can be used to
1255
+ retrieve metadata about the older versions.
1256
+ ALERT: Versions are only tracked for Box users with premium accounts.
1257
+ responses:
1258
+ 200:
1259
+ description: |
1260
+ An array of version objects are returned. If there are no previous
1261
+ versions of this file, then an empty array will be returned.
1262
+ body:
1263
+ example: |
1264
+ {
1265
+ "total_count": 1,
1266
+ "entries": [
1267
+ {
1268
+ "type": "file_version",
1269
+ "id": "672259576",
1270
+ "sha1": "359c6c1ed98081b9a69eb3513b9deced59c957f9",
1271
+ "name": "Dragons.js",
1272
+ "size": 92556,
1273
+ "created_at": "2012-08-20T10:20:30-07:00",
1274
+ "modified_at": "2012-11-28T13:14:58-08:00",
1275
+ "modified_by": {
1276
+ "type": "user",
1277
+ "id": "183732129",
1278
+ "name": "sean rose",
1279
+ "login": "sean apitest@box.com"
1280
+ }
1281
+ }
1282
+ ]
1283
+ }
1284
+ /copy:
1285
+ type: base
1286
+ post:
1287
+ description: |
1288
+ Used to create a copy of a file in another folder. The original version of
1289
+ the file will not be altered.
1290
+ body:
1291
+ schema: |
1292
+ {
1293
+ "$schema": "http://json-schema.org/draft-03/schema",
1294
+ "type": "object" ,
1295
+ "properties": {
1296
+ "parent": {
1297
+ "description": "Folder object representing the new location of the file.",
1298
+ "type": "string",
1299
+ "required": true
1300
+ },
1301
+ "id": {
1302
+ "description": "The ID of the destination folder.",
1303
+ "type": "string",
1304
+ "required": true
1305
+ },
1306
+ "name": {
1307
+ "description": "An optional new name for the file",
1308
+ "type": "string"
1309
+ }
1310
+ }
1311
+ }
1312
+ responses:
1313
+ 200:
1314
+ body:
1315
+ example: |
1316
+ {
1317
+ "type": "file",
1318
+ "id": "5000948880",
1319
+ "sequence_id": "3",
1320
+ "etag": "3",
1321
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
1322
+ "name": "tigers.jpeg",
1323
+ "description": "a picture of tigers",
1324
+ "size": 629644,
1325
+ "path_collection": {
1326
+ "total_count": 2,
1327
+ "entries": [
1328
+ {
1329
+ "type": "folder",
1330
+ "id": "0",
1331
+ "sequence_id": null,
1332
+ "etag": null,
1333
+ "name": "All Files"
1334
+ },
1335
+ {
1336
+ "type": "folder",
1337
+ "id": "11446498",
1338
+ "sequence_id": "1",
1339
+ "etag": "1",
1340
+ "name": "Pictures"
1341
+ }
1342
+ ]
1343
+ },
1344
+ "created_at": "2012-12-12T10:55:30-08:00",
1345
+ "modified_at": "2012-12-12T11:04:26-08:00",
1346
+ "created_by": {
1347
+ "type": "user",
1348
+ "id": "17738362",
1349
+ "name": "sean rose",
1350
+ "login": "sean@box.com"
1351
+ },
1352
+ "modified_by": {
1353
+ "type": "user",
1354
+ "id": "17738362",
1355
+ "name": "sean rose",
1356
+ "login": "sean@box.com"
1357
+ },
1358
+ "owned_by": {
1359
+ "type": "user",
1360
+ "id": "17738362",
1361
+ "name": "sean rose",
1362
+ "login": "sean@box.com"
1363
+ },
1364
+ "shared_link": {
1365
+ "url": "https://www.box.com/s/rh935iit6ewrmw0unyul",
1366
+ "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
1367
+ "vanity_url": null,
1368
+ "is_password_enabled": false,
1369
+ "unshared_at": null,
1370
+ "download_count": 0,
1371
+ "preview_count": 0,
1372
+ "access": "open",
1373
+ "permissions": {
1374
+ "can_download": true,
1375
+ "can_preview": true
1376
+ }
1377
+ },
1378
+ "parent": {
1379
+ "type": "folder",
1380
+ "id": "11446498",
1381
+ "sequence_id": "1",
1382
+ "etag": "1",
1383
+ "name": "Pictures"
1384
+ },
1385
+ "item_status": "active"
1386
+ }
1387
+ 409:
1388
+ description: |
1389
+ Will be returned if the intended destination folder is the same, as this
1390
+ will cause a name collision.
1391
+ /thumbnail.extension:
1392
+ type: base
1393
+ get:
1394
+ description: |
1395
+ Retrieves a thumbnail, or smaller image representation, of this file. Sizes
1396
+ of 32x32, 64x64, 128x128, and 256x256 can be returned. Currently thumbnails
1397
+ are only available in .png format and will only be generated for image file
1398
+ formats.
1399
+ There are three success cases that your application needs to account for:
1400
+ - If the thumbnail isn'''t available yet, a 202 Accepted HTTP status will
1401
+ be returned, including a 'Location' header pointing to a placeholder
1402
+ graphic that can be used until the thumbnail is returned. A 'Retry-After'
1403
+ header will also be returned, indicating the time in seconds after which
1404
+ the thumbnail will be available. Your application should only attempt to
1405
+ get the thumbnail again after Retry-After time.
1406
+ - If Box can'''t generate a thumbnail for this file type, a 302 Found
1407
+ response will be returned, redirecting to a placeholder graphic in the
1408
+ requested size for this particular file type.
1409
+ - If the thumbnail is available, a 200 OK response will be returned with
1410
+ the contents of the thumbnail in the body.
1411
+ - If Box is unable to generate a thumbnail for this particular file, a
1412
+ 404 'Not Found' response will be returned with a code of
1413
+ preview_cannot_be_generated. If there are any bad parameters sent in, a
1414
+ standard 400 'Bad Request' will be returned.
1415
+ queryParameters:
1416
+ min_height:
1417
+ description: The minimum height of the thumbnail.
1418
+ type: integer
1419
+ min_width:
1420
+ description: The minimum width of the thumbnail.
1421
+ type: integer
1422
+ max_height:
1423
+ description: The maximum height of the thumbnail
1424
+ type: integer
1425
+ max_width:
1426
+ description: The maximum width of the thumbnail
1427
+ type: integer
1428
+ /trash:
1429
+ type: base
1430
+ get:
1431
+ description: |
1432
+ Retrieves an item that has been moved to the trash. The full item will be
1433
+ returned, including information about when the it was moved to the trash.
1434
+ responses:
1435
+ 200:
1436
+ body:
1437
+ example: |
1438
+ {
1439
+ "type": "file",
1440
+ "id": "5859258256",
1441
+ "sequence_id": "2",
1442
+ "etag": "2",
1443
+ "sha1": "4bd9e98652799fc57cf9423e13629c151152ce6c",
1444
+ "name": "Screenshot_1_30_13_6_37_PM.png",
1445
+ "description": "",
1446
+ "size": 163265,
1447
+ "path_collection": {
1448
+ "total_count": 1,
1449
+ "entries": [
1450
+ {
1451
+ "type": "folder",
1452
+ "id": "1",
1453
+ "sequence_id": null,
1454
+ "etag": null,
1455
+ "name": "Trash"
1456
+ }
1457
+ ]
1458
+ },
1459
+ "created_at": "2013-01-30T18:43:56-08:00",
1460
+ "modified_at": "2013-01-30T18:44:00-08:00",
1461
+ "trashed_at": "2013-02-07T10:49:34-08:00",
1462
+ "purged_at": "2013-03-09T10:49:34-08:00",
1463
+ "content_created_at": "2013-01-30T18:43:56-08:00",
1464
+ "content_modified_at": "2013-01-30T18:44:00-08:00",
1465
+ "created_by": {
1466
+ "type": "user",
1467
+ "id": "181757341",
1468
+ "name": "sean test",
1469
+ "login": "sean test@box.com"
1470
+ },
1471
+ "modified_by": {
1472
+ "type": "user",
1473
+ "id": "181757341",
1474
+ "name": "sean test",
1475
+ "login": "sean test@box.com"
1476
+ },
1477
+ "owned_by": {
1478
+ "type": "user",
1479
+ "id": "181757341",
1480
+ "name": "sean test",
1481
+ "login": "sean test@box.com"
1482
+ },
1483
+ "shared_link": {
1484
+ "url": null,
1485
+ "download_url": null,
1486
+ "vanity_url": null,
1487
+ "is_password_enabled": false,
1488
+ "unshared_at": null,
1489
+ "download_count": 0,
1490
+ "preview_count": 0,
1491
+ "access": "open",
1492
+ "permissions": {
1493
+ "can_download": true,
1494
+ "can_preview": true
1495
+ }
1496
+ },
1497
+ "parent": {
1498
+ "type": "folder",
1499
+ "id": "0",
1500
+ "sequence_id": null,
1501
+ "etag": null,
1502
+ "name": "All Files"
1503
+ },
1504
+ "item_status": "trashed"
1505
+ }
1506
+ delete:
1507
+ description: |
1508
+ Permanently deletes an item that is in the trash. The item will no longer
1509
+ exist in Box. This action cannot be undone.
1510
+ responses:
1511
+ 204:
1512
+ description: Item removed.
1513
+ /comments:
1514
+ type: base
1515
+ get:
1516
+ description: |
1517
+ Retrieves the comments on a particular file, if any exist. A collection of
1518
+ comment objects are returned. If there are no comments on the file, an empty
1519
+ comments array is returned.
1520
+ responses:
1521
+ 200:
1522
+ body:
1523
+ example: |
1524
+ {
1525
+ "total_count": 1,
1526
+ "entries": [
1527
+ {
1528
+ "type": "comment",
1529
+ "id": "191969",
1530
+ "is_reply_comment": false,
1531
+ "message": "These tigers are cool!",
1532
+ "created_by": {
1533
+ "type": "user",
1534
+ "id": "17738362",
1535
+ "name": "sean rose",
1536
+ "login": "sean@box.com"
1537
+ },
1538
+ "created_at": "2012-12-12T11:25:01-08:00",
1539
+ "item": {
1540
+ "id": "5000948880",
1541
+ "type": "file"
1542
+ },
1543
+ "modified_at": "2012-12-12T11:25:01-08:00"
1544
+ }
1545
+ ]
1546
+ }
1547
+ /tasks:
1548
+ type: base
1549
+ get:
1550
+ description: |
1551
+ Retrieves all of the tasks for given file. A collection of mini task objects
1552
+ is returned. If there are no tasks, an empty collection will be returned.
1553
+ responses:
1554
+ 200:
1555
+ body:
1556
+ example: |
1557
+ {
1558
+ "total_count": 1,
1559
+ "entries": [
1560
+ {
1561
+ "type": "task",
1562
+ "id": "1786931",
1563
+ "item": {
1564
+ "type": "file",
1565
+ "id": "7026335894",
1566
+ "sequence_id": "6",
1567
+ "etag": "6",
1568
+ "sha1": "81cc829fb8366fcfc108aa6c5a9bde01a6a10c16",
1569
+ "name": "API - Persist On-Behalf-Of information.docx"
1570
+ },
1571
+ "due_at": null
1572
+ }
1573
+ ]
1574
+ }
1575
+ /shared_items:
1576
+ type: base
1577
+ get:
1578
+ description: |
1579
+ Used to retrieve the metadata about a shared item when only given a shared
1580
+ link. Because of varying permission levels for shared links, a password may
1581
+ be required to retrieve the shared item. Once the item has been retrieved,
1582
+ you can make API requests against the actual resource '/files/{id}' or
1583
+ '/folders/{id}' as long as the shared link and optional password are in the
1584
+ header.
1585
+ A full file or folder object is returned if the shared link is valid and the
1586
+ user has access to it. An error may be returned if the link is invalid, if a
1587
+ password is required, or if the user does not have access to the file.
1588
+ queryParameters:
1589
+ BoxApi:
1590
+ required: true
1591
+ enum:
1592
+ - '0'
1593
+ - '1'
1594
+ - 'true'
1595
+ - 'false'
1596
+ - 't'
1597
+ - 'f'
1598
+ type: string
1599
+ shared_link:
1600
+ description: The shared link for this item
1601
+ required: true
1602
+ enum:
1603
+ - '0'
1604
+ - '1'
1605
+ - 'true'
1606
+ - 'false'
1607
+ - 't'
1608
+ - 'f'
1609
+ type: string
1610
+ shared_link_password:
1611
+ description: The password for this shared link
1612
+ type: string
1613
+ responses:
1614
+ 200:
1615
+ body:
1616
+ example: |
1617
+ {
1618
+ "type": "folder",
1619
+ "id": "11446498",
1620
+ "sequence_id": "1",
1621
+ "etag": "1",
1622
+ "name": "Pictures",
1623
+ "created_at": "2012-12-12T10:53:43-08:00",
1624
+ "modified_at": "2012-12-12T11:15:04-08:00",
1625
+ "description": "Some pictures I took",
1626
+ "size": 629644,
1627
+ "path_collection": {
1628
+ "total_count": 1,
1629
+ "entries": [
1630
+ {
1631
+ "type": "folder",
1632
+ "id": "0",
1633
+ "sequence_id": null,
1634
+ "etag": null,
1635
+ "name": "All Files"
1636
+ }
1637
+ ]
1638
+ },
1639
+ "created_by": {
1640
+ "type": "user",
1641
+ "id": "17738362",
1642
+ "name": "sean rose",
1643
+ "login": "sean@box.com"
1644
+ },
1645
+ "modified_by": {
1646
+ "type": "user",
1647
+ "id": "17738362",
1648
+ "name": "sean rose",
1649
+ "login": "sean@box.com"
1650
+ },
1651
+ "owned_by": {
1652
+ "type": "user",
1653
+ "id": "17738362",
1654
+ "name": "sean rose",
1655
+ "login": "sean@box.com"
1656
+ },
1657
+ "shared_link": {
1658
+ "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
1659
+ "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk",
1660
+ "vanity_url": null,
1661
+ "is_password_enabled": false,
1662
+ "unshared_at": null,
1663
+ "download_count": 0,
1664
+ "preview_count": 0,
1665
+ "access": "open",
1666
+ "permissions": {
1667
+ "can_download": true,
1668
+ "can_preview": true
1669
+ }
1670
+ },
1671
+ "folder_upload_email": {
1672
+ "access": "open",
1673
+ "email": "upload.Picture.k13sdz1@u.box.com"
1674
+ },
1675
+ "parent": {
1676
+ "type": "folder",
1677
+ "id": "0",
1678
+ "sequence_id": null,
1679
+ "etag": null,
1680
+ "name": "All Files"
1681
+ },
1682
+ "item_status": "active",
1683
+ "item_collection": {
1684
+ "total_count": 1,
1685
+ "entries": [
1686
+ {
1687
+ "type": "file",
1688
+ "id": "5000948880",
1689
+ "sequence_id": "3",
1690
+ "etag": "3",
1691
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
1692
+ "name": "tigers.jpeg"
1693
+ }
1694
+ ],
1695
+ "offset": 0,
1696
+ "limit": 100
1697
+ }
1698
+ }
1699
+ /comments:
1700
+ type: base
1701
+ post:
1702
+ description: |
1703
+ Used to add a comment by the user to a specific file or comment (i.e. as a
1704
+ reply comment).
1705
+ body:
1706
+ schema: |
1707
+ {
1708
+ "$schema": "http://json-schema.org/draft-03/schema",
1709
+ "type": "object" ,
1710
+ "properties": {
1711
+ "item": {
1712
+ "description": "The item that this comment will be placed on.",
1713
+ "type": "object",
1714
+ "required": true
1715
+ },
1716
+ "type": {
1717
+ "description": "The type of the item that this comment will be placed on.",
1718
+ "type": [ "file", "comment" ]
1719
+ },
1720
+ "id": {
1721
+ "description": "The id of the item that this comment will be placed on.",
1722
+ "type": "string"
1723
+ },
1724
+ "message": {
1725
+ "description": "The text body of the comment.",
1726
+ "type": "string"
1727
+ }
1728
+ }
1729
+ }
1730
+ responses:
1731
+ 200:
1732
+ body:
1733
+ example: |
1734
+ {
1735
+ "type": "comment",
1736
+ "id": "191969",
1737
+ "is_reply_comment": false,
1738
+ "message": "These tigers are cool!",
1739
+ "created_by": {
1740
+ "type": "user",
1741
+ "id": "17738362",
1742
+ "name": "sean rose",
1743
+ "login": "sean@box.com"
1744
+ },
1745
+ "created_at": "2012-12-12T11:25:01-08:00",
1746
+ "item": {
1747
+ "id": "5000948880",
1748
+ "type": "file"
1749
+ },
1750
+ "modified_at": "2012-12-12T11:25:01-08:00"
1751
+ }
1752
+ schema: |
1753
+ {
1754
+ "$schema": "http://json-schema.org/draft-03/schema",
1755
+ "type": "object",
1756
+ "properties": {
1757
+ "type": {
1758
+ "description": "For comments is 'comment'.",
1759
+ "type": "string"
1760
+ },
1761
+ "id": {
1762
+ "description": "A unique string identifying this comment.",
1763
+ "type": "string"
1764
+ },
1765
+ "is_reply_comment": {
1766
+ "description": "Whether or not this comment is a reply to another comment.",
1767
+ "type": "boolean"
1768
+ },
1769
+ "message": {
1770
+ "description": "The comment text that the user typed.",
1771
+ "type": "string"
1772
+ },
1773
+ "tagged_message": {
1774
+ "description": "The string representing the comment text with @mentions included.",
1775
+ "required": false,
1776
+ "type": "string"
1777
+ },
1778
+ "created_by": {
1779
+ "properties": {
1780
+ "type": {
1781
+ "type": "string"
1782
+ },
1783
+ "id": {
1784
+ "type": "string"
1785
+ },
1786
+ "name": {
1787
+ "type": "string"
1788
+ },
1789
+ "login": {
1790
+ "type": "string"
1791
+ }
1792
+ },
1793
+ "description": "A mini user object representing the author of the comment.",
1794
+ "type": "object"
1795
+ },
1796
+ "dcreated_at": {
1797
+ "description": "The time this comment was created.",
1798
+ "type": "timestamp"
1799
+ },
1800
+ "item": {
1801
+ "properties": {
1802
+ "id": {
1803
+ "type": "string"
1804
+ },
1805
+ "type": {
1806
+ "type": "string"
1807
+ }
1808
+ },
1809
+ "description": "The object this comment was placed on.",
1810
+ "type": "object"
1811
+ },
1812
+ "modified_at": {
1813
+ "description": "The time this comment was last modified.",
1814
+ "type": "timestamp"
1815
+ }
1816
+ },
1817
+ "required": false,
1818
+ "type": "object"
1819
+ }
1820
+ /{commentId}:
1821
+ type: base
1822
+ uriParameters:
1823
+ commentId:
1824
+ description: Box'''s unique string identifying this comment.
1825
+ put:
1826
+ description: |
1827
+ Used to update the message of the comment. The full updated comment object
1828
+ is returned if the ID is valid and if the user has access to the comment.
1829
+ body:
1830
+ schema: |
1831
+ {
1832
+ "$schema": "http://json-schema.org/draft-03/schema",
1833
+ "type": "object" ,
1834
+ "properties": {
1835
+ "message": {
1836
+ "description": "The desired text for the comment message.",
1837
+ "type": "string",
1838
+ "required": true
1839
+ }
1840
+ }
1841
+ }
1842
+ responses:
1843
+ 200:
1844
+ body:
1845
+ example: |
1846
+ {
1847
+ "type": "comment",
1848
+ "id": "191969",
1849
+ "is_reply_comment": false,
1850
+ "message": "These tigers are cool!",
1851
+ "created_by": {
1852
+ "type": "user",
1853
+ "id": "17738362",
1854
+ "name": "sean rose",
1855
+ "login": "sean@box.com"
1856
+ },
1857
+ "created_at": "2012-12-12T11:25:01-08:00",
1858
+ "item": {
1859
+ "id": "5000948880",
1860
+ "type": "file"
1861
+ },
1862
+ "modified_at": "2012-12-12T11:25:01-08:00"
1863
+ }
1864
+ schema: |
1865
+ {
1866
+ "$schema": "http://json-schema.org/draft-03/schema",
1867
+ "type": "object",
1868
+ "properties": {
1869
+ "type": {
1870
+ "description": "For comments is 'comment'.",
1871
+ "type": "string"
1872
+ },
1873
+ "id": {
1874
+ "description": "A unique string identifying this comment.",
1875
+ "type": "string"
1876
+ },
1877
+ "is_reply_comment": {
1878
+ "description": "Whether or not this comment is a reply to another comment.",
1879
+ "type": "boolean"
1880
+ },
1881
+ "message": {
1882
+ "description": "The comment text that the user typed.",
1883
+ "type": "string"
1884
+ },
1885
+ "tagged_message": {
1886
+ "description": "The string representing the comment text with @mentions included.",
1887
+ "required": false,
1888
+ "type": "string"
1889
+ },
1890
+ "created_by": {
1891
+ "properties": {
1892
+ "type": {
1893
+ "type": "string"
1894
+ },
1895
+ "id": {
1896
+ "type": "string"
1897
+ },
1898
+ "name": {
1899
+ "type": "string"
1900
+ },
1901
+ "login": {
1902
+ "type": "string"
1903
+ }
1904
+ },
1905
+ "description": "A mini user object representing the author of the comment.",
1906
+ "type": "object"
1907
+ },
1908
+ "dcreated_at": {
1909
+ "description": "The time this comment was created.",
1910
+ "type": "timestamp"
1911
+ },
1912
+ "item": {
1913
+ "properties": {
1914
+ "id": {
1915
+ "type": "string"
1916
+ },
1917
+ "type": {
1918
+ "type": "string"
1919
+ }
1920
+ },
1921
+ "description": "The object this comment was placed on.",
1922
+ "type": "object"
1923
+ },
1924
+ "modified_at": {
1925
+ "description": "The time this comment was last modified.",
1926
+ "type": "timestamp"
1927
+ }
1928
+ },
1929
+ "required": false,
1930
+ "type": "object"
1931
+ }
1932
+ get:
1933
+ description: |
1934
+ Used to retrieve the message and metadata about a specific comment.
1935
+ Information about the user who created the comment is also included.
1936
+ responses:
1937
+ 200:
1938
+ body:
1939
+ example: |
1940
+ {
1941
+ "type": "comment",
1942
+ "id": "191969",
1943
+ "is_reply_comment": false,
1944
+ "message": "These tigers are cool!",
1945
+ "created_by": {
1946
+ "type": "user",
1947
+ "id": "17738362",
1948
+ "name": "sean rose",
1949
+ "login": "sean@box.com"
1950
+ },
1951
+ "created_at": "2012-12-12T11:25:01-08:00",
1952
+ "item": {
1953
+ "id": "5000948880",
1954
+ "type": "file"
1955
+ },
1956
+ "modified_at": "2012-12-12T11:25:01-08:00"
1957
+ }
1958
+ schema: |
1959
+ {
1960
+ "$schema": "http://json-schema.org/draft-03/schema",
1961
+ "type": "object",
1962
+ "properties": {
1963
+ "type": {
1964
+ "description": "For comments is 'comment'.",
1965
+ "type": "string"
1966
+ },
1967
+ "id": {
1968
+ "description": "A unique string identifying this comment.",
1969
+ "type": "string"
1970
+ },
1971
+ "is_reply_comment": {
1972
+ "description": "Whether or not this comment is a reply to another comment.",
1973
+ "type": "boolean"
1974
+ },
1975
+ "message": {
1976
+ "description": "The comment text that the user typed.",
1977
+ "type": "string"
1978
+ },
1979
+ "tagged_message": {
1980
+ "description": "The string representing the comment text with @mentions included.",
1981
+ "required": false,
1982
+ "type": "string"
1983
+ },
1984
+ "created_by": {
1985
+ "properties": {
1986
+ "type": {
1987
+ "type": "string"
1988
+ },
1989
+ "id": {
1990
+ "type": "string"
1991
+ },
1992
+ "name": {
1993
+ "type": "string"
1994
+ },
1995
+ "login": {
1996
+ "type": "string"
1997
+ }
1998
+ },
1999
+ "description": "A mini user object representing the author of the comment.",
2000
+ "type": "object"
2001
+ },
2002
+ "dcreated_at": {
2003
+ "description": "The time this comment was created.",
2004
+ "type": "timestamp"
2005
+ },
2006
+ "item": {
2007
+ "properties": {
2008
+ "id": {
2009
+ "type": "string"
2010
+ },
2011
+ "type": {
2012
+ "type": "string"
2013
+ }
2014
+ },
2015
+ "description": "The object this comment was placed on.",
2016
+ "type": "object"
2017
+ },
2018
+ "modified_at": {
2019
+ "description": "The time this comment was last modified.",
2020
+ "type": "timestamp"
2021
+ }
2022
+ },
2023
+ "required": false,
2024
+ "type": "object"
2025
+ }
2026
+ delete:
2027
+ description: |
2028
+ Permanently deletes a comment. An empty 200 response is returned to confirm
2029
+ deletion of the comment. Errors can be thrown if the ID is invalid or if the
2030
+ user is not authorized to delete this particular comment.
2031
+ responses:
2032
+ 200:
2033
+ description: Confirm deletion of the comment.
2034
+ /collaborations:
2035
+ type: base
2036
+ post:
2037
+ description: |
2038
+ Used to add a collaboration for a single user to a folder. Either an email
2039
+ address or a user ID can be used to create the collaboration.
2040
+ body:
2041
+ schema: |
2042
+ {
2043
+ "$schema": "http://json-schema.org/draft-03/schema",
2044
+ "type": "object",
2045
+ "properties": {
2046
+ "item": {
2047
+ "description": "The item to add the collaboration on.",
2048
+ "type": "object",
2049
+ "required": true
2050
+ },
2051
+ "id": {
2052
+ "description": "The ID of the item to add the collaboration on.",
2053
+ "type": "string",
2054
+ "required": true
2055
+ },
2056
+ "type": {
2057
+ "description": "Must be 'folder'.",
2058
+ "type": "string",
2059
+ "required": true
2060
+ },
2061
+ "accessible_by": {
2062
+ "description": "The user who this collaboration applies to.",
2063
+ "type": "object",
2064
+ "required": true
2065
+ },
2066
+ "role": {
2067
+ "description": "The access level of this collaboration.",
2068
+ "type": ["editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ],
2069
+ "required": true
2070
+ },
2071
+ "id": {
2072
+ "description": "The ID of this user.",
2073
+ "type": "string"
2074
+ },
2075
+ "login": {
2076
+ "description": "An email address (does not need to be a Box user).",
2077
+ "type": "string"
2078
+ }
2079
+ }
2080
+ }
2081
+ responses:
2082
+ 200:
2083
+ body:
2084
+ example: |
2085
+ {
2086
+ "type": "collaboration",
2087
+ "id": "791293",
2088
+ "created_by": {
2089
+ "type": "user",
2090
+ "id": "17738362",
2091
+ "name": "sean rose",
2092
+ "login": "sean@box.com"
2093
+ },
2094
+ "created_at": "2012-12-12T10:54:37-08:00",
2095
+ "modified_at": "2012-12-12T11:30:43-08:00",
2096
+ "expires_at": null,
2097
+ "status": "accepted",
2098
+ "accessible_by": {
2099
+ "type": "user",
2100
+ "id": "18203124",
2101
+ "name": "sean",
2102
+ "login": "sean test@box.com"
2103
+ },
2104
+ "role": "editor",
2105
+ "acknowledged_at": "2012-12-12T11:30:43-08:00",
2106
+ "item": {
2107
+ "type": "folder",
2108
+ "id": "11446500",
2109
+ "sequence_id": "0",
2110
+ "etag": "0",
2111
+ "name": "Shared Pictures"
2112
+ }
2113
+ }
2114
+ schema: |
2115
+ {
2116
+ "$schema": "http://json-schema.org/draft-03/schema",
2117
+ "type": "object" ,
2118
+ "properties": {
2119
+ "type": {
2120
+ "description": "For collaborations is 'collaboration'",
2121
+ "type": "string"
2122
+ },
2123
+ "id": {
2124
+ "description": "A unique string identifying this collaboration.",
2125
+ "type": "string"
2126
+ },
2127
+ "created_by": {
2128
+ "properties": {
2129
+ "type": {
2130
+ "type": "string"
2131
+ },
2132
+ "id": {
2133
+ "type": "string"
2134
+ },
2135
+ "name": {
2136
+ "type": "string"
2137
+ },
2138
+ "login": {
2139
+ "type": "string"
2140
+ }
2141
+ },
2142
+ "description": "The user who created this collaboration.",
2143
+ "type": "object"
2144
+ },
2145
+ "created_at": {
2146
+ "description": "The time this collaboration was created.",
2147
+ "type": "timestamp"
2148
+ },
2149
+ "modified_at": {
2150
+ "description": "The time this collaboration was last modified.",
2151
+ "type": "timestamp"
2152
+ },
2153
+ "expires_at": {
2154
+ "description": "The time this collaboration will expire.",
2155
+ "type": "timestamp"
2156
+ },
2157
+ "status": {
2158
+ "description": "The status of this collab.",
2159
+ "enum": [ "accepted", "pending", "rejected" ]
2160
+ },
2161
+ "accecible_by": {
2162
+ "properties": {
2163
+ "type": {
2164
+ "type": "string"
2165
+ },
2166
+ "id": {
2167
+ "type": "string"
2168
+ },
2169
+ "name": {
2170
+ "type": "string"
2171
+ },
2172
+ "login": {
2173
+ "type": "string"
2174
+ }
2175
+ },
2176
+ "description": "The user who the collaboration applies to.",
2177
+ "type": "object"
2178
+ },
2179
+ "role": {
2180
+ "description": "The level of access this user has.",
2181
+ "enum": [ "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ]
2182
+ },
2183
+ "acknowledged_at": {
2184
+ "description": "When the 'status' of this collab was changed.",
2185
+ "type": "timestamp"
2186
+ },
2187
+ "item": {
2188
+ "properties": {
2189
+ "type": {
2190
+ "type": "string"
2191
+ },
2192
+ "id": {
2193
+ "type": "string"
2194
+ },
2195
+ "sequence_id": {
2196
+ "type": "string"
2197
+ },
2198
+ "etag": {
2199
+ "type": "string"
2200
+ },
2201
+ "name": {
2202
+ "type": "string"
2203
+ }
2204
+ },
2205
+ "description": "The folder this collaboration is related to",
2206
+ "type": "object"
2207
+ }
2208
+ }
2209
+ }
2210
+ /{collabId}:
2211
+ type: base
2212
+ uriParameters:
2213
+ collabId:
2214
+ description: Box'''s unique string identifying this collaboration.
2215
+ type: string
2216
+ put:
2217
+ description: |
2218
+ Used to edit an existing collaboration. The updated collaboration object
2219
+ is returned. Errors may occur if the IDs are invalid or if the user does
2220
+ not have permissions to edit the collaboration.
2221
+ body:
2222
+ schema: |
2223
+ {
2224
+ "$schema": "http://json-schema.org/draft-03/schema",
2225
+ "type": "object" ,
2226
+ "properties": {
2227
+ "role": {
2228
+ "description": "The access level of this collaboration",
2229
+ "enum": ["editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ]
2230
+ },
2231
+ "status": {
2232
+ "description": "Whether this collaboration has been accepted.",
2233
+ "enum": ["accepted", "pending", "rejected" ]
2234
+ }
2235
+
2236
+ }
2237
+ }
2238
+ responses:
2239
+ 200:
2240
+ body:
2241
+ example: |
2242
+ {
2243
+ "type": "collaboration",
2244
+ "id": "791293",
2245
+ "created_by": {
2246
+ "type": "user",
2247
+ "id": "17738362",
2248
+ "name": "sean rose",
2249
+ "login": "sean@box.com"
2250
+ },
2251
+ "created_at": "2012-12-12T10:54:37-08:00",
2252
+ "modified_at": "2012-12-12T11:30:43-08:00",
2253
+ "expires_at": null,
2254
+ "status": "accepted",
2255
+ "accessible_by": {
2256
+ "type": "user",
2257
+ "id": "18203124",
2258
+ "name": "sean",
2259
+ "login": "sean test@box.com"
2260
+ },
2261
+ "role": "viewer",
2262
+ "acknowledged_at": "2012-12-12T11:30:43-08:00",
2263
+ "item": {
2264
+ "type": "folder",
2265
+ "id": "11446500",
2266
+ "sequence_id": "0",
2267
+ "etag": "0",
2268
+ "name": "Shared Pictures"
2269
+ }
2270
+ }
2271
+ schema: |
2272
+ {
2273
+ "$schema": "http://json-schema.org/draft-03/schema",
2274
+ "type": "object" ,
2275
+ "properties": {
2276
+ "type": {
2277
+ "description": "For collaborations is 'collaboration'",
2278
+ "type": "string"
2279
+ },
2280
+ "id": {
2281
+ "description": "A unique string identifying this collaboration.",
2282
+ "type": "string"
2283
+ },
2284
+ "created_by": {
2285
+ "properties": {
2286
+ "type": {
2287
+ "type": "string"
2288
+ },
2289
+ "id": {
2290
+ "type": "string"
2291
+ },
2292
+ "name": {
2293
+ "type": "string"
2294
+ },
2295
+ "login": {
2296
+ "type": "string"
2297
+ }
2298
+ },
2299
+ "description": "The user who created this collaboration.",
2300
+ "type": "object"
2301
+ },
2302
+ "created_at": {
2303
+ "description": "The time this collaboration was created.",
2304
+ "type": "timestamp"
2305
+ },
2306
+ "modified_at": {
2307
+ "description": "The time this collaboration was last modified.",
2308
+ "type": "timestamp"
2309
+ },
2310
+ "expires_at": {
2311
+ "description": "The time this collaboration will expire.",
2312
+ "type": "timestamp"
2313
+ },
2314
+ "status": {
2315
+ "description": "The status of this collab.",
2316
+ "enum": [ "accepted", "pending", "rejected" ]
2317
+ },
2318
+ "accecible_by": {
2319
+ "properties": {
2320
+ "type": {
2321
+ "type": "string"
2322
+ },
2323
+ "id": {
2324
+ "type": "string"
2325
+ },
2326
+ "name": {
2327
+ "type": "string"
2328
+ },
2329
+ "login": {
2330
+ "type": "string"
2331
+ }
2332
+ },
2333
+ "description": "The user who the collaboration applies to.",
2334
+ "type": "object"
2335
+ },
2336
+ "role": {
2337
+ "description": "The level of access this user has.",
2338
+ "enum": [ "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ]
2339
+ },
2340
+ "acknowledged_at": {
2341
+ "description": "When the 'status' of this collab was changed.",
2342
+ "type": "timestamp"
2343
+ },
2344
+ "item": {
2345
+ "properties": {
2346
+ "type": {
2347
+ "type": "string"
2348
+ },
2349
+ "id": {
2350
+ "type": "string"
2351
+ },
2352
+ "sequence_id": {
2353
+ "type": "string"
2354
+ },
2355
+ "etag": {
2356
+ "type": "string"
2357
+ },
2358
+ "name": {
2359
+ "type": "string"
2360
+ }
2361
+ },
2362
+ "description": "The folder this collaboration is related to",
2363
+ "type": "object"
2364
+ }
2365
+ }
2366
+ }
2367
+ delete:
2368
+ description: |
2369
+ Used to delete a single collaboration. A blank 200 response is returned if
2370
+ the ID is valid, and the user has permissions to remove the collaboration.
2371
+ responses:
2372
+ 200:
2373
+ description: User removed.
2374
+ get:
2375
+ description: |
2376
+ Used to get information about a single collaboration. All collaborations
2377
+ for a single folder can be retrieved through
2378
+ 'GET /folders/{id}/collaborations'.
2379
+ The collaboration object is returned. Errors may occur if the IDs are
2380
+ invalid or if the user does not have permissions to see the collaboration.
2381
+ queryParameters:
2382
+ status:
2383
+ description: Can only be 'pending'.
2384
+ enum: [ "pending" ]
2385
+ responses:
2386
+ 200:
2387
+ body:
2388
+ example: |
2389
+ {
2390
+ "type": "collaboration",
2391
+ "id": "791293",
2392
+ "created_by": {
2393
+ "type": "user",
2394
+ "id": "17738362",
2395
+ "name": "sean rose",
2396
+ "login": "sean@box.com"
2397
+ },
2398
+ "created_at": "2012-12-12T10:54:37-08:00",
2399
+ "modified_at": "2012-12-12T11:30:43-08:00",
2400
+ "expires_at": null,
2401
+ "status": "accepted",
2402
+ "accessible_by": {
2403
+ "type": "user",
2404
+ "id": "18203124",
2405
+ "name": "sean",
2406
+ "login": "sean test@box.com"
2407
+ },
2408
+ "role": "editor",
2409
+ "acknowledged_at": "2012-12-12T11:30:43-08:00",
2410
+ "item": {
2411
+ "type": "folder",
2412
+ "id": "11446500",
2413
+ "sequence_id": "0",
2414
+ "etag": "0",
2415
+ "name": "Shared Pictures"
2416
+ }
2417
+ }
2418
+ schema: |
2419
+ {
2420
+ "$schema": "http://json-schema.org/draft-03/schema",
2421
+ "type": "object" ,
2422
+ "properties": {
2423
+ "type": {
2424
+ "description": "For collaborations is 'collaboration'",
2425
+ "type": "string"
2426
+ },
2427
+ "id": {
2428
+ "description": "A unique string identifying this collaboration.",
2429
+ "type": "string"
2430
+ },
2431
+ "created_by": {
2432
+ "properties": {
2433
+ "type": {
2434
+ "type": "string"
2435
+ },
2436
+ "id": {
2437
+ "type": "string"
2438
+ },
2439
+ "name": {
2440
+ "type": "string"
2441
+ },
2442
+ "login": {
2443
+ "type": "string"
2444
+ }
2445
+ },
2446
+ "description": "The user who created this collaboration.",
2447
+ "type": "object"
2448
+ },
2449
+ "created_at": {
2450
+ "description": "The time this collaboration was created.",
2451
+ "type": "timestamp"
2452
+ },
2453
+ "modified_at": {
2454
+ "description": "The time this collaboration was last modified.",
2455
+ "type": "timestamp"
2456
+ },
2457
+ "expires_at": {
2458
+ "description": "The time this collaboration will expire.",
2459
+ "type": "timestamp"
2460
+ },
2461
+ "status": {
2462
+ "description": "The status of this collab.",
2463
+ "enum": [ "accepted", "pending", "rejected" ]
2464
+ },
2465
+ "accecible_by": {
2466
+ "properties": {
2467
+ "type": {
2468
+ "type": "string"
2469
+ },
2470
+ "id": {
2471
+ "type": "string"
2472
+ },
2473
+ "name": {
2474
+ "type": "string"
2475
+ },
2476
+ "login": {
2477
+ "type": "string"
2478
+ }
2479
+ },
2480
+ "description": "The user who the collaboration applies to.",
2481
+ "type": "object"
2482
+ },
2483
+ "role": {
2484
+ "description": "The level of access this user has.",
2485
+ "enum": [ "editor", "viewer", "previewer", "uploader", "previewer uploader", "viewer uploader", "co-owner" ]
2486
+ },
2487
+ "acknowledged_at": {
2488
+ "description": "When the 'status' of this collab was changed.",
2489
+ "type": "timestamp"
2490
+ },
2491
+ "item": {
2492
+ "properties": {
2493
+ "type": {
2494
+ "type": "string"
2495
+ },
2496
+ "id": {
2497
+ "type": "string"
2498
+ },
2499
+ "sequence_id": {
2500
+ "type": "string"
2501
+ },
2502
+ "etag": {
2503
+ "type": "string"
2504
+ },
2505
+ "name": {
2506
+ "type": "string"
2507
+ }
2508
+ },
2509
+ "description": "The folder this collaboration is related to",
2510
+ "type": "object"
2511
+ }
2512
+ }
2513
+ }
2514
+ /search:
2515
+ type: base
2516
+ get:
2517
+ description: |
2518
+ Searching a User'''s Account. The search endpoint provides a simple way of
2519
+ finding items that are accessible in a given user'''s Box account.
2520
+ A collection of search results is returned. If there are no matching search
2521
+ results, the entries array will be empty.
2522
+ queryParameters:
2523
+ query:
2524
+ description: |
2525
+ The string to search for; can be matched against item names, descriptions,
2526
+ text content of a file, and other fields of the different item types.
2527
+ required: true
2528
+ enum:
2529
+ - '0'
2530
+ - '1'
2531
+ - 'true'
2532
+ - 'false'
2533
+ - 't'
2534
+ - 'f'
2535
+ type: string
2536
+ limit:
2537
+ description: Number of search results to return
2538
+ type: integer
2539
+ default: 30
2540
+ maximum: 200
2541
+ offset:
2542
+ description: The search result at which to start the response.
2543
+ type: integer
2544
+ default: 0
2545
+ responses:
2546
+ 200:
2547
+ body:
2548
+ example: |
2549
+ {
2550
+ "total_count": 4,
2551
+ "entries": [
2552
+ {
2553
+ "type": "file",
2554
+ "id": "1874102965",
2555
+ "sequence_id": "0",
2556
+ "etag": "0",
2557
+ "sha1": "63a112a4567fb556f5269735102a2f24f2cbea56",
2558
+ "name": "football.jpg",
2559
+ "description": "",
2560
+ "size": 260271,
2561
+ "path_collection": {
2562
+ "total_count": 1,
2563
+ "entries": [
2564
+ {
2565
+ "type": "folder",
2566
+ "id": "0",
2567
+ "sequence_id": null,
2568
+ "etag": null,
2569
+ "name": "All Files"
2570
+ }
2571
+ ]
2572
+ },
2573
+ "created_at": "2012-03-22T18:25:07-07:00",
2574
+ "modified_at": "2012-10-25T14:40:05-07:00",
2575
+ "created_by": {
2576
+ "type": "user",
2577
+ "id": "175065494",
2578
+ "name": "Andrew Luck",
2579
+ "login": "aluck@colts.com"
2580
+ },
2581
+ "modified_by": {
2582
+ "type": "user",
2583
+ "id": "175065494",
2584
+ "name": "Andrew Luck",
2585
+ "login": "aluck@colts.com"
2586
+ },
2587
+ "owned_by": {
2588
+ "type": "user",
2589
+ "id": "175065494",
2590
+ "name": "Andrew Luck",
2591
+ "login": "aluck@colts.com"
2592
+ },
2593
+ "shared_link": null,
2594
+ "parent": {
2595
+ "type": "folder",
2596
+ "id": "0",
2597
+ "sequence_id": null,
2598
+ "etag": null,
2599
+ "name": "All Files"
2600
+ },
2601
+ "item_status": "active"
2602
+ }
2603
+ ],
2604
+ "offset": 0,
2605
+ "limit": 1
2606
+ }
2607
+ /events:
2608
+ type: base
2609
+ get:
2610
+ description: |
2611
+ Use this to get events for a given user. A chunk of event objects is
2612
+ returned for the user based on the parameters passed in. Parameters
2613
+ indicating how many chunks are left as well as the next stream_position
2614
+ are also returned.
2615
+ queryParameters:
2616
+ stream_position:
2617
+ description: |
2618
+ The location in the event stream at which you want to start receiving
2619
+ events. Can specify special case `now` to get 0 events and the latest
2620
+ stream position for initialization. A collection of events is returned.
2621
+ type: string
2622
+ default: '0'
2623
+ stream_type:
2624
+ description: Limits the type of events returned
2625
+ enum: [ "all", "chages", "sync" ]
2626
+ default: all
2627
+ limit:
2628
+ description: Limits the number of events returned
2629
+ type: integer
2630
+ default: 100
2631
+ responses:
2632
+ 200:
2633
+ body:
2634
+ example: |
2635
+ {
2636
+ "chunk_size": 1,
2637
+ "next_stream_position": 1348790499819,
2638
+ "entries": [
2639
+ {
2640
+ "type": "event",
2641
+ "event_id": "f82c3ba03e41f7e8a7608363cc6c0390183c3f83",
2642
+ "created_by": {
2643
+ "type": "user",
2644
+ "id": "17738362",
2645
+ "name": "sean rose",
2646
+ "login": "sean@box.com"
2647
+ },
2648
+ "created_at": "2012-12-12T10:53:43-08:00",
2649
+ "recorded_at": "2012-12-12T10:53:48-08:00",
2650
+ "event_type": "ITEM_CREATE",
2651
+ "session_id": "70090280850c8d2a1933c1",
2652
+ "source": {
2653
+ "type": "folder",
2654
+ "id": "11446498",
2655
+ "sequence_id": "0",
2656
+ "etag": "0",
2657
+ "name": "Pictures",
2658
+ "created_at": "2012-12-12T10:53:43-08:00",
2659
+ "modified_at": "2012-12-12T10:53:43-08:00",
2660
+ "description": null,
2661
+ "size": 0,
2662
+ "created_by": {
2663
+ "type": "user",
2664
+ "id": "17738362",
2665
+ "name": "sean rose",
2666
+ "login": "sean@box.com"
2667
+ },
2668
+ "modified_by": {
2669
+ "type": "user",
2670
+ "id": "17738362",
2671
+ "name": "sean rose",
2672
+ "login": "sean@box.com"
2673
+ },
2674
+ "owned_by": {
2675
+ "type": "user",
2676
+ "id": "17738362",
2677
+ "name": "sean rose",
2678
+ "login": "sean@box.com"
2679
+ },
2680
+ "shared_link": null,
2681
+ "parent": {
2682
+ "type": "folder",
2683
+ "id": "0",
2684
+ "sequence_id": null,
2685
+ "etag": null,
2686
+ "name": "All Files"
2687
+ },
2688
+ "item_status": "active",
2689
+ "synced": false
2690
+ }
2691
+ }
2692
+ ]
2693
+ }
2694
+ options:
2695
+ description: |
2696
+ Long polling. To get real-time notification of activity in a Box account,
2697
+ use the long poll feature of the /events API. To do so, first call the
2698
+ /events API with an OPTIONS call to retrieve the long poll URL to use. Next,
2699
+ make a GET request to the provided URL to begin listening for events. If an
2700
+ event occurs within an account you are monitoring, you will receive a
2701
+ response with the value new_change. It's important to note that this response
2702
+ will not come with any other details, but should serve as a prompt to take
2703
+ further action such as calling the /events endpoint with your last known
2704
+ stream_position. After sending this response, the server will close the
2705
+ connection and you will need to repeat the long poll process to begin
2706
+ listening for events again.
2707
+ If no events occur for a period of time after you make the GET request to
2708
+ the long poll URL, you will receive a response with the value reconnect. When
2709
+ you receive this response, you'll make another OPTIONS call to the /events
2710
+ endpoint and repeat the long poll process.
2711
+ responses:
2712
+ 200:
2713
+ body:
2714
+ example: |
2715
+ {
2716
+ "chunk_size":1,
2717
+ "entries":[
2718
+ {
2719
+ "type":"realtime_server",
2720
+ "url":"http:\/\/2.realtime.services.box.net\/subscribe?channel=cc807c9c4869ffb1c81a&stream_type=all",
2721
+ "ttl":"10",
2722
+ "max_retries":"10",
2723
+ "retry_timeout":610
2724
+ }
2725
+ ]
2726
+ }
2727
+ /users:
2728
+ type: base
2729
+ get:
2730
+ description: |
2731
+ Get All Users in an Enterprise. Returns a list of all users for the
2732
+ Enterprise along with their user_id, public_name, and login.
2733
+ queryParameters:
2734
+ filter_term:
2735
+ description: |
2736
+ A string used to filter the results to only users starting with the
2737
+ filter_term in either the name or the login
2738
+ type: string
2739
+ limit:
2740
+ description: The number of records to return.
2741
+ type: integer
2742
+ default: 100
2743
+ maximum: 1000
2744
+ offset:
2745
+ description: The record at which to start
2746
+ type: integer
2747
+ default: 0
2748
+ responses:
2749
+ 200:
2750
+ body:
2751
+ example: |
2752
+ {
2753
+ "total_count": 1,
2754
+ "entries": [
2755
+ {
2756
+ "type": "user",
2757
+ "id": "181216415",
2758
+ "name": "sean rose",
2759
+ "login": "sean awesome@box.com",
2760
+ "created_at": "2012-05-03T21:39:11-07:00",
2761
+ "modified_at": "2012-08-23T14:57:48-07:00",
2762
+ "role": "user",
2763
+ "language": "en",
2764
+ "space_amount": 5368709120,
2765
+ "space_used": 52947,
2766
+ "max_upload_size": 104857600,
2767
+ "tracking_codes": [],
2768
+ "see_managed_users": false,
2769
+ "sync_enabled": true,
2770
+ "status": "active",
2771
+ "job_title": "",
2772
+ "phone": "5555551374",
2773
+ "address": "10 Cloud Way Los Altos CA",
2774
+ "avatar_url": "https://api.box.com/api/avatar/large/181216415"
2775
+ }
2776
+ ]
2777
+ }
2778
+ post:
2779
+ description: |
2780
+ Used to provision a new user in an enterprise. This method only works
2781
+ for enterprise admins.
2782
+ responses:
2783
+ 201:
2784
+ body:
2785
+ example: |
2786
+ {
2787
+ "type": "user",
2788
+ "id": "187273718",
2789
+ "name": "Ned Stark",
2790
+ "login": "eddard@box.com",
2791
+ "created_at": "2012-11-15T16:34:28-08:00",
2792
+ "modified_at": "2012-11-15T16:34:29-08:00",
2793
+ "role": "user",
2794
+ "language": "en",
2795
+ "space_amount": 5368709120,
2796
+ "space_used": 0,
2797
+ "max_upload_size": 2147483648,
2798
+ "tracking_codes": [],
2799
+ "can_see_managed_users": true,
2800
+ "is_sync_enabled": true,
2801
+ "status": "active",
2802
+ "job_title": "",
2803
+ "phone": "555-555-5555",
2804
+ "address": "555 Box Lane",
2805
+ "avatar_url": "https://www.box.com/api/avatar/large/187273718",
2806
+ "is_exempt_from_device_limits": false,
2807
+ "is_exempt_from_login_verification": false
2808
+ }
2809
+ schema: |
2810
+ {
2811
+ "$schema": "http://json-schema.org/draft-03/schema",
2812
+ "type": "object" ,
2813
+ "properties": {
2814
+ "type": {
2815
+ "description": "For users is 'user'.",
2816
+ "type": "string"
2817
+ },
2818
+ "id": {
2819
+ "description": "A unique string identifying this user.",
2820
+ "type": "string"
2821
+ },
2822
+ "name": {
2823
+ "description": "The name of this user.",
2824
+ "type": "string"
2825
+ },
2826
+ "login": {
2827
+ "description": "The email address this user uses to login.",
2828
+ "type": "string"
2829
+ },
2830
+ "created_at": {
2831
+ "description": "The time this user was created.",
2832
+ "type": "timestamp"
2833
+ },
2834
+ "modified_at": {
2835
+ "description": "The time this user was last modified.",
2836
+ "type": "timestamp"
2837
+ },
2838
+ "role": {
2839
+ "description": "This user'''s enterprise role.",
2840
+ "enum": [ "admin", "coadmin", "user" ]
2841
+ },
2842
+ "language": {
2843
+ "description": "The language of this user. ISO 639-1 Language Code.",
2844
+ "type": "string"
2845
+ },
2846
+ "space_amount": {
2847
+ "description": "The user'''s total available space amount in bytes.",
2848
+ "type": "integer"
2849
+ },
2850
+ "space_used": {
2851
+ "description": "The amount of space in use by the user.",
2852
+ "type": "integer"
2853
+ },
2854
+ "max_upload_size": {
2855
+ "description": "The maximum individual file size in bytes this user can have.",
2856
+ "type": "integer"
2857
+ },
2858
+ "tracking_codes": {
2859
+ "description": "An array of key/value pairs set by the user'''s admin.",
2860
+ "type": "array"
2861
+ },
2862
+ "can_see_managed_users": {
2863
+ "description": "Whether this user can see other enterprise users in its contact list.",
2864
+ "type": "boolean"
2865
+ },
2866
+ "is_sync_enabled": {
2867
+ "description": "Whether or not this user can use Box Sync",
2868
+ "type": "boolean"
2869
+ },
2870
+ "status": {
2871
+ "description": "Can be active or inactive.",
2872
+ "enum": [ "actibe", "inactive" ]
2873
+ },
2874
+ "job_title": {
2875
+ "description": "The user'''s job title.",
2876
+ "type": "string"
2877
+ },
2878
+ "phone": {
2879
+ "description": "The user'''s phone number.",
2880
+ "type": "string"
2881
+ },
2882
+ "address": {
2883
+ "description": "The user'''s address.",
2884
+ "type": "string"
2885
+ },
2886
+ "avatar_url": {
2887
+ "description": "URL of this user'''s avatar image.",
2888
+ "type": "string"
2889
+ },
2890
+ "is_exempt_from_device_limits": {
2891
+ "description": "Whether to exempt this user from Enterprise device limits.",
2892
+ "type": "boolean"
2893
+ },
2894
+ "is_exempt_from_login_verification": {
2895
+ "description": "Whether or not this user must use two-factor authentication.",
2896
+ "type": "boolean"
2897
+ },
2898
+ "enterprise": {
2899
+ "properties": {
2900
+ "type": {
2901
+ "type": "string"
2902
+ },
2903
+ "id": {
2904
+ "type": "string"
2905
+ },
2906
+ "name": {
2907
+ "type": "string"
2908
+ }
2909
+ },
2910
+ "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise",
2911
+ "type": "object"
2912
+ }
2913
+ }
2914
+ }
2915
+ /me:
2916
+ type: base
2917
+ get:
2918
+ description: |
2919
+ Get the Current User'''s Information. Retrieves information about the user who
2920
+ is currently logged in i.e. the user for whom this auth token was generated.
2921
+ Returns a single complete user object. An error is returned if a valid auth
2922
+ token is not included in the API request.
2923
+ responses:
2924
+ 200:
2925
+ body:
2926
+ example: |
2927
+ {
2928
+ "type": "user",
2929
+ "id": "17738362",
2930
+ "name": "sean rose",
2931
+ "login": "sean@box.com",
2932
+ "created_at": "2012-03-26T15:43:07-07:00",
2933
+ "modified_at": "2012-12-12T11:34:29-08:00",
2934
+ "language": "en",
2935
+ "space_amount": 5368709120,
2936
+ "space_used": 2377016,
2937
+ "max_upload_size": 262144000,
2938
+ "status": "active",
2939
+ "job_title": "Employee",
2940
+ "phone": "5555555555",
2941
+ "address": "555 Office Drive",
2942
+ "avatar_url": "https://www.box.com/api/avatar/large/17738362"
2943
+ }
2944
+ schema: |
2945
+ {
2946
+ "$schema": "http://json-schema.org/draft-03/schema",
2947
+ "type": "object" ,
2948
+ "properties": {
2949
+ "type": {
2950
+ "description": "For users is 'user'.",
2951
+ "type": "string"
2952
+ },
2953
+ "id": {
2954
+ "description": "A unique string identifying this user.",
2955
+ "type": "string"
2956
+ },
2957
+ "name": {
2958
+ "description": "The name of this user.",
2959
+ "type": "string"
2960
+ },
2961
+ "login": {
2962
+ "description": "The email address this user uses to login.",
2963
+ "type": "string"
2964
+ },
2965
+ "created_at": {
2966
+ "description": "The time this user was created.",
2967
+ "type": "timestamp"
2968
+ },
2969
+ "modified_at": {
2970
+ "description": "The time this user was last modified.",
2971
+ "type": "timestamp"
2972
+ },
2973
+ "role": {
2974
+ "description": "This user'''s enterprise role.",
2975
+ "enum": [ "admin", "coadmin", "user" ]
2976
+ },
2977
+ "language": {
2978
+ "description": "The language of this user. ISO 639-1 Language Code.",
2979
+ "type": "string"
2980
+ },
2981
+ "space_amount": {
2982
+ "description": "The user'''s total available space amount in bytes.",
2983
+ "type": "integer"
2984
+ },
2985
+ "space_used": {
2986
+ "description": "The amount of space in use by the user.",
2987
+ "type": "integer"
2988
+ },
2989
+ "max_upload_size": {
2990
+ "description": "The maximum individual file size in bytes this user can have.",
2991
+ "type": "integer"
2992
+ },
2993
+ "tracking_codes": {
2994
+ "description": "An array of key/value pairs set by the user'''s admin.",
2995
+ "type": "array"
2996
+ },
2997
+ "can_see_managed_users": {
2998
+ "description": "Whether this user can see other enterprise users in its contact list.",
2999
+ "type": "boolean"
3000
+ },
3001
+ "is_sync_enabled": {
3002
+ "description": "Whether or not this user can use Box Sync",
3003
+ "type": "boolean"
3004
+ },
3005
+ "status": {
3006
+ "description": "Can be active or inactive.",
3007
+ "enum": [ "actibe", "inactive" ]
3008
+ },
3009
+ "job_title": {
3010
+ "description": "The user'''s job title.",
3011
+ "type": "string"
3012
+ },
3013
+ "phone": {
3014
+ "description": "The user'''s phone number.",
3015
+ "type": "string"
3016
+ },
3017
+ "address": {
3018
+ "description": "The user'''s address.",
3019
+ "type": "string"
3020
+ },
3021
+ "avatar_url": {
3022
+ "description": "URL of this user'''s avatar image.",
3023
+ "type": "string"
3024
+ },
3025
+ "is_exempt_from_device_limits": {
3026
+ "description": "Whether to exempt this user from Enterprise device limits.",
3027
+ "type": "boolean"
3028
+ },
3029
+ "is_exempt_from_login_verification": {
3030
+ "description": "Whether or not this user must use two-factor authentication.",
3031
+ "type": "boolean"
3032
+ },
3033
+ "enterprise": {
3034
+ "properties": {
3035
+ "type": {
3036
+ "type": "string"
3037
+ },
3038
+ "id": {
3039
+ "type": "string"
3040
+ },
3041
+ "name": {
3042
+ "type": "string"
3043
+ }
3044
+ },
3045
+ "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise",
3046
+ "type": "object"
3047
+ }
3048
+ }
3049
+ }
3050
+ /{userId}:
3051
+ type: base
3052
+ uriParameters:
3053
+ userId:
3054
+ description: Box'''s unique string identifying this user.
3055
+ type: string
3056
+ put:
3057
+ description: |
3058
+ Update a User'''s Information. Used to edit the settings and information about
3059
+ a user. This method only works for enterprise admins. To roll a user out of
3060
+ the enterprise (and convert them to a standalone free user), update the
3061
+ special 'enterprise' attribute to be 'null'.
3062
+ Returns the a full user object for the updated user. Errors may be thrown when
3063
+ the fields are invalid or this API call is made from a non-admin account.
3064
+ queryParameters:
3065
+ notify:
3066
+ description: |
3067
+ Whether the user should receive an email when they are rolled out of an
3068
+ enterprise
3069
+ type: string
3070
+ body:
3071
+ schema: |
3072
+ {
3073
+ "$schema": "http://json-schema.org/draft-03/schema",
3074
+ "type": "object" ,
3075
+ "properties": {
3076
+ "enterprise": {
3077
+ "description": "Setting this to 'null' will roll the user out of the enterprise and make them a free user.",
3078
+ "type": "string"
3079
+ },
3080
+ "name": {
3081
+ "description": "The name of this user.",
3082
+ "type": "string"
3083
+ },
3084
+ "role": {
3085
+ "description": "This user'''s enterprise role. Can be 'coadmin' or 'user'.",
3086
+ "type": [ "coadmin", "user" ]
3087
+ },
3088
+ "language": {
3089
+ "description": "The language of this user. ISO 639-1 Language Code.",
3090
+ "type": "string",
3091
+ "maxLength": 2
3092
+ },
3093
+ "is_sync_enabled": {
3094
+ "description": "Whether or not this user can use Box Sync.",
3095
+ "type": "boolean"
3096
+ },
3097
+ "job_title": {
3098
+ "description": "The user'''s job title.",
3099
+ "type": "string"
3100
+ },
3101
+ "phone": {
3102
+ "description": "The user'''s phone number.",
3103
+ "type": "string"
3104
+ },
3105
+ "address": {
3106
+ "description": "The user'''s address.",
3107
+ "type": "string"
3108
+ },
3109
+ "space_amount": {
3110
+ "description": "The user'''s total available space amount in byte. A value of '-1' grants unlimited storage.",
3111
+ "type": "number"
3112
+ },
3113
+ "tracking_codes": {
3114
+ "description": "An array of key/value pairs set by the user'''s admin.",
3115
+ "type": "array"
3116
+ },
3117
+ "can_see_managed_users": {
3118
+ "description": "Whether this user can see other enterprise users in its contact list.",
3119
+ "type": "boolean"
3120
+ },
3121
+ "status": {
3122
+ "description": "Can be 'active' or 'inactive'.",
3123
+ "type": [ "active", "inactive" ]
3124
+ },
3125
+ "is_exempt_from_device_limits": {
3126
+ "description": "Whether to exempt this user from Enterprise device limits.",
3127
+ "type": "boolean"
3128
+ },
3129
+ "is_exempt_from_login_verification": {
3130
+ "description": "Whether or not this user must use two-factor authentication.",
3131
+ "type": "boolean"
3132
+ },
3133
+ "is_password_reset_required": {
3134
+ "description": "Whether or not the user is required to reset password.",
3135
+ "type": "boolean"
3136
+ }
3137
+ }
3138
+ }
3139
+ responses:
3140
+ 200:
3141
+ body:
3142
+ example: |
3143
+ {
3144
+ "type": "user",
3145
+ "id": "181216415",
3146
+ "name": "sean",
3147
+ "login": "sean awesome@box.com",
3148
+ "created_at": "2012-05-03T21:39:11-07:00",
3149
+ "modified_at": "2012-12-06T18:17:16-08:00",
3150
+ "role": "admin",
3151
+ "language": "en",
3152
+ "space_amount": 5368709120,
3153
+ "space_used": 1237179286,
3154
+ "max_upload_size": 2147483648,
3155
+ "tracking_codes": [],
3156
+ "can_see_managed_users": true,
3157
+ "is_sync_enabled": true,
3158
+ "status": "active",
3159
+ "job_title": "",
3160
+ "phone": "6509241374",
3161
+ "address": "",
3162
+ "avatar_url": "https://www.box.com/api/avatar/large/181216415",
3163
+ "is_exempt_from_device_limits": false,
3164
+ "is_exempt_from_login_verification": false
3165
+ }
3166
+ schema: |
3167
+ {
3168
+ "$schema": "http://json-schema.org/draft-03/schema",
3169
+ "type": "object" ,
3170
+ "properties": {
3171
+ "type": {
3172
+ "description": "For users is 'user'.",
3173
+ "type": "string"
3174
+ },
3175
+ "id": {
3176
+ "description": "A unique string identifying this user.",
3177
+ "type": "string"
3178
+ },
3179
+ "name": {
3180
+ "description": "The name of this user.",
3181
+ "type": "string"
3182
+ },
3183
+ "login": {
3184
+ "description": "The email address this user uses to login.",
3185
+ "type": "string"
3186
+ },
3187
+ "created_at": {
3188
+ "description": "The time this user was created.",
3189
+ "type": "timestamp"
3190
+ },
3191
+ "modified_at": {
3192
+ "description": "The time this user was last modified.",
3193
+ "type": "timestamp"
3194
+ },
3195
+ "role": {
3196
+ "description": "This user'''s enterprise role.",
3197
+ "enum": [ "admin", "coadmin", "user" ]
3198
+ },
3199
+ "language": {
3200
+ "description": "The language of this user. ISO 639-1 Language Code.",
3201
+ "type": "string"
3202
+ },
3203
+ "space_amount": {
3204
+ "description": "The user'''s total available space amount in bytes.",
3205
+ "type": "integer"
3206
+ },
3207
+ "space_used": {
3208
+ "description": "The amount of space in use by the user.",
3209
+ "type": "integer"
3210
+ },
3211
+ "max_upload_size": {
3212
+ "description": "The maximum individual file size in bytes this user can have.",
3213
+ "type": "integer"
3214
+ },
3215
+ "tracking_codes": {
3216
+ "description": "An array of key/value pairs set by the user'''s admin.",
3217
+ "type": "array"
3218
+ },
3219
+ "can_see_managed_users": {
3220
+ "description": "Whether this user can see other enterprise users in its contact list.",
3221
+ "type": "boolean"
3222
+ },
3223
+ "is_sync_enabled": {
3224
+ "description": "Whether or not this user can use Box Sync",
3225
+ "type": "boolean"
3226
+ },
3227
+ "status": {
3228
+ "description": "Can be active or inactive.",
3229
+ "enum": [ "actibe", "inactive" ]
3230
+ },
3231
+ "job_title": {
3232
+ "description": "The user'''s job title.",
3233
+ "type": "string"
3234
+ },
3235
+ "phone": {
3236
+ "description": "The user'''s phone number.",
3237
+ "type": "string"
3238
+ },
3239
+ "address": {
3240
+ "description": "The user'''s address.",
3241
+ "type": "string"
3242
+ },
3243
+ "avatar_url": {
3244
+ "description": "URL of this user'''s avatar image.",
3245
+ "type": "string"
3246
+ },
3247
+ "is_exempt_from_device_limits": {
3248
+ "description": "Whether to exempt this user from Enterprise device limits.",
3249
+ "type": "boolean"
3250
+ },
3251
+ "is_exempt_from_login_verification": {
3252
+ "description": "Whether or not this user must use two-factor authentication.",
3253
+ "type": "boolean"
3254
+ },
3255
+ "enterprise": {
3256
+ "properties": {
3257
+ "type": {
3258
+ "type": "string"
3259
+ },
3260
+ "id": {
3261
+ "type": "string"
3262
+ },
3263
+ "name": {
3264
+ "type": "string"
3265
+ }
3266
+ },
3267
+ "description": "Mini representation of this user'''s enterprise, including the ID of its enterprise",
3268
+ "type": "object"
3269
+ }
3270
+ }
3271
+ }
3272
+ delete:
3273
+ description: |
3274
+ Deletes a user in an enterprise account. An empty 200 response is sent to
3275
+ confirm deletion of the user. If the user still has files in their account
3276
+ and the ???force''' parameter is not sent, an error is returned.
3277
+ queryParameters:
3278
+ notify:
3279
+ description: |
3280
+ Determines if the destination user should receive email notification of
3281
+ the transfer.
3282
+ type: string
3283
+ force:
3284
+ description: |
3285
+ Whether or not the user should be deleted even if this user still own files.
3286
+ type: string
3287
+ responses:
3288
+ 200:
3289
+ description: Confirm deletion of the user.
3290
+ /folders/{folderId}:
3291
+ type: base
3292
+ uriParameters:
3293
+ folderId:
3294
+ type: string
3295
+ put:
3296
+ description: |
3297
+ Move Folder into Another User'''s Folder.
3298
+ Moves all of the content from within one user'''s folder into a new folder in
3299
+ another user'''s account. You can move folders across users as long as the you
3300
+ have administrative permissions. To move everything from the root folder,
3301
+ use "0" which always represents the root folder of a Box account.
3302
+ Returns the information for the newly created destination folder. An error
3303
+ is thrown if you do not have the necessary permissions to move the folder.
3304
+ Alert: folder_id: Currently only moving of the root folder (0) is supported.
3305
+ queryParameters:
3306
+ notify:
3307
+ description: |
3308
+ Determines if the destination user should receive email notification of
3309
+ the transfer.
3310
+ type: string
3311
+ body:
3312
+ schema: |
3313
+ {
3314
+ "$schema": "http://json-schema.org/draft-03/schema",
3315
+ "type": "object" ,
3316
+ "properties": {
3317
+ "owned_by": {
3318
+ "description": "The user who the folder will be transferred to.",
3319
+ "type": "string",
3320
+ "required": true
3321
+ },
3322
+ "id": {
3323
+ "description": "The ID of the user who the folder will be transferred to.",
3324
+ "type": "string",
3325
+ "required": true
3326
+ }
3327
+ }
3328
+ }
3329
+ responses:
3330
+ 200:
3331
+ body:
3332
+ example: |
3333
+ {
3334
+ "type": "folder",
3335
+ "id": "11446498",
3336
+ "sequence_id": "1",
3337
+ "etag": "1",
3338
+ "name": "Pictures",
3339
+ "created_at": "2012-12-12T10:53:43-08:00",
3340
+ "modified_at": "2012-12-12T11:15:04-08:00",
3341
+ "description": "Some pictures I took",
3342
+ "size": 629644,
3343
+ "path_collection": {
3344
+ "total_count": 1,
3345
+ "entries": [
3346
+ {
3347
+ "type": "folder",
3348
+ "id": "0",
3349
+ "sequence_id": null,
3350
+ "etag": null,
3351
+ "name": "All Files"
3352
+ }
3353
+ ]
3354
+ },
3355
+ "created_by": {
3356
+ "type": "user",
3357
+ "id": "17738362",
3358
+ "name": "sean rose",
3359
+ "login": "sean@box.com"
3360
+ },
3361
+ "modified_by": {
3362
+ "type": "user",
3363
+ "id": "17738362",
3364
+ "name": "sean rose",
3365
+ "login": "sean@box.com"
3366
+ },
3367
+ "owned_by": {
3368
+ "type": "user",
3369
+ "id": "17738362",
3370
+ "name": "sean rose",
3371
+ "login": "sean@box.com"
3372
+ },
3373
+ "shared_link": {
3374
+ "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
3375
+ "download_url": "https://www.box.com/shared/static/vspke7y05sb214wjokpk",
3376
+ "vanity_url": null,
3377
+ "is_password_enabled": false,
3378
+ "unshared_at": null,
3379
+ "download_count": 0,
3380
+ "preview_count": 0,
3381
+ "access": "open",
3382
+ "permissions": {
3383
+ "can_download": true,
3384
+ "can_preview": true
3385
+ }
3386
+ },
3387
+ "folder_upload_email": {
3388
+ "access": "open",
3389
+ "email": "upload.Picture.k13sdz1@u.box.com"
3390
+ },
3391
+ "parent": {
3392
+ "type": "folder",
3393
+ "id": "0",
3394
+ "sequence_id": null,
3395
+ "etag": null,
3396
+ "name": "All Files"
3397
+ },
3398
+ "item_status": "active",
3399
+ "item_collection": {
3400
+ "total_count": 1,
3401
+ "entries": [
3402
+ {
3403
+ "type": "file",
3404
+ "id": "5000948880",
3405
+ "sequence_id": "3",
3406
+ "etag": "3",
3407
+ "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc",
3408
+ "name": "tigers.jpeg"
3409
+ }
3410
+ ],
3411
+ "offset": 0,
3412
+ "limit": 100
3413
+ }
3414
+ }
3415
+ /email_aliases:
3416
+ type: base
3417
+ get:
3418
+ description: |
3419
+ Get All Email Aliases for a User.
3420
+ Retrieves all email aliases for this user. The collection of email aliases
3421
+ does not include the primary login for the user; use GET /users/USER_ID to
3422
+ retrieve the login email address.
3423
+ If the user_id is valid a collection of email aliases will be returned.
3424
+ responses:
3425
+ 200:
3426
+ body:
3427
+ example: |
3428
+ {
3429
+ "total_count": 1,
3430
+ "entries": [
3431
+ {
3432
+ "type": "email_alias",
3433
+ "id": "1234",
3434
+ "is_confirmed": true,
3435
+ "email": "dglover2@box.com"
3436
+ },
3437
+ {
3438
+ "type": "email_alias",
3439
+ "id": "1235",
3440
+ "is_confirmed": true,
3441
+ "email": "dglover3@box.com"
3442
+ }
3443
+ ]
3444
+ }
3445
+ post:
3446
+ description: |
3447
+ Add an Email Alias for a User.
3448
+ Adds a new email alias to the given user'''s account.
3449
+ Returns the newly created email_alias object. Errors will be thrown if the
3450
+ user_id is not valid or the particular user'''s email alias cannot be modified.
3451
+ body:
3452
+ schema: |
3453
+ {
3454
+ "$schema": "http://json-schema.org/draft-03/schema",
3455
+ "type": "object" ,
3456
+ "properties": {
3457
+ "email": {
3458
+ "description": "The email address to add to the account as an alias.",
3459
+ "type": "string",
3460
+ "required": true
3461
+ }
3462
+ }
3463
+ }
3464
+ responses:
3465
+ 201:
3466
+ body:
3467
+ example: |
3468
+ {
3469
+ "type":"email_alias",
3470
+ "id":"1234",
3471
+ "is_confirmed":true,
3472
+ "email": "dglover2@box.com"
3473
+ }
3474
+ schema: |
3475
+ {
3476
+ "$schema": "http://json-schema.org/draft-03/schema",
3477
+ "type": "object" ,
3478
+ "properties": {
3479
+ "type": {
3480
+ "type": "string"
3481
+ },
3482
+ "id": {
3483
+ "type": "string"
3484
+ },
3485
+ "is_confirmed": {
3486
+ "type": "boolean"
3487
+ },
3488
+ "email": {
3489
+ "type": "string"
3490
+ }
3491
+ }
3492
+ }
3493
+ /{emailAliasId}:
3494
+ type: base
3495
+ delete:
3496
+ description: |
3497
+ Removes an email alias from a user. If the user has permission to remove
3498
+ this email alias, an empty 204 No Content response will be returned to
3499
+ confirm deletion.
3500
+ responses:
3501
+ 204:
3502
+ description: Email alias removed.
3503
+ /tasks:
3504
+ type: base
3505
+ post:
3506
+ description: |
3507
+ Create a Task. Used to create a single task for single user on a single file.
3508
+ A new task object will be returned upon success.
3509
+ body:
3510
+ schema: |
3511
+ {
3512
+ "$schema": "http://json-schema.org/draft-03/schema",
3513
+ "type": "object" ,
3514
+ "properties": {
3515
+ "item": {
3516
+ "description": "The item this task is for.",
3517
+ "type": "object",
3518
+ "required": true
3519
+ },
3520
+ "type": {
3521
+ "description": "The type of the item this task is for (currently only 'file' is supported).",
3522
+ "type": "string",
3523
+ "required": true
3524
+ },
3525
+ "id": {
3526
+ "description": "The ID of the item this task is for.",
3527
+ "type": "string",
3528
+ "required": true
3529
+ },
3530
+ "action": {
3531
+ "description": "The action the task assignee will be prompted to do. Must be 'review'.",
3532
+ "type": [ "review" ],
3533
+ "required": true
3534
+ },
3535
+ "message": {
3536
+ "description": "An optional message to include with the task.",
3537
+ "type": "string"
3538
+ },
3539
+ "due_at": {
3540
+ "description": "The day at which this task is due.",
3541
+ "type": "timestamp"
3542
+ }
3543
+ }
3544
+ }
3545
+ responses:
3546
+ 200:
3547
+ body:
3548
+ example: |
3549
+ {
3550
+ "type": "task",
3551
+ "id": "1839355",
3552
+ "item": {
3553
+ "type": "file",
3554
+ "id": "7287087200",
3555
+ "sequence_id": "0",
3556
+ "etag": "0",
3557
+ "sha1": "0bbd79a105c504f99573e3799756debba4c760cd",
3558
+ "name": "box-logo.png"
3559
+ },
3560
+ "due_at": "2014-04-03T11:09:43-07:00",
3561
+ "action": "review",
3562
+ "message": "REVIEW PLZ K THX",
3563
+ "task_assignment_collection": {
3564
+ "total_count": 0,
3565
+ "entries": []
3566
+ },
3567
+ "is_completed": false,
3568
+ "created_by": {
3569
+ "type": "user",
3570
+ "id": "11993747",
3571
+ "name": "??? sean ???",
3572
+ "login": "sean@box.com"
3573
+ },
3574
+ "created_at": "2013-04-03T11:12:54-07:00"
3575
+ }
3576
+ schema: |
3577
+ {
3578
+ "$schema": "http://json-schema.org/draft-03/schema",
3579
+ "type": "object",
3580
+ "properties": {
3581
+ "type": {
3582
+ "descriptipon": "For tasks is 'task'.",
3583
+ "type": "string"
3584
+ },
3585
+ "id": {
3586
+ "descriptipon": "The unique ID of this task.",
3587
+ "type": "string"
3588
+ },
3589
+ "item": {
3590
+ "properties": {
3591
+ "type": {
3592
+ "type": "string"
3593
+ },
3594
+ "id": {
3595
+ "type": "string"
3596
+ },
3597
+ "sequence_id": {
3598
+ "type": "string"
3599
+ },
3600
+ "etag": {
3601
+ "type": "string"
3602
+ },
3603
+ "sha1": {
3604
+ "type": "string"
3605
+ },
3606
+ "name": {
3607
+ "type": "string"
3608
+ }
3609
+ },
3610
+ "descriptipon": "The file associated with this task.",
3611
+ "type": "object"
3612
+ },
3613
+ "due_at": {
3614
+ "descriptipon": "The date at which this task is due.",
3615
+ "type": "timestamp"
3616
+ },
3617
+ "action": {
3618
+ "descriptipon": "The action the task assignee will be prompted to do. Must be 'review'",
3619
+ "type": "string"
3620
+ },
3621
+ "message": {
3622
+ "descriptipon": "A message that will be included with this task.",
3623
+ "type": "string"
3624
+ },
3625
+ "task_assignment_collection": {
3626
+ "tasks": {
3627
+ "properties": {
3628
+ "total_count": {
3629
+ "type": "integer"
3630
+ },
3631
+ "entries": [
3632
+ {
3633
+ "type": "object"
3634
+ }
3635
+ ],
3636
+ "type": "array"
3637
+ },
3638
+ "type": "object"
3639
+ },
3640
+ "type": "array"
3641
+ },
3642
+ "is_completed": {
3643
+ "type": "boolean"
3644
+ },
3645
+ "created_by": {
3646
+ "properties": {
3647
+ "type": {
3648
+ "type": "string"
3649
+ },
3650
+ "id": {
3651
+ "type": "string"
3652
+ },
3653
+ "name": {
3654
+ "type": "string"
3655
+ },
3656
+ "login": {
3657
+ "type": "string"
3658
+ }
3659
+ },
3660
+ "type": "object"
3661
+ },
3662
+ "created_at": {
3663
+ "type": "timestamp"
3664
+ }
3665
+ }
3666
+ }
3667
+ /{taskId}:
3668
+ type: base
3669
+ get:
3670
+ description: Fetches a specific task.
3671
+ responses:
3672
+ 200:
3673
+ body:
3674
+ example: |
3675
+ {
3676
+ "total_count": 1,
3677
+ "entries": [
3678
+ {
3679
+ "type": "task_assignment",
3680
+ "id": "2485961",
3681
+ "item": {
3682
+ "type": "file",
3683
+ "id": "7287087200",
3684
+ "sequence_id": "0",
3685
+ "etag": "0",
3686
+ "sha1": "0bbd79a105c504f99573e3799756debba4c760cd",
3687
+ "name": "box-logo.png"
3688
+ },
3689
+ "assigned_to": {
3690
+ "type": "user",
3691
+ "id": "193425559",
3692
+ "name": "Rhaegar Targaryen",
3693
+ "login": "rhaegar@box.com"
3694
+ }
3695
+ }
3696
+ ]
3697
+ }
3698
+ put:
3699
+ description: Updates a specific task.
3700
+ body:
3701
+ schema: |
3702
+ {
3703
+ "$schema": "http://json-schema.org/draft-03/schema",
3704
+ "type": "object" ,
3705
+ "properties": {
3706
+ "action": {
3707
+ "description": "The action the task assignee will be prompted to do. Can be 'review'.",
3708
+ "type": "string"
3709
+ },
3710
+ "message": {
3711
+ "description": "An optional message to include with the task.",
3712
+ "type": "string"
3713
+ },
3714
+ "due_at": {
3715
+ "description": "The day at which this task is due.",
3716
+ "type": "timestamp"
3717
+ }
3718
+ }
3719
+ }
3720
+ responses:
3721
+ 200:
3722
+ body:
3723
+ example: |
3724
+ {
3725
+ "type": "task",
3726
+ "id": "1839355",
3727
+ "item": {
3728
+ "type": "file",
3729
+ "id": "7287087200",
3730
+ "sequence_id": "0",
3731
+ "etag": "0",
3732
+ "sha1": "0bbd79a105c504f99573e3799756debba4c760cd",
3733
+ "name": "box-logo.png"
3734
+ },
3735
+ "due_at": "2014-04-03T11:09:43-07:00",
3736
+ "action": "review",
3737
+ "message": "REVIEW PLZ K THX",
3738
+ "task_assignment_collection": {
3739
+ "total_count": 0,
3740
+ "entries": []
3741
+ },
3742
+ "is_completed": false,
3743
+ "created_by": {
3744
+ "type": "user",
3745
+ "id": "11993747",
3746
+ "name": "??? sean ???",
3747
+ "login": "sean@box.com"
3748
+ },
3749
+ "created_at": "2013-04-03T11:12:54-07:00"
3750
+ }
3751
+ delete:
3752
+ description: |
3753
+ Permanently deletes a specific task. An empty 204 response will be
3754
+ returned upon success.
3755
+ responses:
3756
+ 204:
3757
+ description: Task deleted.
3758
+ /assignments:
3759
+ type: base
3760
+ get:
3761
+ description: |
3762
+ Retrieves all of the assignments for a given task.
3763
+ A collection of task assignment mini objects will be returned upon success.
3764
+ responses:
3765
+ 200:
3766
+ body:
3767
+ example: |
3768
+ {
3769
+ "total_count": 1,
3770
+ "entries": [
3771
+ {
3772
+ "type": "task_assignment",
3773
+ "id": "2485961",
3774
+ "item": {
3775
+ "type": "file",
3776
+ "id": "7287087200",
3777
+ "sequence_id": "0",
3778
+ "etag": "0",
3779
+ "sha1": "0bbd79a105c504f99573e3799756debba4c760cd",
3780
+ "name": "box-logo.png"
3781
+ },
3782
+ "assigned_to": {
3783
+ "type": "user",
3784
+ "id": "193425559",
3785
+ "name": "Rhaegar Targaryen",
3786
+ "login": "rhaegar@box.com"
3787
+ }
3788
+ }
3789
+ ]
3790
+ }
3791
+ /task_assignments:
3792
+ type: base
3793
+ post:
3794
+ description: |
3795
+ Used to assign a task to a single user. There can be multiple assignments
3796
+ on a given task.
3797
+ A new task assignment object will be returned upon success.
3798
+ body:
3799
+ schema: |
3800
+ {
3801
+ "$schema": "http://json-schema.org/draft-03/schema",
3802
+ "type": "object" ,
3803
+ "properties": {
3804
+ "task": {
3805
+ "description": "The task this assignment is for.",
3806
+ "type": "object",
3807
+ "required": true
3808
+ },
3809
+ "type": {
3810
+ "description": "Must be 'task'",
3811
+ "type": [ "task" ]
3812
+ },
3813
+ "id": {
3814
+ "description": "The ID of the task this assignment is for.",
3815
+ "type": "string",
3816
+ "required": true
3817
+ },
3818
+ "assign_to": {
3819
+ "description": "The user this assignment is for. At least one of 'id' or 'login' is required in this object.",
3820
+ "type": "object",
3821
+ "required": true
3822
+ },
3823
+ "id": {
3824
+ "description": "The ID of the user this assignment is for.",
3825
+ "type": "string"
3826
+ },
3827
+ "login": {
3828
+ "description": "The login email address for the user this assignment is for.",
3829
+ "type": "string"
3830
+ }
3831
+ }
3832
+ }
3833
+ responses:
3834
+ 200:
3835
+ body:
3836
+ example: |
3837
+ {
3838
+ "type": "task_assignment",
3839
+ "id": "2698512",
3840
+ "item": {
3841
+ "type": "file",
3842
+ "id": "8018809384",
3843
+ "sequence_id": "0",
3844
+ "etag": "0",
3845
+ "sha1": "7840095ee096ee8297676a138d4e316eabb3ec96",
3846
+ "name": "scrumworksToTrello.js"
3847
+ },
3848
+ "assigned_to": {
3849
+ "type": "user",
3850
+ "id": "1992432",
3851
+ "name": "rhaegar@box.com",
3852
+ "login": "rhaegar@box.com"
3853
+ },
3854
+ "message": null,
3855
+ "completed_at": null,
3856
+ "assigned_at": "2013-05-10T11:43:41-07:00",
3857
+ "reminded_at": null,
3858
+ "resolution_state": "incomplete",
3859
+ "assigned_by": {
3860
+ "type": "user",
3861
+ "id": "11993747",
3862
+ "name": "??? sean ???",
3863
+ "login": "sean@box.com"
3864
+ }
3865
+ }
3866
+ schema: |
3867
+ {
3868
+ "$schema": "http://json-schema.org/draft-03/schema",
3869
+ "type": "object" ,
3870
+ "properties": {
3871
+ "type": {
3872
+ "type": "string"
3873
+ },
3874
+ "id": {
3875
+ "type": "string"
3876
+ },
3877
+ "item": {
3878
+ "properties": {
3879
+ "type": {
3880
+ "type": "string"
3881
+ },
3882
+ "id": {
3883
+ "type": "string"
3884
+ },
3885
+ "sequence_id": {
3886
+ "type": "string"
3887
+ },
3888
+ "etag": {
3889
+ "type": "string"
3890
+ },
3891
+ "sha1": {
3892
+ "type": "string"
3893
+ },
3894
+ "name": {
3895
+ "type": "string"
3896
+ }
3897
+ },
3898
+ "type": "object"
3899
+ },
3900
+ "assigned_to": {
3901
+ "properties": {
3902
+ "type": {
3903
+ "type": "string"
3904
+ },
3905
+ "id": {
3906
+ "type": "string"
3907
+ },
3908
+ "name": {
3909
+ "type": "string"
3910
+ },
3911
+ "login": {
3912
+ "type": "string"
3913
+ }
3914
+ },
3915
+ "type": "object"
3916
+ },
3917
+ "message": {
3918
+ "type": "string"
3919
+ },
3920
+ "completed_at": {
3921
+ "type": "timestamp"
3922
+ },
3923
+ "assigned_at": {
3924
+ "type": "timestamp"
3925
+ },
3926
+ "reminded_at": {
3927
+ "type": "string"
3928
+ },
3929
+ "resolution_state": {
3930
+ "type": "string"
3931
+ },
3932
+ "assigned_by": {
3933
+ "properties": {
3934
+ "type": {
3935
+ "type": "string"
3936
+ },
3937
+ "id": {
3938
+ "type": "string"
3939
+ },
3940
+ "name": {
3941
+ "type": "string"
3942
+ },
3943
+ "login": {
3944
+ "type": "string"
3945
+ }
3946
+ },
3947
+ "type": "object"
3948
+ }
3949
+ }
3950
+ }
3951
+ /{id}:
3952
+ type: base
3953
+ get:
3954
+ description: |
3955
+ Fetches a specific task assignment.
3956
+ The specified task assignment object will be returned upon success.
3957
+ responses:
3958
+ 200:
3959
+ body:
3960
+ example: |
3961
+ {
3962
+ "type": "task_assignment",
3963
+ "id": "2698512",
3964
+ "item": {
3965
+ "type": "file",
3966
+ "id": "8018809384",
3967
+ "sequence_id": "0",
3968
+ "etag": "0",
3969
+ "sha1": "7840095ee096ee8297676a138d4e316eabb3ec96",
3970
+ "name": "scrumworksToTrello.js"
3971
+ },
3972
+ "assigned_to": {
3973
+ "type": "user",
3974
+ "id": "1992432",
3975
+ "name": "rhaegar@box.com",
3976
+ "login": "rhaegar@box.com"
3977
+ },
3978
+ "message": null,
3979
+ "completed_at": null,
3980
+ "assigned_at": "2013-05-10T11:43:41-07:00",
3981
+ "reminded_at": null,
3982
+ "resolution_state": "incomplete",
3983
+ "assigned_by": {
3984
+ "type": "user",
3985
+ "id": "11993747",
3986
+ "name": "??? sean ???",
3987
+ "login": "sean@box.com"
3988
+ }
3989
+ }
3990
+ schema: |
3991
+ {
3992
+ "$schema": "http://json-schema.org/draft-03/schema",
3993
+ "type": "object" ,
3994
+ "properties": {
3995
+ "type": {
3996
+ "type": "string"
3997
+ },
3998
+ "id": {
3999
+ "type": "string"
4000
+ },
4001
+ "item": {
4002
+ "properties": {
4003
+ "type": {
4004
+ "type": "string"
4005
+ },
4006
+ "id": {
4007
+ "type": "string"
4008
+ },
4009
+ "sequence_id": {
4010
+ "type": "string"
4011
+ },
4012
+ "etag": {
4013
+ "type": "string"
4014
+ },
4015
+ "sha1": {
4016
+ "type": "string"
4017
+ },
4018
+ "name": {
4019
+ "type": "string"
4020
+ }
4021
+ },
4022
+ "type": "object"
4023
+ },
4024
+ "assigned_to": {
4025
+ "properties": {
4026
+ "type": {
4027
+ "type": "string"
4028
+ },
4029
+ "id": {
4030
+ "type": "string"
4031
+ },
4032
+ "name": {
4033
+ "type": "string"
4034
+ },
4035
+ "login": {
4036
+ "type": "string"
4037
+ }
4038
+ },
4039
+ "type": "object"
4040
+ },
4041
+ "message": {
4042
+ "type": "string"
4043
+ },
4044
+ "completed_at": {
4045
+ "type": "timestamp"
4046
+ },
4047
+ "assigned_at": {
4048
+ "type": "timestamp"
4049
+ },
4050
+ "reminded_at": {
4051
+ "type": "string"
4052
+ },
4053
+ "resolution_state": {
4054
+ "type": "string"
4055
+ },
4056
+ "assigned_by": {
4057
+ "properties": {
4058
+ "type": {
4059
+ "type": "string"
4060
+ },
4061
+ "id": {
4062
+ "type": "string"
4063
+ },
4064
+ "name": {
4065
+ "type": "string"
4066
+ },
4067
+ "login": {
4068
+ "type": "string"
4069
+ }
4070
+ },
4071
+ "type": "object"
4072
+ }
4073
+ }
4074
+ }
4075
+ delete:
4076
+ description: |
4077
+ Deletes a specific task assignment.
4078
+ An empty '204 No Content' response will be returned upon success.
4079
+ responses:
4080
+ 204:
4081
+ description: Task deleted.
4082
+ put:
4083
+ description: |
4084
+ Used to update a task assignment.
4085
+ A new task assignment object will be returned upon success.
4086
+ body:
4087
+ schema: |
4088
+ {
4089
+ "$schema": "http://json-schema.org/draft-03/schema",
4090
+ "type": "object" ,
4091
+ "properties": {
4092
+ "message": {
4093
+ "description": "A message from the assignee about this task.",
4094
+ "type": "string"
4095
+ },
4096
+ "resolution_state": {
4097
+ "description": "Can be 'completed', 'incomplete', 'approved', or 'rejected'.",
4098
+ "type": [
4099
+ "completed",
4100
+ "incomplete",
4101
+ "approved",
4102
+ "rejected"
4103
+ ]
4104
+ }
4105
+ }
4106
+ }
4107
+ responses:
4108
+ 200:
4109
+ body:
4110
+ example: |
4111
+ {
4112
+ "type": "task_assignment",
4113
+ "id": "2698512",
4114
+ "item": {
4115
+ "type": "file",
4116
+ "id": "8018809384",
4117
+ "sequence_id": "0",
4118
+ "etag": "0",
4119
+ "sha1": "7840095ee096ee8297676a138d4e316eabb3ec96",
4120
+ "name": "scrumworksToTrello.js"
4121
+ },
4122
+ "assigned_to": {
4123
+ "type": "user",
4124
+ "id": "1992432",
4125
+ "name": "rhaegar@box.com",
4126
+ "login": "rhaegar@box.com"
4127
+ },
4128
+ "message": "hello!!!",
4129
+ "completed_at": null,
4130
+ "assigned_at": "2013-05-10T11:43:41-07:00",
4131
+ "reminded_at": null,
4132
+ "resolution_state": "incomplete",
4133
+ "assigned_by": {
4134
+ "type": "user",
4135
+ "id": "11993747",
4136
+ "name": "??? sean ???",
4137
+ "login": "sean@box.com"
4138
+ }
4139
+ }
4140
+ schema: |
4141
+ {
4142
+ "$schema": "http://json-schema.org/draft-03/schema",
4143
+ "type": "object" ,
4144
+ "properties": {
4145
+ "type": {
4146
+ "type": "string"
4147
+ },
4148
+ "id": {
4149
+ "type": "string"
4150
+ },
4151
+ "item": {
4152
+ "properties": {
4153
+ "type": {
4154
+ "type": "string"
4155
+ },
4156
+ "id": {
4157
+ "type": "string"
4158
+ },
4159
+ "sequence_id": {
4160
+ "type": "string"
4161
+ },
4162
+ "etag": {
4163
+ "type": "string"
4164
+ },
4165
+ "sha1": {
4166
+ "type": "string"
4167
+ },
4168
+ "name": {
4169
+ "type": "string"
4170
+ }
4171
+ },
4172
+ "type": "object"
4173
+ },
4174
+ "assigned_to": {
4175
+ "properties": {
4176
+ "type": {
4177
+ "type": "string"
4178
+ },
4179
+ "id": {
4180
+ "type": "string"
4181
+ },
4182
+ "name": {
4183
+ "type": "string"
4184
+ },
4185
+ "login": {
4186
+ "type": "string"
4187
+ }
4188
+ },
4189
+ "type": "object"
4190
+ },
4191
+ "message": {
4192
+ "type": "string"
4193
+ },
4194
+ "completed_at": {
4195
+ "type": "timestamp"
4196
+ },
4197
+ "assigned_at": {
4198
+ "type": "timestamp"
4199
+ },
4200
+ "reminded_at": {
4201
+ "type": "string"
4202
+ },
4203
+ "resolution_state": {
4204
+ "type": "string"
4205
+ },
4206
+ "assigned_by": {
4207
+ "properties": {
4208
+ "type": {
4209
+ "type": "string"
4210
+ },
4211
+ "id": {
4212
+ "type": "string"
4213
+ },
4214
+ "name": {
4215
+ "type": "string"
4216
+ },
4217
+ "login": {
4218
+ "type": "string"
4219
+ }
4220
+ },
4221
+ "type": "object"
4222
+ }
4223
+ }
4224
+ }