Deepser Deepser
  • Documentation
Start Free Trial
Deepser Deepser
Start Free Trial
Deepser
  • Documentation
loading
  1. Home
  2. Documentation
  3. Deepser API
  4. API Authentication
Updated on November 24, 2023

Documentation

  • Access and Visibility
    • End Users Visibility Overview
    • Creating a new user
    • Visibility management in Deepser
    • Company Supervisors
    • Additional Companies
    • LDAP Configuration
    • New User Registration
    • SSO Deepser Configuration
    • Azure SSO Configuration of Deepser Login
    • Groups
    • Groups Creation
    • Manage Users in Groups
    • Permission and Visibility Handling
    • Groups and Rules Definition
    • Roles
    • Resources
    • Creating and Managing Roles in Deepser
    • Company
    • Companies in Deepser
    • Company Creation
    • Parent Companies
    • Email Domains
    • Sync Account CRM Companies
    • Advanced Sync
  • Activity, Worklogs & Comments
    • DeepActivity Comments
    • Placing a comment
    • Comments System Configuration
    • DeepActivity Worklog
    • Entering a Worklog
    • Enabling Worklogs in the User Portal
    • Worklog Global Grid
    • Worklog Global Grid Configuration
    • Activity Global Grid Advanced Configuration
  • Board
    • Enable groups to create boards
    • Creating a FreeForm Board
    • Creating and customizing a Lane
    • Entry Creation
    • Board Live
    • Live Board Creation
    • Advanced Live Board Configuration
    • Creating and customizing a Lane
    • Creation and Advanced Configuration of a Lane and Drop Code
  • Categories
    • Categories in Deepser
    • Category Hierarchy
    • Creating New Categories and sub-Categories in Deepser
    • Make a category visible in the Guest portal
  • Chat
    • Using the Chat
    • Enabling the Chat on Portals
    • Chat Rooms and Moderators
    • Public Chat
    • Configure a Public Chat Widget
  • CMDB
    • Deepser CMDB
    • Enable CMDB in the User Portal
    • User Portal CMDB Grid Configuration
    • Advanced Configuration of CMDB Grids
    • Class, Type and Subtype
    • Configuring a CI
  • CRM
    • Deep CRM
    • Creating an account in the CRM
    • Creating a contact in the CRM
    • Creating an opportunity in the CRM
    • Contact Types in CRM
    • Opportunity Types in CRM
    • CRM Lists
    • Sync Contacts and Accounts
  • Deepser API
    • API Notions
    • API Endpoint and URL
    • API Verbs and Format
    • API Authentication
    • API Main Methods
    • Retrieve
    • Multiple Retrieve
    • Create
    • Update
    • Delete
    • API Entities
    • API Company
    • User API
    • Group API
    • Service Operation API
    • Service Type API
    • Activity API
    • CMDB CI API
  • Deepser Foundamentals
    • Deepser Backend
    • Deepser User Menu
    • Deepser Navigation Menu
    • Global Search Usage
    • Deepser Home Page
    • Grids
    • Filters and Order
    • Export Data
    • Mass Action
    • Grid Creation and Cloning
    • Configuring Grids
    • Grids System Configuration
    • Advanced Collection Configuration
    • Mass Action Configuration
    • Grids Render and Options Configuration
    • Grids Renderer Tooltip Example
    • Grids Renderer Link Example
    • Grids Custom Options Configurations
    • FormTemplates
    • FormTemplates Structure and Buttons
    • Form Template Theory
    • Form Template Selection and Creation
    • Form Template Configuration
    • Form Template Structure Configuration
    • Formtemplates Fieldset Configuration
    • Formtemplates Buttons Configuration
    • Formtemplates Field Configuration
    • Custom Button Configuration
    • Buttons Conditional Hiding
    • Advanced Form Template Rules
    • User Portal
    • Browsing the user portal
    • Managing Tickets in The User Portal
    • User Portal Additional Features
    • Configuring Portal Groups
    • Configuring Portal Requests
    • Configuring Service Operations in the User Portal
    • Enabling Other Modules in the User Portal
    • Enabling Other Modules in the User Portal Grid
    • Guest Portal
    • Enabling the Guest Portal
    • Guest Portal Visibility Configuration Overview
    • Enabling Service Types on the Guest Portal
    • Adding a Portal Group in the Guest Portal
    • Adding a Portal Request in the Guest Portal
    • Editing Form Templates in the Guest Portal
    • Enabling Categories in the Guest Portal
    • Enabling Notifications for Guest Users
    • Knowledge Base in the Guest Portal
    • CMS in the Guest Portal
  • Email Integration
    • Email Integration in Service Management
    • Enable Embedded Images on Message Body
    • Mailbox
    • Configuring an Outgoing Mailbox
    • Configuring an Incoming Mailbox
    • OAuth Client for Email Integration
    • Email Loop Management Tool
    • AZURE OAUTH CLIENT
    • Email Rules
    • Email Rule Configuration
    • Advanced Email Rule Configuration
    • Avoid Duplicate Tickets By Email
    • Managing additional Email recipients
    • Email Events
    • Enabling / Disabling an Email Event
    • Custom Email Events Creation
    • Custom Email Events Configuration
    • Attach Report to Email Notification
    • Email Templates
    • Email Template Configuration
    • New operation notification template for Requester User
    • New or Updated comment notification template for Requester
  • Escalation
    • Escalation rule levels
    • Configuring Escalation Rules
    • Configure an escalation rule that modifies entity.
    • Escalation rule that sends an email notification
    • Create an escalation rule that is based on a metric
    • Configure an escalation rule that generates other entities
  • Importing Data
    • Import Foundamentals
    • Import Creation
    • Import Basic Data Binding
    • Import Before Run
    • Import Before Run Tutorial
    • Import Before Row
    • Import Before Row Tutorial
    • Import After Row
    • Import Binding The Unique Field “Code”
    • Import Binding the Type Value
    • Import Binding the Dates Values
    • Import Binding a Company, creating the record if it doesn’t exist
  • IT Asset Management
    • ITAM Devices and Software
    • ITAM Agents
    • ITAM Agent Installation
    • ITAM Remote Collector
    • ITAM Agent to Remote Collector Conversion
    • ITAM Job Rules
    • ITAM Device Type and Subtype Configuration
    • Scan Jobs
    • Ping Sweep
    • SNMP Scan
    • WMI Job – Windows Devices
  • Knowledge Base
    • Reading the Knowledge Base
    • Knowledge Base in Service Operations
    • Article Configuration in Knowledge Base
    • Knowledge Base Configuration
    • Knowledge Base Standard Filters
    • Knowledge Base Advanced Filters
  • List
    • Introduction to lists
    • Creating a new list
    • List Values and Model Visibility
    • Use a list as the basis of a custom field
  • Password Management
    • Configuring a Password
    • Using a Password
    • Private Password
    • Password System Configuration
    • Enabling Password Manager Portal
    • Custom Deeppassword fields
    • Password Audit
  • Relations
    • Using a Relation Grid field
    • Configuring a Relation
    • Modifying relation using a custom event.
    • Opposite relation
    • Column Configuration
  • Service Management
    • Introduction to Services in Deepser
    • Service Operations
    • Creating a Service Operation
    • Adding Comments, Activities, Attachments and Tasks to Operations
    • Service Operation Main Fields
    • Service Operation Additional Fields
    • Service Operation Activities, Relations, Email and SLAs
    • Service Types
    • Routing rules
    • Configuring Routing Rules
    • Advanced Routing Configuration
  • SLA
    • Calendar
    • Metrics
    • Goal
  • Task
    • Creation of task type
    • Form configuration of task types
    • Task Global Grid
    • Task Global Grid Configuration
    • Task Global Grid Advanced Configuration
  • Workflow
    • Workflow Overview
    • Flow Designer
    • Flow Trigger
    • Workflow – Stage Set
    • Workflow – Executions
    • Approval workflows
    • Portal Approval Structure
    • Empowered End User
    • Backend Approval Structure
    • Workflow Actions
    • Workflow Logic
    • Workflow Samples
    • Multi Stage Flow
    • SubFlow

