POST Create an Asset

BaseURL/api/v1/asset

Asset Field Table

Field Name Field Type Field Category Detail Specification
assetId String Hardware,Software,Non-IT This field is only for view.
assetTypeName(required) String Hardware,Software,Non-IT In request assetTypeName should be given by bifurcating hierarchical relation with “$” sign. Eg.hardware$computer.
name(required) String Hardware,Software,Non-IT
type(required) String Hardware,Software,Non-IT To differentiate the request is of which type i.e HardwareAsset , SoftwareAsset, NonITAsset.
impactName String Hardware,Software,Non-IT
statusName String Hardware,Software,Non-IT
vendorName String Hardware,Software,Non-IT
productName String Hardware,Software,Non-IT
departmentName String Hardware,Software,Non-IT
usedByEmail Email Hardware,Software,Non-IT
acquitionDate String (In above mentioned date format) Hardware,Software,Non-IT
managedByEmail Email Hardware,Software,Non-IT
managedByGroupName String Hardware,Software,Non-IT Manage Group Name
assetGroupName String Hardware,Software,Non-IT Asset Group Name
locationName String Hardware,Software,Non-IT
barCode String Hardware,Software,Non-IT
tags Set of String Hardware,Software,Non-IT
assignmentDate String (In above mentioned date format) Hardware,Software,Non-IT
businessServiceName String Hardware,Software,Non-IT
customField Key-Value Pair Hardware,Software,Non-IT
description String Hardware,Software,Non-IT
assetPropertyList List of Key-Value Pair Hardware,Software,Non-IT List of Asset property group associate with an asset.
ipAddress String Hardware
hostName String Hardware
macAddress String Hardware
swTypeName String Software Software Type Name
swCategoryName String Software Software Category Name
installationStatus Boolean Software true/false
version String Software

Asset property Group Field Table

Hardware Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Hardware Property.
serialNumber String
warrentyExpirationDate String
auditDate String (In above mentioned date format)
propertyCustomField Key-Value Pair

Computer Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Computer Property.
osName String
osVersion String
servicePackName String
osLicenceKey String
osManufacturerName String
osArchitecture String osArchitecture should be bit_64 / bit_32 / all
bootupState String
memorySize Number Memory size should be in GB
diskSize Number Disk size should be in GB
cpuSpeed Number CPU Speed should be in GHz
cpuCoreCount Number
partOfDomain Boolean true/false
domainName Stringr
numberOfLogicalProcessors Number
numberOfProcessors Number
pcSystemType String
activationStatus String
lastLoggedInUser String Name of Last Logged In User
propertyCustomField Key-Value Pair

SNMP Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be SNMP Property.
systemOID String
systemUpTime Number systemUpTime Should be in minutes
firmware String
firmwareVersion String
port Number
contactName String
manufacturerName String
propertyCustomField Key-Value Pair

Storage Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Storage Property.
driveType String
diskSpace Number Disk Space should be in GB.
freeSpace Number Free Space should be in GB.
freeSpaceCheckedOn String (In above mentioned date format)
propertyCustomField Key-Value Pair

UPS Property Table

Field Name Field Type Detail Specification
type (required) String Type should be UPS Property.
modelName String
batteryVoltage String
batteryCurrent String
batteryCapacity String
capacity String
voltage String
power String
propertyCustomField Key-Value Pair

Firewall Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Firewall Property.
firmware String
firmwareVersion String
port Number
subnetMask String
propertyCustomField Key-Value Pair

Mobile Device Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Mobile Device Property.
os String
osVersion String
memory Number Memory should be in GB.
IMEINumber String
propertyCustomField Key-Value Pair

Rack Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Rack Property.
footPrint String
powerConsumption String
rackUnits Number
rackUnitsInUse Number
propertyCustomField Key-Value Pair

Software Property Group Table

Field Name Field Type Detail Specification
type (required) String Type should be Software Property.
licenseExpiryDate String (In above mentioned date format)
licenceTypeName String License Type Name
softwareCost Number
lastAuditDate String (In above mentioned date format)
licenseKeys Set of String
executableFileNames Set of String
propertyCustomField Key-Value Pair

Example (Request & Response)

Hardware Asset

Request

