Closed timcortesi closed 2 years ago
Current Config From Seeder:
$systems['BU'] = new System(['name' => 'BU', 'default_account_id_template' => '{{default_username}}', 'onremove' => 'delete', 'config' => ['actions' => [
['path' => '/ad/user/{{account.account_id}}', 'verb' => 'GET', 'action' => 'info', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/ad/user/{{account.account_id}}', 'verb' => 'PUT', 'action' => 'create', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/ad/user/{{account.account_id}}', 'verb' => 'PUT', 'action' => 'update', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/ad/user/{{account.account_id}}', 'verb' => 'DELETE', 'action' => 'delete', 'endpoint' => $endpoint1->id, 'response_code' => 200, ]
]]]);
$systems['BU']->save();
$systems['Google Workspace'] = new System(['name' => 'Google Workspace', 'default_account_id_template' => '{{default_username}}@binghamton.edu', 'onremove' => 'delete', 'config' => ['actions' => [
['path' => '/google/user/{{account.account_id}}', 'verb' => 'GET', 'action' => 'info', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/google/user/{{account.account_id}}', 'verb' => 'PUT', 'action' => 'create', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/google/user/{{account.account_id}}', 'verb' => 'PUT', 'action' => 'update', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/google/user/{{account.account_id}}', 'verb' => 'DELETE', 'action' => 'delete', 'endpoint' => $endpoint1->id, 'response_code' => 200 ]
]]]);
$systems['Google Workspace']->save();
$systems['Banner'] = new System(['name' => 'Banner', 'default_account_id_template' => '{{ids.bnumber}}', 'onremove' => 'delete', 'config' => ['actions' => [
['path' => '/banner/goremal', 'verb' => 'GET', 'action' => 'info', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
// @alikemaltanriverdi -- Please confirm the correct "create" route. Is it POST or PUT?
['path' => '/banner/goremal', 'verb' => 'PUT', 'action' => 'create', 'endpoint' => $endpoint1->id, 'response_code' => 200, ],
['path' => '/banner/goremal', 'verb' => 'PUT', 'action' => 'update', 'endpoint' => $endpoint1->id, 'response_code' => 200],
['path' => '/banner/goremal', 'verb' => 'PUT', 'action' => 'delete', 'endpoint' => $endpoint1->id, 'response_code' => 200]
]]]);
Resolved. This should be "PUT"
@alikemaltanriverdi Please confirm that we are using the correct endpoints for each for each of the actions for each of the systems.
Specifically, for Banner GOREMAL, should we be using the POST or PUT route for creating records? How is the POST route different from the PUT route?