Change console-key endpoint from GET to POST

This commit is contained in:
Prem Palanisamy
2026-03-23 13:46:58 +00:00
parent 374e1f8782
commit e2f2ce3da8
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -694,14 +694,14 @@ Http::get('/v1/migrations/:migrationId')
$response->dynamic($migration, Response::MODEL_MIGRATION);
});
Http::get('/v1/migrations/appwrite/console-key')
Http::post('/v1/migrations/appwrite/console-key')
->groups(['api', 'migrations'])
->desc('Generate console API key for migration')
->desc('Create console API key for migration')
->label('scope', 'migrations.write')
->label('sdk', new Method(
namespace: 'migrations',
group: null,
name: 'getAppwriteConsoleKey',
name: 'createAppwriteConsoleKey',
description: '/docs/references/migrations/migration-appwrite-console-key.md',
auth: [AuthType::KEY],
responses: [
@@ -1175,7 +1175,7 @@ trait MigrationsBase
*/
public function testGetAppwriteConsoleKey(): void
{
$response = $this->client->call(Client::METHOD_GET, '/migrations/appwrite/console-key', [
$response = $this->client->call(Client::METHOD_POST, '/migrations/appwrite/console-key', [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey'],
@@ -1229,7 +1229,7 @@ trait MigrationsBase
$this->assertEquals(0, $result['statusCounters'][Resource::TYPE_PLATFORM]['warning']);
// Get a console key for the destination project to access console-scoped endpoints
$consoleKeyResponse = $this->client->call(Client::METHOD_GET, '/migrations/appwrite/console-key', [
$consoleKeyResponse = $this->client->call(Client::METHOD_POST, '/migrations/appwrite/console-key', [
'content-type' => 'application/json',
'x-appwrite-project' => $this->getDestinationProject()['$id'],
'x-appwrite-key' => $this->getDestinationProject()['apiKey'],