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.
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 that uses the LoadDemoActualsConfig Integration file. This does not have a backup file so you need to manually create it.
Attention: For more information, see
Create a Sample Actual Cost Integration File.
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 SampleClientAPI.zip file. | Navigate to | , 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. - Run 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.
Parent Topic: Cobra Web Service
Learn more about...
How to...