Stato di esportazione della traduzione

Get the status of translations export.

Richiesta

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.

GET https://api.crowdin.com/api/project/{project-identifier}/export-status?key={project-key}
GET https://api.crowdin.com/api/project/{project-identifier}/export-status?login={username}&account-key={account-key}

Parametri

Nome Value Descrizione
ramo opzionale nella stringa Il nome del ramo versione relativo (Versioni Gestione).
json optional nella stringa May not contain value. Defines that response should be in JSON format.
jsonp optional nella stringa Callback function name. Defines that response should be in JSONP format.
Variables
identificatore-progetto nella stringa Identificatore progetto.
chiave-progetto nella stringa Project API key. Project-key o la combinazione di accesso e account-key sono obbligatori.
accesso nella stringa Il tuo nome utente su Crowdin. Project-key o la combinazione di accesso e account-key sono obbligatori.
chiave-profilo nella stringa La chiave API del tuo profilo. Project-key o la combinazione di accesso e account-key sono obbligatori.

Response

Successful

The successful response status can be one of none, in-progress or finished.

If the export is finished, the method returns the following XML structure:

<?xml version="1.0" encoding="UTF-8"?>
<success>
  <status>finished</status>
  <progress>100</progress>
  <last_build>2018-10-22T13:49:00+0000</last_build>
</success>
If the export is in progress, the method returns the following XML structure:
<?xml version="1.0" encoding="UTF-8"?>
<success>
  <status>in-progress</status>
  <progress>29</progress>
  <last_build>2018-10-18T16:08:00+0000</last_build>
  <current_file>example.xml</current_file>
  <current_language>Ukrainian</current_language>
</success>
If the export has never been built, the method returns the following XML structure:
<?xml version="1.0" encoding="UTF-8"?>
<success>
  <status>none</status>
  <progress>0</progress>
  <last_build>mai</last_build>
</success>

Unsuccessful

<?xml version="1.0" encoding="UTF-8"?>
<error>
  <code>3</code>
  <message>API key is not valid</message>
</error>

Esempi

curl \
https://api.crowdin.com/api/project/{project-identifier}/export-status?key={project-key}
<?php
$request_url = 'https://api.crowdin.com/api/project/{project-identifier}/export-status?key={project-key}';

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

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

echo $result;

Questo articolo è stato utile?