{
"type" : "HardwareAsset",
"assetTypeName" : "hardware$computer",
"name" : "Hardware Asset Name",
"acquitionDate" : "15-08-2020 13:34",
"tags" : [
"tag-1",
"tag-2"
] ,
"customField" : {
"Custom field name" : "value",
"Custom field name " : "value"
},
"assetPropertyList": [
{
"type": "HardwareProperty",
"field name": "field value",
"propertyCustomField" : {
"Custom field name" : "value",
"Custom field name " : "value"
}
},
{
"type": "ComputerProperty",
"field name": "field value",
"propertyCustomField" : {
"Custom field name" : "value",
"Custom field name " : "value"
}
}
]
}

Response

{
"type": "HardwareAsset",
"id": 1,
"assetTypeName": "Computer",
"assetId": "AST-1",
"name": "Hardware Asset Name",
"impactName": "Low",
"statusName": "In Use",
"origin": "manual",
"acquitionDate": "15-08-2020",
"tags": [
"tag-1",
"tag-2"
],
"customField": {
"hardware-textbox": "hardware-text",
"number": 88
},
"createdDate": "19-10-2020 11:23",
"updatedDate": "19-10-2020 11:23",
"assetPropertyList": [
{
"id": 1,
"refName": "AST-1",
"type": "ComputerProperty",
"osName": "Windows",
"osVersion": null,
"servicePackName": null,
"osLicenceKey": null,
"osArchitecture": null,
"bootupState": null,
"memorySize": 0,
"diskSize": 0,
"domainName": null,
"cpuSpeed": 0,
"cpuCoreCount": 0,
"partOfDomain": false,
"numberOfLogicalProcessors": 0,
"numberOfProcessors": 0,
"pcSystemType": null,
"lastLoggedInUser": null,
"activationStatus": null,
"propertyCustomField": {
"computerproperty-textbox" : "computer-text"
}
}
]
}

Software Asset

Request

{
"type" : "SoftwareAsset",
"assetTypeName" : "software$os",
"name" : "Software Asset Name",
"acquitionDate" : "15-08-2020 13:34",
"tags" : [
"tag-1",
"tag-2"
],
"customField" : {
"number" : 88,
"software-textbox" : "software-text"
},
"assetPropertyList": [
{
"type": "SoftwareProperty",
"softwareCost": 700,
"propertyCustomField" : {
"softwareproperty-textbox" : "softwareproperty-text"
}
}
]
}

Response

{
"type": "SoftwareAsset",
"id": 1,
"assetTypeName": "OS",
"assetId": "AST-3",
"name": "Software Asset Name",
"impactName": "Low",
"statusName": "In Use",
"origin": "manual",
"acquitionDate": "15-08-2020",
"tags": [
"tag-1",
"tag-2"
],
"customField": {
"number": 88,
"software-textbox": "software-text"
},
"createdDate": "19-10-2020 11:30",
"updatedDate": "19-10-2020 11:30",
"assetPropertyList": [
{
"id": 1,
"refName": "AST-3",
"type": "SoftwareProperty",
"softwareCost": 700,
"licenseKeys": null,
"executableFileNames": null,
"propertyCustomField": {
"softwareproperty-textbox": "softwareproperty-text"
}
}
],
"installationStatus": false
}

Non-IT Asset

Request

{
"type" : "NonITAsset",
"assetTypeName" : "non it assets$document",
"name" : "Non IT Asset Name",
"acquitionDate" : "15-08-2020 13:34",
"tags" : [
"tag-1",
"tag-2"
],
"customField" : {
"number" : 88,
"nonit-textbox" : "nonit-textbox"
}
}

Response

{
"type": "NonITAsset",
"id": 1,
"assetTypeName": "Document",
"assetId": "AST-4",
"name": "Non IT Asset Name",
"impactName": "Low",
"statusName": "In Use",
"origin": "manual",
"acquitionDate": "15-08-2020",
"tags": [
"tag-1",
"tag-2"
],
"customField": {
"number": 88,
"nonit-textbox" : "nonit-textbox"
},
"createdDate": "19-10-2020 11:33",
"updatedDate": "19-10-2020 11:33"
}

Catalog APIs

Get Product Catalog

