Ordner löschen

Delete Crowdin project directory. All nested files and directories will be deleted too.

Anfrage

Note: Either use the combination of project identifier and project key or combination of project identifier, username, and account key to pass to this endpoint.

POST https://api.crowdin.com/api/project/{Projektkennung}/delete-directory?key={Projektschlüssel}&name={Verzeichnisname}
POST https://api.crowdin.com/api/project/{Projekt-ID}/delete-directory?login={Nutzername}&account-key={Kontoschlüssel}&name={Ordnername}

Parameter

Name Wert Beschreibung
name benötigt String Verzeichnispfad (oder nur der Name, falls es das Stammverzeichnis ist).
branch optional String Name of the related version branch (Versions Management). Specify only if you want to delete a directory inside this branch.
json optional String May not contain value. Defines that response should be in JSON format.
jsonp optional String Callback function name. Defines that response should be in JSONP format.
Variablen
project-identifier String Projekt-ID.
project-key String Projekt-API-Schlüssel. Entweder project-key oder die Kombination aus login und account-key wird benötigt.
login String Ihr Nutzername auf Crowdin. Entweder project-key oder die Kombination aus login und account-key wird benötigt.
account-key String Your account API key. Entweder project-key oder die Kombination aus login und account-key wird benötigt.

Antwort

If successful, this method returns a XML structure, as it is shown below.
<?xml version="1.0" encoding="UTF-8"?>
<success>
</success>
Unsuccessful response sample:
<?xml version="1.0" encoding="UTF-8"?>
<error>
  <code>3</code>
  <message>API key is not valid</message>
</error>

Beispiele

curl \
  -F "name=localizable" \
  https://api.crowdin.com/api/project/{Projekt-ID}/delete-directory?key={Projektschlüssel}
<?php
$post_params = array();
$request_url = 'https://api.crowdin.com/api/project/{project-identifier}/delete-directory?key={project-key}';
$post_params['name'] = '/localizable/texts';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_params);

$result = curl_exec($ch);
curl_close($ch);

echo $result;

War dieser Artikel hilfreich?