Adding Metadatabase Records
Add Metadatabase Record(s)
POST
https://insight.plumvoice.com/api/metadatabase_push
Add metadatabase records to a Plum Insight survey.
Headers
Name | Type | Description |
---|---|---|
content-type | string | application/x-www-form-urlencoded |
Request Body
Name | Type | Description |
---|---|---|
metadatabase | string | The name of the metadatabase. This is case-insensitive. |
record | string | json encoded associative array of the column names and column values to be added. Example: {'column1': 'value1', 'column2': 'value2'} This need not include all columns, you can leave out columns in your metadatabase you do not wish to populate. |
Possible Response Codes
200: success
400: invalid data supplied
401: authentication headers invalid or the account is inactive
404: metadatabase was not found
405: invalid HTTP method supplied (only POST allowed)
415: unsupported media type (Content-Type value in request)
500: database error
The return structure contains the following item(s):
Name | Data Type | Always Present | Description |
success | boolean | yes | Indicates the outcome of the request |
error | string | no | If the success value is false this provides a message indicating what error(s) occurred |
Sample Code
This sample PHP code makes a request to push a new record into the 'test' metadatabase and sets values for columns column1 and column2:
Last updated