In this article we explain the i-doit JSON-RPC API in depth. If you want to know what parameters must/can be set for each method and what a typical response looks like, this will be the right resource.

Contents

Namespace idoit

This namespace is reserved for common methods.

idoit.search

Search in i-doit

Request parameters

KeyJSON data typRequiredDescription
qStringYesQuery, for example: "My little server"

Response

JSON key result contains an array of JSON objects. Each object contains a search result.

KeyJSON data typeDescription
documentIDStringIdentifier
keyStringAttribute which relates to query
valueStringValue which relates to query
typeStringAdd-on or core feature
linkStringRelative URL which directly links to search result
scoreIntegerScoring (deprecated)

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "idoit.search",
    "params": {
        "q": "My little server",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

 Body:

{
    "jsonrpc": "2.0",
    "result": [
        {
            "documentId": "1000",
            "key": "Virtual Host > Global > Title",
            "value": "My little server",
            "type": "cmdb",
            "link": "/?objID=1000&catgID=1&cateID=1029&highlight=My%20little%20server",
            "score": 0
        },
        […]
    ],
    "id": 1
}

idoit.version

Fetch information about i-doit and the current user

Request parameters

None

Response

JSON key result contains an JSON object with various information about i-doit itself and the current user.

KeyJSON data typeDescription
loginArrayInformation about the user who has performed the request; see below for details
login.useridStringObject identifier (as numeric string)
login.nameStringObject title
login.mailStringE-mail address (see category Persons → Master Data)
login.usernameStringUser name (see category Persons → Login)
login.mandatorStringTenant name
login.languageStringLanguage: "en" or "de"
versionStringVersion of installed i-doit
stepStringDev, alpha or beta release
typeStringRelease variant: "OPEN" or "PRO"

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "idoit.version",
    "params": {
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "login": {
            "userid": "9",
            "name": "i-doit Systemadministrator ",
            "mail": "i-doit@acme-it.example",
            "username": "admin",
            "mandator": "ACME IT Solutions",
            "language": "en"
        },
        "version": "1.10.2",
        "step": "",
        "type": "PRO"
    },
    "id": 1
}

idoit.constants

Fetch defined constants from i-doit

Request parameters

None

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
objectTypesObject

List of object types

Keys: object type constants

Values: translated object type titles

categoriesObject

List of global and specific categories

categories.gObject

List of global categories

Keys: category constants

Values: translated category titles

categories.sObject

List of specific categories

Keys: category constants

Values: translated category titles

Example

RequestReponse

Body:

{
    "version": "2.0",
    "method": "idoit.constants",
    "params": {
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "objectTypes": {
            "C__OBJTYPE__SERVER": "Server",
            […]
        },
        "categories": {
            "g": {
                "C__CATG__GLOBAL": "General",
                "C__CATG__MODEL": "Model",
                […]
            },
            "s": {
                "C__CATS__MONITOR": "Monitor",
                […]
            }
        }
    },
    "id": 1
}

idoit.login

Create new session

Request parameters

None

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
resultBooleanShould be true
useridStringObject identifier of logged-in user (as numeric string)
nameStringObject title of logged-in user
mailStringAttribute E-mail address in category Persons → Master Data
usernameStringAttribute User name in category Persons → Login
session-idStringGenerated session identifier
client-idStringTenant identifier (as numeric string)
client-nameStringTenant name

Example

RequestResponse

Header:

X-RPC-Auth-Username: admin
X-RPC-Auth-Password: admin

Body:

{
    "version": "2.0",
    "method": "idoit.login",
    "params": {
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Header:

X-RPC-Auth-Session: d1obs9m3d2pd8651grptjhdjg3

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "result": true,
        "userid": "9",
        "name": "i-doit Systemadministrator ",
        "mail": "i-doit@acme-it.example",
        "username": "admin",
        "session-id": "d1obs9m3d2pd8651grptjhdjg3",
        "client-id": "1",
        "client-name": "ACME IT Solutions"
    },
    "id": 1
}
RequestResponse

Header:

X-RPC-Auth-Session: d1obs9m3d2pd8651grptjhdjg3

Body:

{
    "version": "2.0",
    "method": "idoit.version",
    "params": {
        "apikey": "xxx",
        "language": "en"
    },
    "id": 2
}

Header:

X-RPC-Auth-Session: d1obs9m3d2pd8651grptjhdjg3

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "login": {
            "userid": "9",
            "name": "i-doit Systemadministrator ",
            "mail": "i-doit@acme-it.example",
            "username": "admin",
            "mandator": "ACME IT Solutions",
            "language": "de"
        },
        "version": "1.9",
        "step": "",
        "type": "PRO"
    },
    "id": 2
}
RequestResponse

Header:

X-RPC-Auth-Session: d1obs9m3d2pd8651grptjhdjg3

Body:

{
    "version": "2.0",
    "method": "idoit.logout",
    "params": {
        "apikey": "xxx",
        "language": "en"
    },
    "id": 3
}

Header:

X-RPC-Auth-Session: d1obs9m3d2pd8651grptjhdjg3

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "message": "Logout successfull",
        "result": true
    },
    "id": 3
}

idoit.logout

Close current session

Request parameters

None

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
messageStringShould be "Logout successfull"
resultBooleanShould be true

Example

See method idoit.login

Namespace cmdb

This namespace is related to all CMDB-specific methods like handling objects and categories.

cmdb.object.create

Create new object with some optional information

Request parameters

KeyJSON data typeRequiredDescription
typeString|IntegerYes

Object type constant as string, for example: "C__OBJTYPE__SERVER"

Alternatively, object type identifier as integer, for example: 5

titleStringYesObject title, for example: "My little server"
categoryStringNoAttribute Category in category Global
purposeStringNoAttribute Purpose in category Global, for example: "In production"
cmdb_statusString|IntegerNo

Attribute CMDB status in category Global by its constant (string), for example: "C__CMDB_STATUS__IN_OPERATION"

Alternatively, by its identifier (integer), for example: 6

descriptionStringNoAttribute Description in category Global

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
idStringObject identifier (as numeric string)
messageStringSome information
successBooleanShould always be true

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.create",
    "params": {
        "type": "C__OBJTYPE__SERVER",
        "title": "My little server",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

 {
    "jsonrpc": "2.0",
    "result": {
        "id": "42",
        "message": "Object was successfully created",
        "success": true
    },
    "id": 1
}

cmdb.object.read

Read common information about an object

Request parameters

KeyJSON data typeRequiredDescription
idIntegerYesObject identifier; for example: 42

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
idStringObject identifier (as numeric string)
titleStringObject title
sysidStringSYSID (see category Global)
objecttypeStringObject type identifier (as numeric string)
createdStringDate of creation; format: Y-m-d H:i:s
updatedString

Date of last update; format: Y-m-d H:i:s

Note: This key is optional because not every object has been updated before.

type_titleStringTranslated name of object type
type_iconStringRelative URL to object type icon
statusString

Object status:

  • C__RECORD_STATUS__BIRTH
    Status-ID = 1
    Title = 
    Unfinished
  • C__RECORD_STATUS__ARCHIVED
    Status-ID = 2

    Title = Normal
  • C__RECORD_STATUS__ARCHIVED
    Status-ID = 3

    Title = Archived
  • C__RECORD_STATUS__DELETED
    Status-ID = 4

    Title = Deleted
  • C__RECORD_STATUS__TEMPLATE
    Status-ID = 6

    Title = Template
  • C__RECORD_STATUS__MASS_CHANGES_TEMPLATE
    Status-ID = 7

    Title = Mass change template
cmdb_statusStringCMDB status (see category Global; as numeric string)
cmdb_status_titleStringTranslated CMDB status (see category Global)
imageStringURL to object picture

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.read",
    "params": {
        "id": 1000,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

 {
    "jsonrpc": "2.0",
    "result": {
        "id": "1000",
        "title": "ESXi1",
        "sysid": "VHOST_1426338622",
        "objecttype": "58",
        "type_title": "Virtual host",
        "type_icon": "images/icons/silk/server_database.png",
        "status": "2",
        "cmdb_status": "6",
        "cmdb_status_title": "in operation",
        "created": "2015-03-14 14:10:22",
        "updated": "2017-04-26 10:22:20",
        "image": "http://demo.synetics.int/pro/images/objecttypes/server.png"
    },
    "id": 1
}

cmdb.object.update

Change object e.g title of a object

Request parameters

KeyJSON data typeRequiredDescription
idIntegerYesObject identifier, for example: 42
titleStringYesNew object title, for example: "Your little server"

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
messageStringShould be
successBooleanShould be true

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.update",
    "params": {
        "id": 42,
        "title": "Your little server",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "message": "Object title was successfully updated",
        "success": true
    },
    "id": 1
}

cmdb.object.delete

Deletes a object

Request paramters

KeyJSON data typeRequiredDescription
idIntegerYesObject identifier, for example: 42
statusStringYes

Status constant:

  • "C__RECORD_STATUS__ARCHIVED": Archive object
  • "C__RECORD_STATUS__DELETED": Mark object as deleted
  • "C__RECORD_STATUS__PURGE": Purge object from database

Response

JSON key result contains a JSON object.

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.delete",
    "params": {
        "id": 42,
        "status": "C__RECORD_STATUS__ARCHIVED",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "message": "Object(s) successfully archived!",
        "success": true
    },
    "id": 1
}

