From Bright Pattern Documentation
< 3.16:List-management-api-specification
Revision as of 21:36, 5 June 2017 by Tracy (talk | contribs) (Created new topic from branched topic Documentation:ServicePattern:list-management-api-specification:Addanumberofrecords:3.15)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 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>:<port>/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 >
< Previous | Next >