Search (Post Method): BaseURL/api/v1/asset/searchproduct?offset=0&size=25

Request payload example

{
“productName” : “value”
}

Response Data

Product ID, Product Name, Product Type, Manufacturer Name , Product Description

Response Data Example

{
"objectList": [
{
"id": “value”,
"productId": "value",
"productName": "value",
"productTypeName": "value",
"description": "value",
"manufacturerName": "value"
},
{
"id": “value”,
"productId": "value",
"productName": "value",
"productTypeName": "value",
"description": "value",
"manufacturerName": "value"
}
],
"totalCount": value
}

Note: productName in request payload is optional, you can also pass empty request body.

Get Vendor Catalog

Search (Post Method) : BaseURL/api/v1/asset/searchvendor?offset=0&size=25

Request payload example

{
“vendorName” : “value”
}

Response Data

Vendor ID, Vendor Name, Vendor Email Address, Contact Person, Contact Number, Vendor Description

Response Data Example

{
"objectList": [
{
"id": “value”,
"vendorName": "value",
"vendorId": "value",
"contactPersonName": "value",
"contactNumber": "value",
"email": "value”,
"description": "value"
},
{
"id": “value”,
"vendorName": "value",
"vendorId": "value",
"contactPersonName": "value",
"contactNumber": "value",
"email": "value”,
"description": "value"
}
],
"totalCount": value
}

Note: vendorName in request payload is optional, you can also pass empty request body.

POST Search an Asset

For Asset search there are basically 3 types of API divided for Hardware, Software and Non It Asset where, you can call the below endpoints to search any asset in the ServiceOps Solution.

  1. Hardware Asset : 'http://{server_url}/api/v1/asset/asset_hardware/search/byqual?offset=0&size=50'
  2. Software Asset : 'http://{server_url}/api/v1/asset/asset_software/search/byqual?offset=0&size=50'
  3. Non IT Asset : 'http://{serverurl}/api/v1/asset/asset_non_it/search/byqual?offset=0&size=50'

Here is an example of Search with IP Address on the Hardware asset:

Request

curl --request POST
--url 'http://127.0.0.1/api/v1/asset/asset_hardware/search/byqual?offset=0&size=50'
-H 'Accept: application/json'
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODg3Njg5ODIsInVzZXJfbmFtZSI6Im5pcmF2LnBhdGVsQG1vdGFkYXRhLmNvbSIsImp0aSI6IjI5MWUxN2RjLWIzNzktNDZjMy1iZmM2LTllZDMwZWM5YTFkNyIsImNsaWVudF9pZCI6ImZsb3RvLXdlYi1hcHAiLCJzY29wZSI6WyJOTy1TQ09QRSJdLCJ0ZW5hbnRJZGVudGlmaWVyIjoiYXBvbG8ifQ.kAdJ1hDK0bN3DDmI6mKyfQpqKfcnZELgatriHWTpQ'
-H 'Content-Type: application/json'
--data-binary '{ "qualDetails": { "type": "FlatQualificationRest", "quals": [ { "type": "RelationalQualificationRest", "leftOperand": { "type": "DbOperandRest", "key": "ipAddress" }, "operator": "in_case_insensitive", "rightOperand": { "type": "ValueOperandRest", "value": { "type": "ListStringValueRest", "value": [ "172.16.10.1" ] } } } ] }}'

Response

{
"objectList": [
{
"type": "HardwareAssetRest",
"id": 1,
"updatedById": 1,
"updatedTime": 1588600717681,
"createdById": 1,
"createdTime": 1588598464114,
"assetTypeId": 1,
"displayName": "asdasdasd",
"origin": "manual",
"model": "asset_hardware",
"inReview": false,
"ipAddress": "1.1.1.1",
"name": "AST-1"
}
],
"totalCount": 1
}

POST Search a Request

{{server-url}}/v1/request/search/byqual?offset=0&size=25

You can call the above endpoint to search a request in the ServiceOps system. When you search a request, you get a reference filename, which you can pass in the body while creating or updating a request ticket; this associates the file with the ticket.

You need the following key-values:

Header

Key Description
Authorization Bearer {access token obtained after authorization}

Body

Key Description
type value

Example (Request & Response)

Request

