I’m writting script to migrate MediaWiki to phriction, i call API to check if page exist so as to knoww if i need to create or edit. But when i call api in my php script (here : phabricator/scripts/uti/l) randomly i have a response or error with exactly the same call.
I use exactly the same code as explained in conduit doc :
$api_parameters = array( 'queryKey' => 'all', 'constraints' => array( 'paths' => array( $lowerCasePath, ), ), 'attachments' => array( 'content' => 'true', ), ); $client = getClient($config); => create client and add token $response = $client->callMethodSynchronous('phriction.document.search', $api_parameters);
I run my script sometimes, i have response sometimes i have error like:
<h1>Error response</h1> <p>Error code: 501</p> <p>Message: Unsupported method ('params=%7B%22queryKey%22%3A%22all%22%2C%22constraints%22%3A%7B%22paths%22%3A%5B%22active_directory_-_gpos%5C%2F%22%5D%7D%2C%22attachments%22%3A%7B%22conten...</p>
I put a debug point and run just : $client->callMethodSynchronous(‘phriction.document.search’, $api_parameters); in debug console to be sure i have the same parameter, randomly i have an error.
Output from Config > Version Information or
Work in culr mode without error