forked from kevinobee/Sitecore.Ship
-
Notifications
You must be signed in to change notification settings - Fork 2
/
apiary.apib
250 lines (150 loc) · 8.48 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
FORMAT: 1A
HOST: http://docs.sitecoreship.apiary.io/
# Sitecore.Ship
The package offers a simple API to help consumers install their packages into Sitecore over HTTP.
## Sitecore.Ship Information [/services/about]
### About [GET]
+ Response 200 (text/plain)
+ Body
Sitecore.Ship - version 0.4.0.0
## Package Installation [/services/package]
### Install Package [POST /services/package/install]
+ Request (multipart/form-data;boundary=----WebKitFormBoundary8M3sSU13ul5lXSJm)
Install a package by specifying a package available on the server.
Specify the request parameters in x-www-form-urlencoded form-data.
+ Headers
Accept: application/json
+ Attributes (object)
+ path: d:\package.update (string, required) - The path to the package file.
+ DisableIndexing: false (boolean, optional) - Disables Indexing during publish operation. Value is `false` by default. When the parameter is set to *true* updating of search indexes during the package installation will be suspended. Disabling the search index updates will increase the speed at which packages are installed into the CMS. You can read more about this approach on Alex Shyba's
[blog](http://sitecoreblog.alexshyba.com/2010/04/sitecore-installation-wizard-disable.html "Sitecore Installation Wizard – disable search index update during install")
+ Body
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="path"
d:\package.update
----WebKitFormBoundaryE19zNvXGzXaLvS5C
+ Response 201 (application/json)
+ Headers
Location: /services/package/latestversion
+ Body
{ "Entries" : [ { "ID" : "110d559f-dea5-42ea-9c1c-8a5df7e70ef9", "Path" : "addeditems/master/sitecore/content/home" } ] }
### Upload and Install Package [POST /services/package/install/fileupload]
+ Request (multipart/form-data;boundary=----WebKitFormBoundary8M3sSU13ul5lXSJm)
Upload and install a package by specifying a package to upload to the server and install into the Sitecore instance.
Specify the request parameters in x-www-form-urlencoded form-data.
*Note* that if you have `recordInstallationHistory` enabled you will need to provide `PackageId` and `Description` form parameters in the request that you make.
+ Headers
Accept: application/json
+ Attributes (object)
+ path: package.update (string, required) - The path to the package file.
+ DisableIndexing: false (boolean, optional) - Disables Indexing during publish operation. Value is `false` by default.
+ Body
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="path"; filename="package.update"
Content-Type:
----WebKitFormBoundaryE19zNvXGzXaLvS5C
+ Response 404
+ Headers
x-processing-time: 0
+ Response 201 (application/json)
+ Headers
Location: /services/package/latestversion
x-processing-time: 9984.2635
+ Body
{ "Entries":
[
{"ID":"4717ac43-bb10-4673-92bf-5e9e2a191147","Path":"items/master/sitecore/templates/SitecoreShip"},
{"ID":"4717ac43-bb10-4673-92bf-5e9e2a191147","Path":"properties/items/master/sitecore/templates/SitecoreShip"},
{"ID":"c2b9b6c7-5f2f-4638-9a1c-244557be959e","Path":"items/master/sitecore/templates/SitecoreShip/InstalledPackage"},
{"ID":"c2b9b6c7-5f2f-4638-9a1c-244557be959e","Path":"properties/items/master/sitecore/templates/SitecoreShip/InstalledPackage"},
{"ID":"8bbbddb4-d98c-42e7-b555-1467c84aca6d","Path":"items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data"},
{"ID":"8bbbddb4-d98c-42e7-b555-1467c84aca6d","Path":"properties/items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data"},
{"ID":"463b0ac2-b6d3-42f1-8082-86f56ab2d7d7","Path":"items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data/DateInstalled"},
{"ID":"463b0ac2-b6d3-42f1-8082-86f56ab2d7d7","Path":"properties/items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data/DateInstalled"},{"ID":"c00c438e-a5ab-4098-8107-1c59cd667404","Path":"items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data/Description"},
{"ID":"c00c438e-a5ab-4098-8107-1c59cd667404","Path":"properties/items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data/Description"},
{"ID":"d26968d3-dcee-449f-857a-d3253785761b","Path":"items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data/PackageId"},
{"ID":"d26968d3-dcee-449f-857a-d3253785761b","Path":"properties/items/master/sitecore/templates/SitecoreShip/InstalledPackage/Data/PackageId"},
{"ID":"ce433442-9cee-4626-860a-17a19de19810","Path":"items/master/sitecore/content/PackageHistory"},
{"ID":"ce433442-9cee-4626-860a-17a19de19810","Path":"properties/items/master/sitecore/content/PackageHistory"}
]
}
### Package Installation Report [GET /services/package/latestversion]
+ Request
Reports the details of the last package to have been installed by the Sitecore.Ship.
Note that latest version reporting is disabled by default. Refer to the `recordInstallationHistory` setting in the **Configuration Options** section of the project [README](README.md) file.
+ Response 204
+ Headers
x-processing-time: 42.3033
+ Response 200 (application/json)
+ Headers
x-processing-time: 10.0345
+ Body
{
"installedPackage":
{
"PackageId": "01",
"DateInstalled": "\/Date(1468839035000)\/",
"Description":"package"
}
}
## Publishing [/services/publish]
### Sitecore Content Publish [POST /services/publish/{mode}]
+ Parameters
+ mode: full (required, string) - Sitecore publishing mode. Valid values are `full`, `smart` and `incremental`.
+ Request (multipart/form-data;boundary=----WebKitFormBoundary8M3sSU13ul5lXSJm)
+ Headers
Accept: application/json
+ Attributes (object)
+ source: master (string, optional) - The publishing source.
+ targets: web (string, optional) - The publishing targets.
+ languages: en (string, optional) - The publishing languages.
+ Body
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="source"
master
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="targets"
web, target2
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="languages"
en, da, de-DE
----WebKitFormBoundaryE19zNvXGzXaLvS5C
+ Response 202 (application/json)
+ Headers
x-processing-time: 7.9582
+ Body
{
"date": "\/Date(1468830267000)\/"
}
### Publish Specified Items [POST /services/publish/listofitems]
+ Request (application/json)
{
"Items": [
{
"itemId" : "{DEDCC8EB-F542-449C-9EFA-4F248EDB900B}",
"PublishChildren": "false"
},
{
"itemId" : "{CE0A2933-AB9B-4131-ABD2-DE7C2A69FBB9}",
"PublishChildren": "false"
}
],
"TargetDatabases": [ "#TargetDatabase#" ],
"TargetLanguages": [ "en" ]
}
+ Response 200 (application/json)
### Last Publish Operation [GET /services/publish/lastcompleted/{source}/{target}/{language}]
+ Parameters
+ source: `master` (optional, string) - The publishing source.
+ Default: `master`
+ target: `web` (optional, string) - The publishing targets.
+ Default: `web`
+ language: `en` (optional, string) - The publishing language.
+ Default: `en`
+ Response 202 (application/json)
+ Headers
x-processing-time: 1.4947
+ Body
{
"date": "\/Date(-62135596800000)\/"
}