curl --request POST --url 'http://192.16.1.108/api/v1/request/search/byqual?offset=0&size=50'
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODUxNTk0MTksInVzZXJfbmFtZSI6Im5pcmF2LnBhdGVsQG1vdGFkYXRhLmNvbSIsImp0aSI6ImZhZTY2YTdiLTY0NDQtNGY4OS1hNGNmLWZmOGY3NDIyMThhZiIsImNsaWVudF9pZCI6ImZsb3RvLXdlYi1hcHAiLCJzY29wZSI6WyJOTy1TQ09QRSJdLCJ0ZW5hbnRJZGVudGlmaWVyIjoiYXBvbG8ifQ.i65Huu91E5xP2fXk7hY45VBN1wZSRhvDAT1WRCqcuRw'
--header "Content-type: application/json"
--data '{
"qualDetails": {
"type": "FlatQualificationRest",
"quals": [
{
"type": "RelationalQualificationRest",
"leftOperand": {
"type": "VariableOperandRest",
"value": "requester_email"
},
"operator": "in",
"rightOperand": {
"type": "ValueOperandRest",
"value": {
"type": "ListStringValueRest",
"value": [
"bill@motadata.com"
]
}
}
},
{
"type": "RelationalQualificationRest",
"leftOperand": {
"type": "PropertyOperandRest",
"key": "request.supportLevel"
},
"operator": "in",
"rightOperand": {
"type": "ValueOperandRest",
"value": {
"type": "ListEnumValueRest",
"value": [
"tier1",
"tier2"
]
}
}
}
]
}
}'

Response

{
"objectList": [
{
"id": 1000,
"createdTime": 1585113980027,
"updatedTime": 1585113980405,
"requesterEmail": "rosy@motadata.com",
"requesterName": "Rosy",
"ccEmailSet": [],
"subject": "Sunt molestiae similique repudiandae.",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"tags": [],
"source": "Technician Portal",
"fileAttachments": [],
"spam": false,
"supportLevel": "tier1",
"name": "INC-1000"
}
],
"totalCount": 919
}

PATCH Update a Request

{{server-url}}/api/v1/request/{{request-Id}}

You can update the details of an existing request ticket by calling the above endpoint with the request ID. You have to pass the following key-values:

Header

Key Description
Authorization Bearer {access token obtained after authorization}
Content-Type application/json

Body

Key Value Type Description
subject* String Subject of the ticket.
categoryName String Category Name of a Request. Set to ‘Request’ as it is default to ‘Service Request’.
ccEmailSet String Array Email Address of People to whom notification is to be sent for certain events on Request.
tags String Array These are additional identifiers attached to a ticket. It is a list that can contain n number of STRINGS.
impactName String Describes the effect of the Request. Possible values are: Low, On User , On department, Or On Business.
priorityName String Shows the importance of the Request. Possible values are: Low, Medium, High, or Urgent.
urgencyName String Marks the request as urgent. Possible values are: Low, Medium, High, or Urgent.
departmentName String Additional information about the ticket.
locationName String Name of the Location where Request happened. Note that Location Must Exist with same name.
supportLevel String Describes the level of the provisioned support. Possible Values are: Tier1, Tier2, Tier3, or Tier 4.
Assignee Email String Name of the Assignee.
Technician Group Name String Name of the group to which the Technician belongs.
spam Boolean Possible Values are True or False.
fileAttachments Object Array Reference File Name of attachments for a Request. For example:[ { “refFileName” : “abc”, “realName” : “xyz.pdf” } ]
statusName String Possible values are Open, In Progress, Pending, Resolved, and Closed.
customField MAP:{key: STRING, value: OBJECT} This key is related to custom fields. Example “customField”: {“New Dropdown”: “1”, “New Number”: 110.1,”New Text Area”: “a11”, “New Text Input”: “111”}

Example (Request & Response)

Request

