Infraon API Guide
Product DocsSchemaAuthentication
  • Welcome
    • Base URL
    • Authorization
    • Responses
  • Modules
    • Schema
    • Authentication
    • Announcement
    • API Registration
    • Async Tasks
    • BusinessRule
    • BusinessServiceConfiguration
    • Service Catalogue
    • CMDBBlacklistWhitelist
    • CMDBCategory
    • CMDBConsumables
    • Ux
    • CMDBSoftwareLicense
    • Cmdb
    • CMDBRelation
    • CMDBSoftware
    • ContractManagement
    • Department
    • Events
    • Field Configuration
    • IMACD
    • Knowledge Base
    • Leaves
    • Chat
    • Marketplace
    • APIViewSet
    • BeepViewSet
    • SMSviewset
    • Suppressedviewset
    • Organization Location
    • Partner
    • Predicted Events
    • Requester
    • Service Feasibility Requests
    • Role Profile
    • Tag
    • Service_outage
    • Teams
    • Telecom Settings
    • Trap Configurations
    • User Profile
    • Vendor Managemment
    • Association Events
    • Device Template
    • Discovery Configuration
    • Jobs
    • MIB Explorer
    • Seasonal Events
    • IPAM
    • Log Grok Pattern Configuration
    • Log Pipeline Configuration
    • Log Integraion
    • Log Search
    • CLI Download Jobs
    • Configuration Profiles
    • Configuration Policies
    • Configuration Rules
    • Configuration Search
    • Configuration Template
    • Configuration Trigger
    • Jobs Account Audit
    • Manage Vulnerabilities
    • OS Image Download
    • Rule Group
    • Configuration Upload Jobs
    • Work Flow Jobs
    • Change
    • Checklist
    • Incident
    • Problem
    • Release
    • Request Process
    • Task
    • Models
Powered by GitBook
On this page
  1. Modules

ContractManagement

PreviousCMDBSoftwareNextDepartment

Gets a contract with the given id

get

This endpoint is used to fetch a contract details in the current organization

Authorizations
Path parameters
idstringRequired
Responses
200Success
application/json
get
GET /ux/common/contract/config/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "contract_id": "text",
  "contract_name": "text",
  "contract_type": "text",
  "display_id": "text",
  "expiry_date": "text",
  "vendor": "text",
  "manufacturer": "text",
  "contract_status": "text",
  "status": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "state": "text",
  "auto_renew": true,
  "contract_model": "text"
}

Deletes the contract with given id

delete

This endpoint is used to delete an existing contract for the current organization

Authorizations
Path parameters
idstringRequired
Responses
204
No response body
delete
DELETE /ux/common/contract/config/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
204

No response body

No content

Get ci contract relation

get

This endpoint is used to get ci contract map for a contract

Authorizations
Responses
200Success
application/json
get
GET /ux/common/contract/config/ci-contract-map/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "contract_id": "text",
  "contract_name": "text",
  "contract_type": "text",
  "display_id": "text",
  "expiry_date": "text",
  "vendor": "text",
  "manufacturer": "text",
  "contract_status": "text",
  "status": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "state": "text",
  "auto_renew": true,
  "contract_model": "text"
}

Gets options for the contract management

get

This endpoint is used to get options of contract management for the current organization

Authorizations
Responses
200Success
application/json
get
GET /ux/common/contract/config/options/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
{
  "contract_id": "text",
  "contract_name": "text",
  "contract_type": "text",
  "display_id": "text",
  "expiry_date": "text",
  "vendor": "text",
  "manufacturer": "text",
  "contract_status": "text",
  "status": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "state": "text",
  "auto_renew": true,
  "contract_model": "text"
}
  • GETGets a list of contracts
  • POSTCreates a new contract
  • GETGets a contract with the given id
  • PUTUpdate the contract with the given id
  • DELETEDeletes the contract with given id
  • POST/ux/common/contract/config/add-attachment/
  • GETGet ci contract relation
  • GETGets options for the contract management

Gets a list of contracts

get

This endpoint is used to fetch all the contract configurations in the current organization

Authorizations
Query parameters
items_per_pageintegerRequired

Items Per Page

pageintegerRequired

Page Number

reversebooleanOptional

Sorting Order

sortstringOptional

Sorting Key

Responses
200Success
application/json
get
GET /ux/common/contract/config/?items_per_page=1&page=1 HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Accept: */*
200Success
[
  {
    "contract_id": "text",
    "contract_name": "text",
    "contract_type": "text",
    "display_id": "text",
    "expiry_date": "text",
    "vendor": "text",
    "manufacturer": "text",
    "contract_status": "text",
    "status": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "state": "text",
    "auto_renew": true,
    "contract_model": "text"
  }
]

Creates a new contract

post

This endpoint is used to save a new contract for the current organization

Authorizations
Body
Other propertiesanyOptional
Responses
201
No response body
post
POST /ux/common/contract/config/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "contract_name": "Software contract",
  "contract_model": "software"
}
201

No response body

No content

Update the contract with the given id

put

This endpoint is used to update a contract for the current organization

Authorizations
Path parameters
idstringRequired
Body
Other propertiesanyOptional
Responses
201
No response body
put
PUT /ux/common/contract/config/{id}/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "contract_id": null,
  "contract_name": "software edit"
}
201

No response body

No content

post

API endpoint that allows users to be viewed or edited.

Authorizations
Body

Serializer for Documents.

Recognized primitve fields:

* ``StringField``
* ``URLField``
* ``EmailField``
* ``IntField``
* ``LongField``
* ``FloatField``
* ``DecimalField``
* ``BooleanField``
* ``DateTimeField``
* ``ComplexDateTimeField``
* ``ObjectIdField``
* ``SequenceField`` (assumes it has integer counter)
* ``UUIDField``
* ``GeoPointField``
* ``GeoJsonBaseField`` (all those fields)
* ``DateField``

Compound fields: ListField and DictField are mapped to corresponding DRF fields, with respect to nested field specification.

The ReferenceField is handled like ForeignKey in DRF: there nested serializer autogenerated if serializer depth greater then 0, otherwise it's handled by it's own (results as str(id)).

For EmbeddedDocumentField also nested serializer autogenerated for non-zero depth, otherwise it is skipped. TODO: THIS IS PROBABLY WRONG AND SHOULD BE FIXED.

Generic fields GenericReferenceField and GenericEmbeddedDocumentField are handled by their own with corresponding serializer fields.

Not well supported or untested:

``FileField``
``ImageField``
``BinaryField``

All other fields are mapped to DocumentField and probably will work wrong.

contract_idstringOptional
contract_namestring · max: 255Optional
contract_typestringRead-onlyRequired
display_idstring · max: 255Optional
expiry_datestringRead-onlyRequired
vendorstringRead-onlyRequired
manufacturerstringOptional
contract_statusstringRead-onlyRequired
statestringRequired
auto_renewbooleanOptional
contract_modelstring · max: 255Optional
Responses
200Success
application/json
post
POST /ux/common/contract/config/add-attachment/ HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 192

{
  "contract_id": "text",
  "contract_name": "text",
  "display_id": "text",
  "manufacturer": "text",
  "status": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "state": "text",
  "auto_renew": true,
  "contract_model": "text"
}
200Success
{
  "contract_id": "text",
  "contract_name": "text",
  "contract_type": "text",
  "display_id": "text",
  "expiry_date": "text",
  "vendor": "text",
  "manufacturer": "text",
  "contract_status": "text",
  "status": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "state": "text",
  "auto_renew": true,
  "contract_model": "text"
}