From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.2 • 5.3 • 5.8

Add Many Records

This method adds multiple new records to the specified calling list. It returns an error if a record with the same values of unique keys as configured in the list definition already exists.

Request

URL

http[s]://<host>/configapi/v2/callinglist/addAll/<list_name>

Method

POST

Body Content Type

JSON array of objects

Body

[
       { "fieldName_1":"value_1", ...,  "fieldName_n":"value_n"},
          ...
] 

Notes

  • Field names are provided as they were defined during list creation.
  • Key fields and required fields are mandatory.


Response

Response Codes

Code Description
200 Success (may be partial success; additional problem description contained in response)
400 Bad request (format not understood)
401 Authentication failed
403 User authenticated but does not have sufficient privileges
404 Calling List is not found or invalid URL


Error Response

Content Type

JSON object ("error" attribute exists only if errors are found)

Result

{
       "added":1,
        "error":{
               "missingRequired":[
                       { "fieldName_1":"value_1", ...,  "fieldName_n":"value_n"},
                       ...
               ]
               "missingKey": [
                       { "fieldName_1":"value_1", ...,  "fieldName_n":"value_n"},
                       ...
               ]
               "duplicateKey":	[
                       { "fieldName_1":"value_1", ...,  "fieldName_n":"value_n"},
                       ...
               ]
               "formatError":	[
                       { "fieldName_1":"value_1", ...,  "fieldName_n":"value_n"},
                       ...
               ]
       }

}

< Previous | Next >