curl --request PATCH \
--url 'http://{{server-url}}/api/request/{{request-Id}}' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiJqb2huQGZsb3RvbWF0ZS5jb20iLCJzY29wZSI6WyJvdGhlci1hcGktc2NvcGUiXSwiZXhwIjoxNTM2MjM4NjYwLCJhdXRob3JpdGllcyI6WyJVU0VSIl0sImp0aSI6IjAzZGI3ZmI0LTVmNjUtNGM2Ny1hZTJkLTk4ODkyYzRiNzI3NyIsImNsaWVudF9pZCI6IlRyaXBBcHAtY2xpZW50In0.frXc5yUhA2QDRmTEQW9_kqQV0y7zjqImYMLMqzf2pZ8' \
--header 'Content-Type: application/json' \
--data '{
"statusName":"Resolved"
}'

Response

{
"id": 1,
"createdTime": 1584699527485,
"updatedTime": 1584699528033,
"requesterEmail": "a@b.com",
"requesterName": "utsav",
"ccEmailSet": [
"a@b.com"
],
"subject": "asdasd",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"tags": [],
"customField": {},
"source": "Technician Portal",
"spam": false,
"departmentName": "IT",
"supportLevel": "tier1",
"name": "INC-1"
}

GET a Request

{{server-url}}/api/v1/request/{{Request-Id}}

You can fetch the details of a request ticket by calling the above endpoint with the ticket ID.

You need the following key-values:

Header

Key Description
Authorization Bearer {access token obtained after authorization}

Example (Request & Response)

Request

curl --request GET \
--url 'http://192.168.0.107/api/request/1'

Response

{
"id": 1,
"createdTime": 1584699527485,
"updatedTime": 1584699528033,
"requesterEmail": "a@b.com",
"requesterName": "utsav",
"ccEmailSet": [
"a@b.com"
],
"subject": "asdasd",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"tags": [],
"customField": {},
"source": "Technician Portal",
"spam": false,
"departmentName": "IT",
"supportLevel": "tier1",
"name": "INC-1"
}

POST Upload an Attachment

{{server-url}}/api/upload/file

You can call the above endpoint to upload a file in the ServiceOps system. When you upload a file, you get a reference filename, which you can pass in the body while creating or updating a request ticket; this associates the file with the ticket.

You need the following key-values:

Header

Key Description
Authorization Bearer {access token obtained after authorization}

Body

Key Description
file Attachment

Example (Request & Response)

Request

Upload an Attachment

Response

{
refFileName: "1584699013102"
realName: "Screenshot.png"
name: "1584699013102"
}

How to Create Request Using REST API

A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET and POST. {Product} allows third party clients to create Requests using REST API.

Prerequisite

Before using REST API, you have to create an API Client.

Creating a Request?

  • Go to Admin > Automation > Integrations > Rest Integration.
  • Copy Client ID and Client Secret from the Integration page as shown in the below:
Client ID and Secret Key
Client ID and Secret Key
  • Use the credentials (Client ID and Secret) to acquire the access token. The user credentials are required, if the Access Level is selected as Specific User.
  • If the Access Level is selected as Any User, any technician registered in the system can use the REST API.
  • You will receive an access token from the server as shown below:
Access Token
Access Token
  • Now you can create an request using the API path. Below is the API path for creating a request.

    APIhttp://{{server-url}}/api/v1/request

    HTTP Method: POST

    Header:

    Key: Authorization

    Value: Bearer {access_token}

Keys Value Type Description
subject* String Subject of the ticket.
categoryName String Category Name of a Request. Set to ‘Request’ as it is default to ‘Service Request’
requesterEmail* String Email address of the user registered for the client.
ccEmailSet String Array Email Address of People to whom notification is to be sent for certain events on Request
tags String Array These are additional identifiers attached to a ticket. Its a list that can contain n number of STRINGS.
impactName String Describes the effect of the Request. Possible values: Low, On User , On department, Or On Business
priorityName String Shows the importance of the Request. Possible values: Low, Medium, High or Urgent
urgencyName String Marks the request as urgent. Possible values: Low, Medium, High or Urgent
departmentName String Additional information about the ticket.
locationName String Name of the Location where Request happened. Note that Location Must Exist with same name
supportLevel String Describes the level of the provisioned support. Possible Values: Tier1, Tier2, Tier3 or Tier 4
spam Boolean Possible Values are True or False
source String It shows the origin of the ticket. The Source can be either Support Portal or the Technician portal. Default source for Rest API is ‘External’.
fileAttachments Object Array Reference File Name of attachments for a Request. For example:[ { “refFileName” : “abc”, “realName” : “xyz.pdf” } ]
statusName String Possible values are Open, In Progress, Pending, Resolved, Closed
linkAssetIds Object Array Add asset id with model name. For example :”linkAssetIds”: [{“assetModel”: “asset_hardware”,”assetId”: 1}]
customField MAP:{key: STRING, value: OBJECT} This key is related to custom fields. Example “customField”: {“New Dropdown”: “1”, “New Number”: 110.1,”New Text Area”: “a11”, “New Text Input”: “111”}
Note: Here, User refers to the one registered with the Client.

