owncloud / testing

🔧 app for testing ownCloud
GNU Affero General Public License v3.0
3 stars 4 forks source link

Add api route to run multiple occ commands at once #165

Closed dpakach closed 3 years ago

dpakach commented 3 years ago

Description

Add new endpoint '/apps/testing/api/v1/occ/bulkset' to run a list of occ commands at once

POST /ocs/v2.php/apps/testing/api/v1/occ/bulkset HTTP/1.1

[
  {
    "command": "config:system:set --type=string --value=\"test\" testconfig"
  },
  {
    "command": "config:system:set --type=json --value=\"test2\" testconfig2"
  }
]

Response:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>200</statuscode>
  <message/>
 </meta>
 <data>
  <element>
   <code>0</code>
   <stdOut>System config value testconfig set to string &quot;test&quot;
</stdOut>
   <stdErr></stdErr>
  </element>
  <element>
   <code>0</code>
   <stdOut>System config value testconfig2 set to json &quot;test2&quot;
</stdOut>
   <stdErr></stdErr>
  </element>
 </data>
</ocs>

Checklist:

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information