Dies ist eine alte Version des Dokuments!


rs-cmdb API documentation

HTTP Request methods

rs-cmdb REST API uses standard HTTP methods as described in the table below

Method Action Notes
GET read show object information
POST create create objects
PUT write change object attributes
PATCH change special predefined changes at objects
DELETE delete delete objects

Request structure

<HTTP_METHOD> /rest/<IF_NAME>/<object>[/...] HTTP/1.1

Output format

rs-cmdb REST API supports JSON format.
Typically, the output contains the requested data only. For debugging purposes additional meta information can be delivered by switching it on in the interface configuration.

Authentication

API uses a token for each session to manage the access to the interface. Receiving a token needs authentication with a pre shared key (PSK) and a valid username with password. Authentication is done via “authorization” HTTP header. The received token must be delivered in each request as “token” in the HTTP header. Exceptional, the token can be delivered as plain text instead of embedding it in JSON.

PSK and further parameters have to be aligned in the interface (IF) definition.

Method URL Notes
POST /rest/{IF}/token/{PSK} log on to the API and returns the token
GET /rest/{IF}/token return expiration date and time
PATCH /rest/{IF}/token prolongs the expiration of the token
DELETE /rest/{IF}/token log off from API and cleaning up the session
Example
$ curl -X POST --user user:password https://demo.rscmdb.de/rest/sample/token/psk
{"token":"1s8edkoitj38j9l3lkvrv9fmn7","expires":"2024-10-26 19:44:18"}

$ curl -X GET https://demo.rscmdb.de/rest/sample/token --header "token: 1s8edkoitj38j9l3lkvrv9fmn7"
{"expires":"2024-10-26 19:44:18"}

Objects

The list of objects depends on the actual interface definition. Some of the objects may not be available in every implementation. Also the visibility of the objects depends on the user rights.

Object Drescription
address postal addresses for area object
area object to manage geographical area dependencies, anchor for physical staff (i.e. devices)
asnr documentation of AS-numbers
cabinet
device Management of devices and device names
devtype
dhcpoption object to manage DHCP optione depending to IP networks
dhcprange object to manage DHCP-ranges depending to IP networks
group Group management
ipaddr object to manage IP addresses (V4)
iparea object to manage IP container information, related to nearea objects
ipnet object to manage IP-Networks (V4)
ipservice
license Documentation and management of software licenses
natip object to manage NAT IP assignments (also accessible with ipnet object)
natpool object to manage IP networks containing NAT IP addresses
netarea object to manage logical network related structures, container for ipareas
realm object to manage realm information and dependencies
request Request handling
software Documentation and management of software (i.e. applications, operating systems)
tenant object to manage tenant information and dependencies
user User management
vlan Management of VLAN information and assignments
vlandomain Mangement of VLAN-Domains
vrf VRF management

ipservice object

license object

natip object

natpool object

netarea object

Method URL Notes
GET /rest/{IF}/netarea returns a list of all netareas
GET /rest/{IF}/netarea/{id} Information about a single netarea
GET /rest/{IF}/netarea/{id}/netarea returns a list of all netareas below the selected in the tree
GET /rest/{IF}/netarea/{id}/iparea returns the assigned ipareas
GET /rest/{IF}/netarea/{id}/vlandomain returns the assigned vlandomains
GET /rest/{IF}/netarea/{id}/vlan returns a list of all vlans assigned to the netarea
GET /rest/{IF}/netarea/{id}/ipnet returns a list of all ipnets assigned to the netarea
available parameters
Parameter Type Method Notes
id int GET, PUT, DELETE unique identifier of the object
name string POST,PUT netarea's name, unique per hierarchy level
notes text POST, PUT Description
plancount int POST, PUT Number of planned users in the netarea
tcontact string POST, PUT name, UPN, etc. of the technical contact of this netarea
area_id int POST link to the geographical area
netarea_id int POST link to the predecessor in the netarea-hierarchy

<< zurück

realm object

request object

software object

tenant object

user object

vlan object

vlandomain object

vrf object