Request

{
"requesterEmail": "a@b.com",
"ccEmailSet": [
"a@b.com"
],
"subject": "asdasd",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"departmentName":"IT",
"spam":false,
"supportLevel":"tier2",
"customField": {
"New Dropdown": "1",
"New Number": 110.1,
"New Text Area": "a11",
"New Text Input": "111"
},
"name": "INC-1",
"tags": ["asdasd"]
}

Response

{
"id": 1,
"createdTime": 1584699527485,
"updatedTime": 1584699528033,
"requesterEmail": "a@b.com",
"requesterName": "utsav",
"ccEmailSet": [
"a@b.com"
],
"subject": "asdasd",
"impactName": "Low",
"priorityName": "Low",
"statusName": "Open",
"urgencyName": "Low",
"tags": [],
"customField": {},
"source": "Technician Portal",
"spam": false,
"departmentName": "IT",
"supportLevel": "tier1",
"name": "INC-1"
}

  • Your Request is created on returning success.

Technician Rest API

Date format : dd-MM-yyyy HH:mm

Field Name Field Type Field Applicable For Detail Specification
name String Technician, Requester Name of user.
email String Technician, Requester Email of user.
departmentName String Technician, Requester
locationName String Technician, Requester
roles String Array Technician User Roles
accessLevel String Technician User Access Level , Possible Values: global_access, group_access, restricted.
contactNo String Technician, Requester
altContactNo1 String Technician, Requester
altContactNo2 String Technician, Requester
supportLevel String Technician Describes the level of the provisioned support. Possible Values: Tier1, Tier2, Tier3, or Tier 4.
userLogOnName String Technician, Requester User Log On Name
verified Boolean Technician, Requester Only For Get API
vipRequester Boolean Requester
customField Key-Value Pair Technician, Requester

Post Create Technician

Create (Post Method) : http://{{server-url}}/api/v1/technician

Request

curl --location --request POST 'http://172.16.8.220/api/v1/technician' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Harsh Bhatia",
"email": "harsh.bhatia1@motadata.com",
"userLogOnName": "Logon101",
"contactNo": "8905063002",
"locationName": "Asia",
"departmentName": "HR",
"manager": "raghav.bhatia@motadata.com",
"altContactNo1":"7816093148",
"altContactNo2":"9781943310",
"verified": false,
"supportLevel": [
"tier4"
],
"roles": [
"Super Admin"
],
"accessLevel": "global_access"
"customField": {
"Nickname": "Harsh",
"City": "Ahmedabad"
}
}'

Response

{
"id": 18,
"email": "harsh.bhatia1@motadata.com",
"roles": [
"Super Admin"
],
"locationName": "Asia",
"contactNo": "8905063002",
"altContactNo1": "7816093148",
"altContactNo2": "9781943310",
"departmentName": "HR",
"supportLevel": [
"tier4"
],
"userLogOnName": "Logon101",
"verified": false,
"name": "Harsh Bhatia"
}

Patch Update Technician

http://{{server-url}}/api/v1/technician/{id}

Request

curl --location --request PATCH 'http://172.16.8.220/api/v1/technician/18' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Update"
}'

Response

{
"id": 18,
"email": "harsh.bhatia1@motadata.com",
"roles": [
"Super Admin"
],
"locationName": "Asia",
"contactNo": "8905063002",
"altContactNo1": "7816093148",
"altContactNo2": "9781943310",
"departmentName": "HR",
"supportLevel": [
"tier4"
],
"userLogOnName": "Logon101",
"verified": false,
"name": "Update"
}

GET Technician