cmdb.object.recycle

Recyles a object

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 464

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.recycle",
    "params": {
        "object": 464,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Object 464 has been recycled."
    }
}

cmdb.object.archive

Archives a object

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 464

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.archive",
    "params": {
        "object": 464,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Object 464 has been archived."
    }
}

cmdb.object.purge

Purges a object

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 464

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.purge",
    "params": {
        "object": 464,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Object 464 has been purged."
    }
}

cmdb.object.markAsTemplate

Set the Object condition as a Template

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 465

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.markAsTemplate",
    "params": {
        "object": 465,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Object 465 has been marked as template."
    }
}

cmdb.object.markAsMassChangeTemplate

Set the Object condition as a Mass Change Template

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 465

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.object.markAsMassChangeTemplate",
    "params": {
        "object": 465,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Object 465 has been marked as mass change template."
    }
}

cmdb.objects.read

Fetch a list of objects

Request parameters

KeyJSON data typeRequiredDescription
filterArrayNoFilter list of objects; see below for a full list of options
limitMixedNo

Maximum amount of objects (as integer), for example, fetch the first thousand of objects: 1000

Combine this limit with an offset (as string), for example, fetch the next thousand of objects: "1000,1000"

order_byStringNo

Order result set by (see filter for more details what each value means):

  • "isys_obj_type__id",
  • "isys_obj__isys_obj_type__id",
  • "type",
  • "isys_obj__title",
  • "title",
  • "isys_obj_type__title",
  • "type_title",
  • "isys_obj__sysid",
  • "sysid",
  • "isys_cats_person_list__first_name",
  • "first_name",
  • "isys_cats_person_list__last_name",
  • "last_name",
  • "isys_cats_person_list__mail_address",
  • "email",
  • "isys_obj__id", or
  • "id"
sortStringNoOnly useful in combination with key order_by; allowed values are either "ASC" (ascending) or "DESC" (descending)

Filter

KeyJSON data typeRequiredDescription
idsArrayNoList of object identifiers (as integers), for example: [1, 2, 3]
typeInteger|StringNo

Object type identifier (as integer), for example: 5

Alternatively, object type constant (as string), for example: "C__OBJTYPE__SERVER"

titleStringNoObject title (see attribute Title in category Global), for example: "My little server"
type_titleStringNo

Translated name of object type, for example: "Server"

Note: Set a proper language in your request.

sysidStringNoSYSID (see category Global), for example: "SRV_101010"
first_nameStringNoFirst name of an object of type Persons (see attribute First name in category Persons → Master Data), for example: "John"
last_nameStringNoLast name of an object of type Persons (see attribute Last name in category Persons → Master Data), for example: "Doe"
emailStringNo

Primary e-mail address of an object of type Persons, Person groups or Organization (see attribute E-mail address in categories Persons/Person groups/Organization → Master Data), for example: "john.doe@example.com"

You can use any combination of filters. Filters are logically associated with AND. A valid combination could be: "Give me all servers which have the same hostname."

Response

JSON key result contains an array of JSON objects. Each object contains a bunch of information about an i-doit object.

KeyJSON data typeDescription
idStringObject identifier (as numeric string)
titleStringObject title
sysidStringSYSID (see category Global)
typeStringObject type identifier (as numeric string)
createdStringDate of creation; format: Y-m-d H:i:s
updatedString

Date of last update; format: Y-m-d H:i:s

Note: This key is optional because not every object has been updated before.

type_titleStringTranslated name of object type
type_group_titleStringTranslated name of object type group
statusString

Object status:

  • C__RECORD_STATUS__BIRTH
    Status-ID = 1
    Title = 
    Unfinished
  • C__RECORD_STATUS__ARCHIVED
    Status-ID = 2

    Title = Normal
  • C__RECORD_STATUS__ARCHIVED
    Status-ID = 3

    Title = Archived
  • C__RECORD_STATUS__DELETED
    Status-ID = 4

    Title = Deleted
  • C__RECORD_STATUS__TEMPLATE
    Status-ID = 6

    Title = Template
  • C__RECORD_STATUS__MASS_CHANGES_TEMPLATE
    Status-ID = 7

    Title = Mass change template
