From Bright Pattern Documentation
Jump to: navigation, search
(Created new topic from branched topic Documentation:ServicePattern:list-management-api-specification:Addanumberofrecords:3.15)
 
 
Line 3: Line 3:
  
 
== URL ==
 
== URL ==
http[s]://<host>:<port>/admin/ws/t/<tenant_url>/callinglist/addAll/<list_name>
+
http[s]://<host>/admin/ws/t/<tenant_url>/callinglist/addAll/<list_name>
  
 
== Method ==
 
== Method ==
Line 12: Line 12:
  
 
=== Example ===
 
=== Example ===
{|border="1" style="border-collapse:collapse" cellpadding="5"
+
[
|
+
''[''
+
{ "fieldName_1":"value_1", ..., "fieldName_n":"value_n"},
 
+
''{  &quot;fieldName_1&quot;:&quot;value_1&quot;, ..., &quot;fieldName_n&quot;:&quot;value_n&quot;},''
+
...
 
+
''...''
+
]
 
 
'']''
 
|}
 
  
 
== Returns ==
 
== Returns ==
Line 32: Line 29:
  
 
=== Example ===
 
=== Example ===
{|border="1" style="border-collapse:collapse" cellpadding="5"
+
{
|
+
''{''
+
"added":1,
 
+
''&quot;added&quot;:1,''
+
"error":{
 
+
''&quot;error&quot;:{''
+
"missingRequired":[
 
+
''&quot;missingRequired&quot;:[''
+
{ "fieldName_1":"value_1", ..., "fieldName_n":"value_n"},
 
+
''{  &quot;fieldName_1&quot;:&quot;value_1&quot;, ..., &quot;fieldName_n&quot;:&quot;value_n&quot;},''
+
...
 
+
]
<blockquote>''...''
+
</blockquote>
+
"missingKey": [
'']''
+
 
+
{ "fieldName_1":"value_1", ..., "fieldName_n":"value_n"},
''&quot;missingKey&quot;: [''
+
 
+
...
''{  &quot;fieldName_1&quot;:&quot;value_1&quot;, ..., &quot;fieldName_n&quot;:&quot;value_n&quot;},''
+
]
 
+
<blockquote>''...''
+
"duplicateKey": [
</blockquote>
+
'']''
+
{ "fieldName_1":"value_1", ..., "fieldName_n":"value_n"},
 
+
''&quot;duplicateKey&quot;: [''
+
...
 
+
]
''{  &quot;fieldName_1&quot;:&quot;value_1&quot;, ..., &quot;fieldName_n&quot;:&quot;value_n&quot;},''
+
 
+
"formatError": [
<blockquote>''...''
+
</blockquote>
+
{ "fieldName_1":"value_1", ..., "fieldName_n":"value_n"},
'']''
+
 
+
...
''&quot;formatError&quot;: [''
+
]
 
+
''{  &quot;fieldName_1&quot;:&quot;value_1&quot;, ..., &quot;fieldName_n&quot;:&quot;value_n&quot;},''
+
}
 
+
}
<blockquote>''...''
 
</blockquote>
 
'']''
 
 
 
<blockquote>''}''
 
</blockquote>
 
''}''
 
|}
 
  
 
== Errors ==
 
== Errors ==
Line 89: Line 78:
  
  
<center>[[list-management-api-specification/Addarecord|< Previous]]  |  [[list-management-api-specification/Updatearecord|Next >]]</center>
+
 
 
</translate>
 
</translate>

Latest revision as of 22:52, 17 September 2018

• 3.10 • 3.11 • 3.12 • 3.13 • 3.14 • 3.15 • 3.16 • 3.17 • 3.18

Add a number of records

This adds a number of new records to the specified calling list.

URL

http[s]://<host>/admin/ws/t/<tenant_url>/callinglist/addAll/<list_name>

Method

POST

Request body

Names and values of record fields (content type: application/json)

Example

[

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

...

]

Returns

204 – Records added; will be returned even if some records were not added due to duplicate or missing keys or other missing mandatory fields

If such errors are identified with respect to some records, they will be reported in the message body. See the example below.

Body

Results of the update, including possible individual errors (content type: application/json)

Example

{

"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"},

...
]

}
}

Errors

400 – Bad request (incorrect format)

401 – Authentication failed

403 – Authentication succeeded, but authorization failed (no privileges)

404 – Calling list not found



< Previous | Next >