Item Creation API

JSON Item Creation API

Add new Items to KaiNexus with the JSON Item Creation API.

Two Line OfieNOTE: In order to create new Items via API, your organization must have the API Module enabled. Reach out to your Customer Success Manager to take advantage of this feature. 

Making Requests

Requests to KaiNexus Item API are sent to different variations of the following URL:

api.kainexus.com/api/public/v1/json/item

PUT requests to the URL allows you to create Items in KaiNexus. 

Creating multiple Items

To create multiples Items with JSON, execute a PUT request to this URL:

https://api.kainexus.com/api/public/v1/json/itemList

Creating an individual Item

To create an individual Item with JSON, execute a PUT request to this URL:

https://api.kainexus.com/api/public/v1/json/item

Authentication

The username will be "api" and the password will be the API Key. See this article for information on obtaining the API Key. 

If you are using Curl to make the API call, refer to the following Curl script example: 

curl -s -D - --user api:APIKEY https://api.kainexus.com/api/public/v1/json/item -d @FILEPATH -X PUT -H "Content-Type: application/json"

CAUTION: The file must be UTF-8 encoded.

Things to note:

  • The system will create a new Item if the Item's title does not match any existing Item. The following line must be included for each new Item: 
    "create if missing" = true
  • By default, anyone who would be notified a new Item created within KaiNexus will also be notified about new Items made with the Item Creation API.
    • To suppress these notifications for an Item included in your import, add the following line to that Item's code segment. This line must be added for each Item for which notification should be suppressed.
      "suppressNotifications": true
  • The item(s) being updated must be referenced by ID. Fields, Attributes, and Attribute Values can be referenced by name or ID.
  • Person Attributes can be referenced by username or ID.
  • Location Attributes can be referenced by name or ID.
  • To update an Attribute that belongs on a Weighted Score, the name or ID of the Weighted Score must be provided. 
  • A note can be included on Attribute Values that support notes.
  • Fields require a key to their value dependent on the Field's type.
    • 'dateValue' for date fields.
    • 'numericValue' for number fields.
    • 'value' for text fields.
  • Milestone Approver system Roles will be taken into account when using an API Key. Meaning, if your API Key does not have the same Role(s) as the one(s) listed as the only acceptable Approver(s) then this could result in a permissions error. 
  • Fields require a key to their value dependent on the Field's type. 
    • 'dateValue' for date fields.
    • 'numericValue' for number fields.
    • 'value' for text fields.
  • Milestone Approver system Roles will be taken into account when using an API Key. Meaning, if your API Key does not have the same Role(s) as the one(s) listed as the only acceptable Approver(s) then this could result in a permissions error. 

Example new Item submission:

{
"item": {
"templateName": "A3",
"summary": "API created A3",
"status": "NEW",
"createDate": "2020-07-08T05:00:00.000+0000",
"lastUpdateDate": "2020-07-08T05:00:00.000+0000",
"authors": [
  {
    "username": "greg"
  },
  {
    "username": "abby"
  }
]
}