Get primary keys or all field names of a supplemental table
For an existing supplemental table, you can get only the primary key field names or all of the field names.
Service URL:
/rest/api/v1.3/folder/{folderName}/suppData/{suppTableName}
Request Method:
GET
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Sample Request Body:
Not applicable
Response Notes
- The system returns an array of fields. Depending on the ft query parameter, the response will send either all of the fields or only the primary key fields. For each field returned, the key-value pairs are fieldName and fieldType (data type of the field).
- The system returns an array of
suppData objects. These objects contain the data for the supplemental table:
- objectName: Name of the supplemental table
- folderName: Name of the folder containing the supplemental table
Sample response in case of success:
To get only the primary key fields for a supplemental table named MyExampleSuppTable in the folder MyExampleFolder, a client application sent a GET request as follows:
GET /rest/api/v1.3/folder/MyExampleFolder/suppData/MyExampleSuppTable?ft=PK
The system sent the following response, where the fields array contains the primary key field names and their types. In this example, the supplemental table had one primary key field, MyPKfield1, of type STR500. The suppData object echoes back the folder name and supplemental table name sent in the request.
{
"fields": [
{ "fieldName": "MyPKfield1", "fieldType": "STR500" }
],
"suppData":
{ "folderName": "MyExampleFolder", "objectName": "MyExampleSuppTable" },
"links": [
{ "rel": "self",
"href": "/rest/api/v1.3/folder/MyExampleFolder/suppData/MyExampleSuppTable",
"method": "GET" },
{ "rel": "mergeTableMembers",
"href": "/rest/api/v1.3/folders/MyExampleFolder/suppData/MyExampleSuppTable/members",
"method": "POST" },
{ "rel": "retrieveTableMembers",
"href": "/rest/api/v1.3/folders/MyExampleFolder/suppData/MyExampleSuppTable/members",
"method": "GET" },
{ "rel": "deleteTableMembers",
"href": "/rest/api/v1.3/folders/MyExampleFolder/suppData/MyExampleSuppTable/members",
"method": "DELETE" }
]
}
Troubleshooting error responses:
The system returns error responses in the following situations.
The folder does not exist for the Responsys account: A 404 not found error is returned with the following error response body (where the folder name sent is returned in the square brackets):
{
"type": "",
"title": "Folder not found",
"errorCode": "FOLDER_NOT_FOUND",
"detail": "Folder name [MyExampleFolder] does not exist",
"errorDetails": []
}
The table does not exist for the Responsys account: A 404 not found error is returned with the following error response body (where the table name sent is returned in the square brackets):
{
"type": "",
"title": "Resource not found",
"errorCode": "RESOURCE_NOT_FOUND",
"detail": "Supplemental name [MyExampleSuppTable] does not exist",
"errorDetails": []
}
An invalid query parameter is sent: That is, ft is set to a value other than pk). A 400 bad request error is returned with the following error response body:
{
"type": "",
"title": "Invalid request parameters",
"errorCode": "INVALID_PARAMETER",
"detail": "Not a valid value for Request parameter ft. Allowed value is PK",
"errorDetails": []
}
Organization filter error: For accounts enabled for Organizational Access Control, the system applies the organization filter. So when a user belonging to an organization tries to invoke the API on a supplemental table belonging to another organization, the system returns the following error (where the table name sent is returned in the square brackets):
{
"type": "",
"title": "Resource not found",
"errorCode": "RESOURCE_NOT_FOUND",
"detail": "Supplemental name [ExampleNotMyOrgTable] does not exist",
"errorDetails": []
}