Created
July 13, 2020 11:23
-
-
Save Rahulsharma0810/2ef81dc63ed3174ddf0954d23194c8b9 to your computer and use it in GitHub Desktop.
Luman Sample API Methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$router->get('/', function () use ($router) { | |
return $router->app->version(); | |
}); | |
$router->get('products', function () use ($router) { | |
return response(['Product 1', 'Product 2', 'Product 3'],200); | |
}); | |
$router->post('status', function() { | |
return response()->json([ | |
'status' => 'Pending' | |
], 201); | |
}); | |
$router->post('sqlservices/sb/mssqloauthprovider/oauth2/token', function (Request $request) { | |
if($request->grant_type == '210a1955-84b3-46ad-ab33-0e55fa70677a'){return response()->json(['token_type' => 'Bearer', 'access_token' => 'AAIkMjEwYTE5NTUtODRiMy00NmFkLWFiMzMtMGU1NWZhNzA2Nzdhgp9qCAWRj37DkuWB2jnVInIrHnIwv8_0wbyZcIugTOqTUxLJGKNtkNgBUWMUVnjVwv66QwHL1p6ZKUnOwq-LWhs4nTsFQrQdF1hr6n5YsAVJG7Qnb3vFbBn1ElBNEkS-', 'expires_in' => '3600', 'consented_on' => time()+3600 , 'scope' => 'oneford' ], 200);}else{return response()->json([ | |
'message' => 'Grant Type must be ...' | |
], 400); | |
} | |
}); | |
$router->get('sqlservices/sqlservices/sb/mssql/sqltrial-vms/request/provisionstatus/99f4ed77-b361-4bf5-8e38-c6867f9db8c7', function (Request $request) { | |
return response()->json( | |
['requestId' => '683a4999-6758-4b99-8623-4d5987fb09fe', | |
'requestedItemName' => 'SQL Server Habitat DRS', | |
'dateSubmitted' => '2020-06-25T20:22:01.121Z', | |
'dateCompleted' => '2020-06-25T21:52:04.799Z', | |
'catalogItemId' => 'f75c9466-f519-42d6-979e-c99d7161b2b4', | |
// 'status' => 'IN_PROGRESS', | |
'status' => 'SUCCESSFUL', | |
'machineName' => 'null' ], 200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment