Fetch all the fields or the primary key fields of the Supplemental Table

get

/rest/api/v1.3/folder/{folderName}/suppData/{suppTableName}

Request

Path Parameters
Query Parameters
  • **ft=pk** returns only the primary key fields. **ft=all** returns all the fields. By default 'ft' is set to 'all'
Back to Top

Response

Supported Media Types

Default Response

Supplemental Data Tables
Body ()
Root Schema : Supplemental Data Table fields
Type: object
Title: Supplemental Data Table fields
Show Source
Nested Schema : fields
Type: array
The Supplemental Data Table fields
Show Source
Nested Schema : suppData
Type: object
Metadata about the Supplemental Table
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Examples

For an existing supplemental table, you can get only the primary key field names or all of the field names.

FIELDS DESCRIPTION
Authorization <AUTH_TOKEN>
REQUEST NOTES
  • Use the ft fields to be returned in the response. By default, all fields are sent. To get only the primary key fields, set ft=pk.

Sample Request

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
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: Success

To get only the primary key fields for a supplemental table named MyExampleSuppTable in the folder MyExampleFolder, a client application requested only the primary fields by specifying ft=PK as a query parameter. 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.
HTTPS response status code: 200 OK

{
  "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 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":[]}
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 [OtherOrgExampleSuppTable] does not exist",
 "errorDetails":[]}
Back to Top