API Authentication

Estimated reading: 3 minutes

If you want to use Deepser API you must authenticate before using it.
The authentication supported by Deepser are currently of 2 types: the Basic Authentication and the Authentication with Token. We strongly suggest to use Token Authentication for improved security.


AUTHENTICATION WITH TOKEN

This can be done, before any request to the API, with some simple lines of code to add the Authentication parameters to the HTTP Headers.
In addition to the Basic Authentication, you have also to enable the Token for the user you want to authenticate.
To do that, you have to login into Deepser as a System Admin.
Go to the Configuration for the User you want to enable to token Authentication through API.
The menu in Deepser is System > Permissions > Users and then select the user you need to enable for token authentication.

PLEASE NOTE: If the “API Token” field isn’t visible, expose it by pressing the edit form button.

Then expose the field by using drag and drop.

You can use the three buttons to perform automatic actions on the Token: generate, delete or copy to clipboard.

From a developer’s perspective, once enabled the Token for the User, you need to set the header of the HTTP Request with the token.
In the following example, we see how to add the authentication parameter to a CURL request in PHP language:

				
					$host = 'http://deepserhost';
$process = curl_init($host);
$headers = array(
'Authorization: Basic '. base64_encode("user:password")
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// other lines to set the API request
…
// call the API using CURL
$return = curl_exec($process);
curl_close($process);
				
			

Where http://deepdeskhost is the address of your Deepser and token is the token generated for the user.

BASIC AUTHENTICATION

This can be done, before any request to the API, with some simple lines of code to add the Authentication parameters to the HTTP Headers.
To achieve that we need to set the header with the string ‘username’:’password’ encoded in base64 format.
In the following example, we see how to add the authentication parameter to a CURL request in PHP language:

				
					$host = 'http://deepserhost';
$process = curl_init($host);
$headers = array(
      'Authorization: Basic '. base64_encode("user:password")
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// other lines to set the API request
…
// call the API using CURL
$return = curl_exec($process);
curl_close($process);
				
			

Where http://deepserhost is the address of your Deepser and user:password is your username/password.

Of course, if you prefer to use other languages, the REST technology is language-independent.
We see how to use Java to make such a call:

				
					String encoding = Base64Encoder.encode ("user:password");
HttpPost httppost = new HttpPost("http://deepserhost");
httppost.setHeader("Authorization", "Basic " + encoding);
// other lines to set the API request
…
// call the API using Java HttpRespnse
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
				
			

Now that you know how to authenticate to Deepser API, go to the next lesson to see the advanced documentation of the API.
We assume you have already read the API introduction and you have learnt all the basic concepts stated in that guide.

Was this guide helpful? Yes No

Share this Doc

API Authentication

Or copy link

Clipboard Icon
CONTENTS
Leaf Illustration

Deepser srl
Via Luigi Dalla Via 3/B,Torre A, piano 7, int. 12
36015 Schio (VI), Italy

© Deepser. All right reserved.