Cobra Web Service ClientAPI Example

This section demonstrates how to use the Cobra Web Service ClientAPI by using the ClientAPI sample file that comes with the Cobra installation.

Sample ClientAPI Zip File

The 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.

Attention: For more information on how to restore a project, see Restore Data from a Backup File.

Actual Cost Integration File

The Sample Client API file contains an example about calling the Actual Cost Integration process which 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.

Note: Perform these steps on the same machine where you installed Cobra.
Step Description Notes
1 Install Cobra. See the Deltek Cobra Installation Guide.
2 Install Visual Studio 2012 (or higher) or any C# Code Editor. You will use this application to run the SampleClientAPI in Step 6.
3 Deploy the Cobra Web Service host. See 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 file. Navigate to the <Cobra Installation Folder>/Samples/Web Service ClientAPI, locate the 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.