public function createWriterWithProject($writerId, $pid, $username, $password, $params = [])
    {
        $job = $this->createWriterWithProjectAsync($writerId, $pid, $username, $password, $params);
        if (!isset($job['url'])) {
            throw new ServerException('Create writer job returned unexpected result: ' . json_encode($job, JSON_PRETTY_PRINT));
        }

        return $this->waitForJob($job['url']);
    }