http://{{server-url}}/api/v1/technician/{id}

Request

curl --location --request GET 'http://172.16.8.220/api/v1/technician/18' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--data-raw ''

Response

{
"id": 18,
"email": "harsh.bhatia1@motadata.com",
"roles": [
"Super Admin"
],
"locationName": "Asia",
"contactNo": "8905063002",
"altContactNo1": "7816093148",
"altContactNo2": "9781943310",
"departmentName": "HR",
"supportLevel": [
"tier4"
],
"userLogOnName": "Logon101",
"verified": false,
"name": "Update"
}

Convert Technician to Requester

http://{{server-url}}/api/v1/technician/converttorequester/{id}

Request

curl --location --request GET 'http://172.16.8.220/api/v1/technician/converttorequester/18' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--data-raw ''

Response

{
"id": 18,
"email": "1tech3motadata@yopmail.com",
"locationName": "Asia",
"contactNo": "8905003003",
"altContactNo1": "1905003203",
"altContactNo2": "2905003203",
"departmentName": "HR",
"manager": "harsh.bhatia@motadata.com",
"userLogOnName": "t3",
"vipRequester": false,
"technician": false,
"verified": false,
"name": "Tech 3 T"
}

Post Search a Technician

http://{{server-url}}/api/v1/technician/search

Request

curl --location --request POST 'http://172.16.8.220/api/v1/technician/search' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--header 'Content-Type: application/json' \
--data-raw '{
"manager": "harsh.bhatia@motadata.com",
}'

Response

{
"objectList": [
{
"id": 18,
"email": "1tech3motadata@yopmail.com",
"locationName": "Asia",
"contactNo": "8905003003",
"altContactNo1": "1905003203",
"altContactNo2": "2905003203",
"departmentName": "HR",
"manager": "harsh.bhatia@motadata.com",
"userLogOnName": "t3",
"vipRequester": false,
"technician": false,
"verified": false,
"name": "Tech 3 T"
}
],
"totalCount": 1
}

Delete a Technician

http://{{server-url}}/api/v1/technician/{id}

Request

curl --location --request DELETE 'http://172.16.8.220/api/v1/technician/24' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI3NzY1MiwianRpIjoiODJmZGQzN2UtNWI2Zi00OTlhLWIzZTAtZTRhNDBmZGVlNWNkIiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.mtAGKGyadGeSu4IRQCZ0rh6O4b-jHFCX-pX51P2cmxY' \
--data-raw ''

Response

{
"userMessage": "Technician has been Archived Successfully.",
"warningMessage": null,
"id": 24
}

Requester Rest API

Date Format : dd-MM-yyyy HH:mm

Field Name Field Type Field Applicable For Detail Specification
name String Technician, Requester Name of user.
email String Technician, Requester Email of user.
departmentName String Technician, Requester
locationName String Technician, Requester
roles String Array Technician User Roles
accessLevel String Technician User Access Level , Possible Values: global_access, group_access, restricted.
contactNo String Technician, Requester
altContactNo1 String Technician, Requester
altContactNo2 String Technician, Requester
supportLevel String Technician Describes the level of the provisioned support. Possible Values: Tier1, Tier2, Tier3, or Tier 4.
userLogOnName String Technician, Requester User Log On Name
verified Boolean Technician, Requester Only For Get API
vipRequester Boolean Requester
customField Key-Value Pair Technician, Requester

Post Create Requester

Create (Post Method) : http://{{server-url}}/api/v1/requester

Request

curl --location --request POST 'http://172.16.8.220/api/v1/requester' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Harsh Bhatia",
"email": "harsh.bhatia1@motadata.com",
"userLogOnName": "Logon101",
"contactNo": "8905063002",
"locationName": "Asia",
"departmentName": "HR",
"manager": "raghav.bhatia@motadata.com",
"altContactNo1":"7816093148",
"altContactNo2":"9781943310",
"verified": false,
"vipRequester": true,
"customField": {
"Nickname": "Harsh",
"City": "Ahmedabad"
}
}'

Response