cmdb_statusStringCMDB status (see category Global; as numeric string)
cmdb_status_titleStringTranslated CMDB status (see category Global)
imageStringURL to object picture

Example

RequestResponse

Body:

 {
    "version": "2.0",
    "method": "cmdb.objects.read",
    "params": {
        "filter": {
            "type": "C__OBJTYPE__SERVER",
			"status": "C__RECORD_STATUS__ARCHIVED",
			"cmdb_status_title": "in operation"
        },
        "limit": "0,10",
        "order_by": "title",
        "sort": "ASC",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": [
        {
            "id": "123",
            "title": "My little server",
            "sysid": "SRV_101010",
            "type": "5",
            "created": "2017-03-07 15:57:48",
            "updated": "2017-05-10 15:40:27",
            "type_title": "Server",
            "type_group_title": "Hardware",
            "status": "3",
            "cmdb_status": "6",
            "cmdb_status_title": "in operation",
            "image": "https://demo.i-doit.com/images/objecttypes/empty.png"
        },
        […]
    ]
}

cmdb.category.save

Create or Update  category entry of an object.

It works for multi-value categories and single-value category .

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 456

category

String

Yes

Category constant, for example: "C__CATG__ACCESS"

data

Object

Yes

{

 "title":”Name of the access”,

  "description":”description of the acces

}

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

entry

Integer

Entry identifier, for example: 35

Examples

Create

RequestResponse

Body:

 {
    "version": "2.0",
    "method": "cmdb.category.save",
    "params": {
        "object": 456,
        "data": {
            "title":”Name of the access”,
            "description":”description of the access”
        },
        "category": "C__CATG__ACCESS"
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Category entry successfully saved",          
        "entry": 35
    }
}


Or Update

RequestResponse

Body:

{
  "version": "2.0",
  "method": "cmdb.category.save",
  "params": {
    "object": 456,
    "data": {
      "manufacturer": "Name of manufacturer",
      "title": "Name of model"
    },
    "category": "C__CATG__MODEL",
    "entry": 24,
    "apikey": "xxx",
    "language": "en"
  },
  "id": 1
}

Body:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "success": true,
    "message": "Category entry successfully saved",
    "entry": 24
  }
}

cmdb.category.create

Create a new category entry

Request parameters

KeyJSON data typeRequiredDescription
objIDIntegerYesObject identifier, for example: 42
categoryStringYesCategory constant, for example: C__CATG__MODEL
dataObjectYes

Attributes with their values, for example:

