Cobra Web Service ClientAPI Example
This section shows how to use the Cobra Web Service ClientAPI by utilizing the ClientAPI sample file that is included with the Cobra installation.
Sample ClientAPI Zip File
The SampleClientAPI.zip file, located in the Cobra installation folder, contains examples on how to authenticate and call Cobra processes.
Cobra Project
The Sample Client API file uses the “Demo” project. Restore the project using the backup provided in <Cobra Installation Folder>/Samples/Backup/Demo.cmp.
Actual Cost Integration File
The Sample Client API file contains an example about calling the Actual Cost Integration process that uses the LoadDemoActualsConfig Integration file. This does not have a backup file so you need to manually create it.
If you are not interested in this step, add comment tags to Lines 35-37 of the Program.cs file found in the SampleClientAPI folder.
Summary of Steps
The steps you need to perform are summarized in the following table.
Step | Description | Notes |
|---|---|---|
1 | Install Cobra. | See the Deltek Cobra Installation Guide. |
2 | Install Visual Studio 2012 (or later) or any C# Code Editor. | You will use this application to run the SampleClientAPI in Step 6. |
3 | Deploy the Cobra Web Service host. | |
4 | Configure the Cobra Web Service when using Windows Authentication.
Note: This step is optional.
| See Configure the Cobra Web Service When Using Windows Authentication. |
5 | Extract the SampleClientAPI.zip file. | Navigate to Cobra Installation Folder > Samples > Web Service ClientAP, locate the SampleClientAPI.zip file, and extract it (either on the same or another location). |
6 | Run the SampleClientAPI files. | See Run the SampleClientAPI Files. After running the application, see Explaining the SampleClient API Code to better understand each part of the code. |
Related Topics:
Create a Sample Actual Cost Integration File
Use this procedure to create a sample actual cost integration file that you will be used to call the Actual Cost Integration process when running the SampleClientAPI files.
Use this procedure to run the SampleClientAPI files.
Explaining the SampleClientAPI Code
This topic further explains the sample code and its parts.
Learn more about...
Deploying the Cobra Web Service
Using the Cobra Web Service ClientAPI in Your Application
Supported Processes, Operations, and Data
How to...
Deploy the Cobra Web Service ClientAPI