{
"id": 17,
"email": "harsh.bhatia1@motadata.com",
"locationName": "Asia",
"contactNo": "8905063002",
"altContactNo1": "7816093148",
"altContactNo2": "9781943310",
"departmentName": "HR",
"userLogOnName": "Logon101",
"vipRequester": true,
"technician": false,
"verified": false,
"name": "Harsh Bhatia"
}

Patch Update Requester

http://{{server-url}}/api/v1/requester/{id}

Request

curl --location --request PATCH 'http://172.16.8.220/api/v1/requester/16' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "API UPD 102 13"
}'

Response

{
"id": 16,
"email": "harsh.tech@motadata.com",
"locationName": "Asia",
"contactNo": "8905003002",
"altContactNo1": "7816091148",
"altContactNo2": "9781944310",
"departmentName": "HR",
"manager": "harsh.bhatia@motadata.com",
"userLogOnName": "LogonTech01",
"vipRequester": false,
"technician": true,
"verified": false,
"name": "API UPD 102 13"
}

GET Requester

http://{{server-url}}/api/v1/requester/{id}

Request

curl --location --request GET 'http://172.16.8.220/api/v1/requester/16' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--data-raw ''

Response

{
"id": 16,
"email": "harsh.tech@motadata.com",
"locationName": "Asia",
"contactNo": "8905003002",
"altContactNo1": "7816091148",
"altContactNo2": "9781944310",
"departmentName": "HR",
"manager": "harsh.bhatia@motadata.com",
"userLogOnName": "LogonTech01",
"vipRequester": false,
"technician": true,
"verified": false,
"name": "API UPD 102 13"
}

Convert Requester to Technician

http://{{server-url}}/api/v1/requester/converttotechnician/{id}

Request

curl --location --request GET 'http://172.16.8.220/api/v1/requester/converttotechnician/17' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--data-raw ''

Response

{
"id": 17,
"email": "harsh.bhatia1@motadata.com",
"roles": [
"Request Specialist Technician"
],
"accessLevel": "global_access",
"locationName": "Asia",
"contactNo": "8905063002",
"altContactNo1": "7816093148",
"altContactNo2": "9781943310",
"departmentName": "HR",
"supportLevel": [],
"userLogOnName": "Logon101",
"verified": false,
"name": "Harsh Bhatia"
}

Post Search a Requester

http://{{server-url}}/api/v1/requester/search

Request

curl --location --request POST 'http://172.16.8.220/api/v1/requester/search' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI1NTI5MiwianRpIjoiOTNlNDQ1MGMtNjBhZC00NjE0LTg5OTItOTU1OWIxZWUwYTM1IiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.QOvpxH8Vde9EZbPjbTTtdMUS9sR7Xk8KMTjZYg3HPm4' \
--header 'Content-Type: application/json' \
--data-raw '{
"manager": "harsh.bhatia@motadata.com",
"name": "Req11"
}'

Response

{
"objectList": [
{
"id": 15,
"email": "api11motadata@yopmail.com",
"contactNo": "89050032011",
"altContactNo1": "12050032011",
"altContactNo2": "22050032011",
"manager": "harsh.bhatia@motadata.com",
"userLogOnName": "Logon11",
"vipRequester": true,
"technician": false,
"verified": false,
"name": "Req11"
}
],
"totalCount": 1
}

Delete a Requester

http://{{server-url}}/api/v1/requester/{id}

Request

curl --location --request DELETE 'http://172.16.8.220/api/v1/requester/24' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX25hbWUiOiJoYXJzaC5iaGF0aWFAbW90YWRhdGEuY29tIiwic2NvcGUiOlsib3RoZXItYXBpLXNjb3BlIl0sImxvZ2luX3NvdXJjZSI6Im5vcm1hbF9sb2dpbiIsImV4cCI6MTYwMzI3NzY1MiwianRpIjoiODJmZGQzN2UtNWI2Zi00OTlhLWIzZTAtZTRhNDBmZGVlNWNkIiwiY2xpZW50X2lkIjoiSEItY2xpZW50IiwidGVuYW50SWRlbnRpZmllciI6ImFwb2xvIn0.mtAGKGyadGeSu4IRQCZ0rh6O4b-jHFCX-pX51P2cmxY' \
--data-raw ''

Response

{
"userMessage": "Requester has been Archived Successfully.",
"warningMessage": null,
"id": 24
}