Add a New Record

The various details of how to add a new record is explained in this section.

HTTP Method
Endpoint URL See Endpoint
Resource /records/{repositoryName}/addRecord
Request Parameters Specify the following parameters:
Name Description Type Data Type
Required
repositoryName Name of the repository. path string
Optional
perspectiveName Name of the perspective. query string
Media Type application/json
Request Model
{
  "process": false,
  "validate": false,
  "perspectiveName": "string",
  "record": {
    "productId": "string",
    "productIdExt": "string",
    "productKeyId": "string",
    "attributes": [
      {
        "name": "string",
        "value": "string",
        "displayName": "string",
        "multivalues": [
          {}
        ],
        "multivalue": false,
        "id": 0,
        "groupName": "string"
      }
    ],
    "repositoryName": "string",
    "relationships": {
      "relationshipAttributes": [
        {
          "name": "string",
          "value": "string",
          "displayName": "string",
          "multivalues": [
            {}
          ],
          "multivalue": false,
          "id": 0,
          "groupName": "string"
        }
      ],
      "targetRecord": {}
    },
    "deleted": false
  }
}
    
Response Model
{
  "responseMessages": [
    {
      "code": "string",
      "message": "string",
      "type": "string"
    }
  ],
  "records": [
    {
      "repositoryName": "string",
      "productId": "string",
      "productIdExt": "string",
      "productKeyId": "string",
      "responseAttributes": [
        {
          "attributeName": "string",
          "attributeDisplayName": "string",
          "values": [
            "string"
          ],
          "errorCode": "string",
          "errorMessage": "string",
          "errorType": "string"
        }
      ],
      "responseRelationships": [
        {
          "relationshipName": "string",
          "sourceRepositoryName": "string",
          "targetRepositoryName": "string",
          "recordId": "string",
          "recordIdExt": "string",
          "productKeyId": "string",
          "responseAttributes": [
            {
              "attributeName": "string",
              "attributeDisplayName": "string",
              "values": [
                "string"
              ],
              "errorCode": "string",
              "errorMessage": "string",
              "errorType": "string"
            }
          ]
        }
      ]
    }
  ],
  "success": false
}
Request Example A record with product ID record1 and address IL USA is added in the repository named "Company":
{
  "record": {
    "repositoryName": "Company",
    "productIdExt": "record1",
    "productId": "record1",
    "attributes": [
      {
        "name": "Name",
        "value": "TIBCO"
      },
      {
        "name": "Address",
        "value": "IL USA"
      },
      {
        "name": "Street",
        "multivalues": [
          "11th St",
          "Rockford"
        ],
        "multivalue": true
      },
      {
        "name": "Website",
        "value": "https://www.google.co.in/"
      },
      {
        "name": "Rating",
        "value": "10.10"
      },
      {
        "name": "CompanySource",
        "value": "IT SOURCE"
      },
      {
        "name": "CompanyRating",
        "value": "9"
      }
    ]
  }
}
Response Example The response returns the message that the records are added successfully.
        {
   "responseMessages": [   {
      "code": "SVC-11025",
      "message": "Service 'VALIDATE_PROCESS' executed successfully.",
      "type": "Info"
   }],
   "records": [],
   "success": true
}
Success Response Example:

Code: 200 successful operation

Error Response
Attention: The response is displayed for validation error.
If the response is unsuccessful, either of the following error code is displayed:

Example:

Code: 400 Bad request

OR

Code: 500 Invalid Request

For error code response, see Error Handling .