Add a New Record

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

HTTP Method

POST

Endpoint URL

See Endpoint.

Resource

/records/{repositoryName}

Request Parameters

You must specify the following parameters:

Name Description Type Data Type
repositoryName Specify the repository name.

This is Mandatory.

path string
perspectiveName Specify the perspective name. query string

Request Model

Media Type: application/json.

{  
   "process":false,
   "validate":false,
   "perspectiveName":"string",
   "record":{  
      "productId":"string",
      "productIdExt":"string",
      "version":"string",
      "state":"string",
      "key":0,
      "attributes":[  
         {  
            "name":"string",
            "value":"string",
            "displayName":"string",
            "multivalues":[  
               {  

               }
            ],
            "type":0,
            "id":0,
            "multivalue":false
         }
      ],
      "repositoryName":"string",
      "relationship":{  
         "relationshipName":[  
            {  
               "relationshipAttributes":[  
                  {  
                     "name":"string",
                     "value":"string",
                     "displayName":"string",
                     "multivalues":[  
                        {  

                        }
                     ],
                     "type":0,
                     "id":0,
                     "multivalue":false
                  }
               ],
               "targetRecord":{  
                  "productId":"string",
                  "productIdExt":"string",
                  "version":"string",
                  "state":"string",
                  "key":0,
                  "attributes":[  
                     {  
                        "name":"string",
                        "value":"string",
                        "displayName":"string",
                        "multivalues":[  
                           {  

                           }
                        ],
                        "type":0,
                        "id":0,
                        "multivalue":false
                     }
                  ],
                  "repositoryName":"string",
                  "relationships":{  

                  },
                  "deleted":false
               }
            }
         ]
      },
      "deleted":false
   }
}

Response Model

The server sends response 200 OK with HTTP status code for each successfully completed request. The success response format is as follows:

{
  "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": true
}
Note: The response is displayed for validation error.

If response is unsuccessful, either of the following error code is displayed:

  • 400 Bad Request
  • 404 Not Found
  • 500 Internal Server Error

For error code response, see Error Handling .