Add Record with Upload
The various details of how to add a record with file upload is explained in this section. The files should be uploaded as attachments to the request.
HTTP Method | ||||
Endpoint URL | See Endpoint | |||
Resource | /records/addRecordWithUpload/{repositoryName} | |||
Request Parameters | Specify the following parameters: | |||
Name | Description | Type | Data Type | |
Required | ||||
repositoryName | Name of the repository. | path | string | |
newRecord (body) | JSON payload for the record. | query | string | |
Optional | ||||
perspectiveName | Name of the perspective. | query | string | |
Media Type | multipart/form-data | |||
Request Model | The request model is similar to the Add Record rest service. | |||
Response Model | The request model is similar to the Add Record rest service. | |||
Request Example | For Attributes
{"record":{"repositoryName":"ALLTypeA","productIdExt":"filetest1" ,"productId":"filetest1", "attributes":[{"name":"ATA_STRING1","value":"demo"}, {"name":"ATA_FILE1","value":"A.txt"}]}} |
|||
For Multivalue Attributes
{"record":{"repositoryName":"ALLTypeA","productIdExt":"multi", "productId":"multi", "attributes":[{"name":"ATA_STRING1","value":"demo"}, {"name":"ATA_MV_FILE1", "multivalues":["B.txt","C.txt"],"multivalue":true}]}} |
||||
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 |
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 . |
Copyright © Cloud Software Group, Inc. All rights reserved.