{
    "manufacturer": "Name of manufacturer",
    "title": "Name of model"
}

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
idStringEntry identifier (as numeric string)
messageStringSome information
successBooleanShould always be true

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.category.create",
    "params": {
        "objID": 42,
        "data": {
            "manufacturer": "Name of manufacturer",
            "title": "Name of model"
        },
        "category": "C__CATG__MODEL",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

 {
    "jsonrpc": "2.0",
    "result": {
        "id": "123",
        "message": "Category entry successfully created.",
        "success": true
    },
    "id": 1
}

cmdb.category.read

Read one or more category entries for an object

Request parameters

KeyJSON data typeRequiredDescription
objIDIntegerYesObject identifier, for example: 42
categoryStringYesCategory constant, for example: "C__CATG__MODEL"

Response

JSON key result contains an array of JSON objects. Each object contains all available attributes for the requested category. Note: Even if it is a single-value category or a multi-value category with only 1 entry, the JSON key result contains always an array of JSON objects.

KeyJSON data typeDescription
idStringEntry identifier (as numeric string)
objIDStringObject identifier (as numeric string)
MixedOptional attributes with values depending on requested category

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.category.read",
    "params": {
        "objID": 1000,
        "category": "C__CATG__MODEL",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

 Body:

 {
    "jsonrpc": "2.0",
    "result": [
        {
            "id": "74",
            "objID": "1000",
            "manufacturer": {
                "id": "2",
                "title": "Lenovo",
                "const": null,
                "title_lang": "Lenovo"
            },
            "title": {
                "id": "1",
                "title": "ThinkServer RD350",
                "const": null,
                "title_lang": "ThinkServer RD350"
            },
            "productid": "",
            "service_tag": "",
            "serial": "123000999888",
            "firmware": "",
            "description": ""
        }
    ],
    "id": 1
}

cmdb.category.update

Update category entry of an object

Request parameters

KeyJSON data typeRequiredDescription
objIDIntegerYesObject identifier, for example: 42
categoryStringYesCategory constant, for example: "C__CATG__MODEL"
dataObjectYes

Attributes which will be updated

data.category_idIntegerNoEntry identifier (only required for multi-value categories)

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
successBooleanShould be true
messageStringShould be "Category entry successfully saved"

Example

RequestResponse

Body:

 {
    "version": "2.0",
    "method": "cmdb.category.update",
    "params": {
        "objID": 42,
        "category": "C__CATG__MODEL",
        "data": {
            "serial": "123abc"
        },
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Category entry successfully saved"
    },
    "id": 1
}

cmdb.category.delete

Archive a category entry for an object, mark it as deleted or purge it from database

Limitations

  • This only works with multi-value categories at the moment.
  • You can only archive category entries which have a normal status.
  • You can only mark category entries as deleted which are archived.
  • You can only purge category entries from the database which are marked as deleted.

Request parameters

KeyJSON data typeRequiredDescription
objIDIntegerYesObject identifier, for example: 42
categoryStringYesCategory constant, for example: "C__CATG__IP"
cateIDIntegerYesEntry identifier, for example: 3

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
successBooleanShould be true
messageStringSome information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.category.delete",
    "params": {
        "objID": 42,
        "category": "C__CATG__IP",
        "cateID": 3,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Category entry '3' successfully deleted"
    },
    "id": 1
}

cmdb.category.quickpurge

If Quickpurge is enabled, purge a category entry of an object directly from the database.

Request parameters

KeyJSON data typeRequiredDescription
objIDIntegerYesObject identifier, for example: 42
categoryStringYesCategory constant, for example: "C__CATG__IP"
cateIDIntegerYesEntry identifier, for example: 3

Response

JSON key result contains a JSON object.

KeyJSON data typeDescription
successBooleanShould be true
messageStringSome information

Example

RequestResponse

Body:

 {
    "version": "2.0",
    "method": "cmdb.category.quickpurge",
    "params": {
        "objID": 42,
        "category": "C__CATG__IP",
        "cateID": 3,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

 {
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Category entry '3' successfully purged"
    },
    "id": 1
}

cmdb.category.purge

Purge a category entry of an object.
It works for multi-value categories and single-value category .

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 456

category

String

Yes

Category constant, for example: "C__CATG__ACCESS"

entry

Integer

Yes

Entry identifier, for example: 33

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Examples

RequestResponse

Body:

 {
    "version": "2.0",
    "method": "cmdb.category.purge",
    "params": {
        "object": 456,
        "category": "C__CATG__ACCESS",
        "entry": 33,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Entry 33 has been successfully purged from 4 to 5."
    }
}


Or

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.category.purge",
    "params": {
        "object": 456,
        "category": "C__CATG__MODEL",
        "entry": 24,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Entry 24 has been successfully purged from 2 to 5."
    }
}

cmdb.category.recycle

Limitations

  • This only works with multi-value categories at the moment.
  • You can recycle  category entries which have archived or deleted status.

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 456

category

String

Yes

Category constant, for example: "C__CATG__ACCESS"

entry

Integer

Yes

Entry identifier, for example: 32

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.category.recycle",
    "params": {
        "object": 456,
        "category": "C__CATG__ACCESS",
        "entry": 32,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Entry 32 has been successfully recycled from 4 to 2."
    }
}

cmdb.category.archive

Limitations

  • This only works with multi-value categories at the moment.
  • You can only archive category entries which have a normal status.

Request parameters

Key

JSON data type

Required

Description

object

Integer

Yes

Object identifier, for example: 456

category

String

Yes

Category constant, for example: "C__CATG__ACCESS"

entry

Integer

Yes

Entry identifier, for example: 32

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

message

String

Some information

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.category.archive",
    "params": {
        "object": 456,
        "category": "C__CATG__ACCESS",
        "entry": 32,
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "message": "Entry 32 has been successfully archived from 2 to 3."
    }
}

cmdb.dialog.read

Read dialog informations.

Request parameters

Key

JSON data type

Required

Description

category

String

Yes

Category constant, for example: "C__CATG__CPU"

property

String


Attribute in the category, for example: “manufacturer”

Response

JSON key result contains an array of JSON objects.

Key

JSON data type

Description

id

Integer

Identifier

const

String

Constant of Dialog Attribute

title

String

