Your token:
139 | 140 |179 | | 180 | | 181 | | 182 | | 183 | | 184 | 185 | 187 | |
---|
User: " + me.safeHTML(d2.batch.user_name) + "" ; 158 | h += " (batches by this user)" ; 159 | h += "
" ; 160 | h += "Status: " + d2.batch.status + " " + me.safeHTML(d2.batch.message) + "
" ; 161 | h += "Created: " + me.ts2string(d2.batch.ts_created) + "
" ; 162 | h += "Last change: " + me.ts2string(d2.batch.ts_last_change) + "
" ; 163 | h += "Status | Count |
---|---|
" + k + " | " + v + " |
# | User | Name | Status | Last change | Actions |
---|---|---|---|---|---|
"+batch_id+" | " ; 228 | h += "" + me.safeHTML(d2.batch.user_name) + " | " ; 229 | h += "" + me.safeHTML(d2.batch.name) + " | " ; 230 | h += "" ;
231 | h += " " + me.safeHTML(d2.batch.status) + " " + me.safeHTML(d2.batch.message) + " " ;
232 | var stati = [] ;
233 | $.each ( d2.commands , function ( k , v ) {
234 | stati.push ( k+':'+v ) ;
235 | } ) ;
236 | h += "" + stati.sort().join(' | ') + " " ;
237 | h += " | " ;
238 | h += "" + me.ts2string(d2.batch.ts_last_change) + " | " ; 239 | h += "" + me.getBatchButtons(d2) + " | " ; 240 | h += "
# | |||||
---|---|---|---|---|---|
19 | |
21 |
22 |
23 | {{b.batch.user_name}}
24 |
25 |
26 | [
28 | |
29 | 30 | {{b.batch.name}} 31 | | 32 |
33 |
34 |
35 | {{b.batch.status}}
36 |
37 |
38 |
39 | {{cmd}}:{{num}}
40 |
41 |
42 | |
43 | 44 | {{formatDate(b.batch.ts_last_change)}} 45 | | 46 |
47 |
50 |
51 |
52 |
53 | |
54 |
{{command}}
11 |
30 |
42 | ./api.php 43 | ?action=import 44 | &submit=1 45 | &username={{encodeURIComponent(user.getUserName().replace(/ /g,'_'))}} 46 | &token={{encodeURIComponent(token)}} 47 | &format=FORMAT ["v1" or "csv"] 48 | &data=COMMANDS [commands in the above format] 49 | &compress=0 [optional; deactivates compression of CREATE and following LAST commands] 50 | &batchname=BATCH_NAME [optional] 51 | &site=SITE_KEY [optional; default:"wikidata"] 52 |53 | The batch will start automatically, as if you had created it in the interface and then clicked "Run in background".
{"status":"OK","batch_id":ID_OF_THE_NEW_BATCH}(or an error message in "status"). 55 | 56 |
57 | For this to work, you need to have run a batch (server side) before manually, so your OAuth details can be filled in. 58 |
59 |63 | curl https://quickstatements.toolforge.org/api.php \ 64 | -d action=import \ 65 | -d submit=1 \ 66 | -d format=FORMAT \ 67 | -d username={{encodeURIComponent(user.getUserName().replace(/ /g,'_'))}} \ 68 | -d "batchname=THE NAME OF THE BATCH" \ 69 | --data-raw 'token={{token}}' \ 70 | --data-urlencode data@test.qs 71 |72 |