...
- Create a folder (ex: SciGaP) in a preferable location in your local machine to clone the PHP samples from GitHub.
- Open the created SciGaP folder (...../ cd SciGaP) and clone the files using GitHuB ‘HTTPS clone URL’
git clone https://github.com/SciGaP/Airavata-PHP-Client-Samplesgit-wip-us.apache.org/repos/asf?p=airavata.git
Once the cloning is completed you would get a completed message. - Open the folder which contains the PHP sample scripts.
SciGaP → Airavata-PHP-Client-Samples → client-samples → airavata/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples - client-samples folder contains PHP scripts to exercise currently existing Airavata API methods;
- GetAPIVersion.php (a sanity check)
- add-compute-resources.php
- createProject.php
- updateProject.php
- getAllUserProjects.php
- createExperiment.php
- getExperiment.php
- updateExperiment.php
- cloneExperiment.php
- getAllExperimentsInProject.php
- getAllUserExperiments.php
- launchExperiment.php
- getExperimentStatus.php
- getExperimentOutputs.php
- terminateExperiment.php
- list-application-interfaces.php
- list-compute-resources.php
- airavata-client-api-tester.php
- Apart for the scripts for the API methods the folder contains;
- airavata-client-properties.ini - contains the server. port and timeout period information
- README-PHP-CLI-Examples.txt - Gives the script execution order
- Navigation to working directory;
cd SciGaP/Airavata-PHP-Client-Samples/client/airavata/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples
Tutorial II - Sanity Check
...
- To clone above modified experiment use cloneExperiment.php.
- Cloning will create exact copy of the existing experiment with a new experiment ID in CREATED state.
- To clone the experiment use;
- php cloneExperiment.php
- Format:
php cloneExperiment.php<space><exp_ID>
- Experiment modification confirmation message;
- Experiment<space><exp_ID><space>cloned!
- User can clone any experiment created by him/her irrespective of the experiment status.
- User can change existing information by updating the newly created experiment.
- Tutorial tryout;
- Try adding parameters to the script to change other data in the new experiment. E.g.: Exp name, Application, Resource, etc… and execute.
Tutorial VI - Search Experiments
...
Get All Experiments In Project
...
- To view all experiments created by a single user we use getAllUserExperiments.php.
- Format:
php getAllUserExperiments.php<space><username>
- All the experiments and their details created by the given user/username will be listed.
Search Experiment by Experiment Name
- Experiments can be searched by providing username along with experiment name or part of the experiment name.
- Format;
php search_experiments_by_name.php<space><username><space><experiment_name> - Example;
php search_experiments_by_name.php Test_User Exp
- When the script is executed; all the experiments which has the given text as part of the name will be listed along with all experiment information.
Search E
Tutorial VII - Launch & Cancel Experiments
...
- Once the experiment is COMPLETED (Status of the experiment is checked using above getExperimentStatus.php) user can check the output.
- To check the output
- Format;
php getExperimentOutputs.php<space><experiment_id>
Image - Sample output
Tutorial IX - List Applications
...
List Application Interfaces
...
{"serverDuration": 101, "requestCorrelationId": "ed48dd7e58edd53e"}