Title of the Attribute

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.dialog.read",
    "params": {
        "category": "C__CATG__CPU",
        "property": "manufacturer",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
            "id": "1",
            "const": "",
            "title": "AMD"
        },
        {
            "id": "2",
            "const": "",
            "title": "Intel"
        }
    ]
}

cmdb.dialog.create

Created Dialogs.

Request parameters

Key

JSON data type

Required

Description

category

String

Yes

Category constant, for example: "C__CATG__CPU"

property

String

Yes

Attribute in the category, for example: “manufacturer”

value

String

Yes

Value of the Attribute

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

entry_id

Integer

Entry Identifier, for example: 3

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.dialog.create",
    "params": {
        "category": "C__CATG__CPU",
        "property": "manufacturer",
        "value": "IBM",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "entry_id": 3
    }
}

cmdb.dialog.update

Update a dialog entry.

Request parameters

Key

JSON data type

Required

Description

category

String

Yes

Category constant, for example: "C__CATG__CPU"

property

String

Yes

Attribute in the category, for example: “manufacturer”

value

String

Yes

Value of the Attribute

entry_id

String

Yes

Entry Identifier, for example: 3

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

entry_id

Integer/String

Entry Identifier, for example: 3

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.dialog.update",
    "params": {
        "category": "C__CATG__CPU",
        "property": "manufacturer",
        "entry_id": "3",
        "value": "IBM 2",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "entry_id": 3
    }
}

cmdb.dialog.delete

Deletes dialogs.

Request parameters

Key

JSON data type

Required

Description

category

String

Yes

Category constant, for example: "C__CATG__CPU"

property

String

Yes

Attribute in the category, for example: “manufacturer”

entry_id

String

Yes

Entry Identifier, for example: 3

Response

JSON key result contains a JSON object.

Key

JSON data type

Description

success

Boolean

Should be true

entry_id

Integer/String

Entry Identifier, for example: 3

Example

RequestResponse

Body:

{
    "version": "2.0",
    "method": "cmdb.dialog.delete",
    "params": {
        "category": "C__CATG__CPU",
        "property": "manufacturer",
        "entry_id": "3",
        "apikey": "xxx",
        "language": "en"
    },
    "id": 1
}

Body:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "success": true,
        "entry_id": "3"
    }
}

cmdb.reports.read

Display report.

Request parameters

None

Response

JSON key result contains an array of JSON objects.

Key

JSON data type

Description

id

String

Identifier

category

String

Attribute Category in category Global

title

String

Title of the report

description

String

Report Description

created

String

When was is it created

Examples

RequestResponse

Body:

{
  "version": "2.0",
  "method": "cmdb.reports.read",
  "params": {
    "apikey": "xxx",
    "language": "en"
  },
  "id": 1
}

Body:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "id": "11",
      "category": "Changes",
      "title": "Changed objects from today",
      "description": "Shows objects which have been created or changed for today. Relation objects are excluded.",
      "created": "2016-08-31 15:23:17"
    },
    {
      "id": "7",
      "category": "Changes",
      "title": "Changed objects last 24 hours",
      "description": "Shows objects which have been created or changed for the last 24 hours. Relation objects are excluded.",
      "created": "2016-08-31 15:09:36"
    },
    {
      "id": "8",
      "category": "Changes",
      "title": "Changed objects last 7 days",
      "description": "Shows objects which have been created or changed for the last 7 days. Relation objects are excluded.",
      "created": "2016-08-31 15:11:29"
    }
  ]
}


Or you can also use the parameter “id” in your request  to get the corresponding report

Request parameters


Key

JSON data type

Description

id

String

Identifier

Response

JSON key result contains an array of JSON objects..

RequestResponse

Body:

{
  "version": "2.0",
  "method": "cmdb.reports.read",
  "params": {
    "id": "3",
    "apikey": "xxx",
    "language": "en"
  },
  "id": 1
}

Body:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "Title": "backup001",
      "Object type": "LC__CMDB__OBJTYPE__SERVER",
      "Last change": "<span data-date=\"2020-02-14 08:34:02\" class=\"hide\"></span>2020-02-14 - 08:34",
      "Last change by": "admin"
    },
    {
      "Title": "Backup Server",
      "Object type": "LC__CMDB__OBJTYPE__VIRTUAL_SERVER",
      "Last change": "<span data-date=\"2020-02-14 08:23:50\" class=\"hide\"></span>2020-02-14 - 08:23",
      "Last change by": "admin"
    }
  ]
}