GET Retrieves a list of data extensions that match a search string.
GET /data/v1/customobjects
Operation ID: getDataExtensions.
Required Scopes
To retrieve data extensions in your account, your API user must have this permission:
- Data | Data Extensions | Read (
data_extensions_read)
Parameters
Authorization(header, string, required) A unique, time-limited token that you can use to issue requests to the Marketing Cloud Engagement API. ReplaceYOUR_ACCESS_TOKENwith your authentication token.Example
Bearer YOUR_ACCESS_TOKEN$search(query, string, required) A string to search for in the name of the custom object.$page(query, number) The page of results to retrieve. Each page includes the number of records specified by the $pagesize parameter. You can retrieve additional pages by incrementing this number in subsequent calls. The default value is1.$pagesize(query, number) The number of records to return on each page of results. The default value is2500.
Responses
- 200
This response indicates that the API accepted the request to retrieve a list of custom objects.
Media type:
application/json. Schema:getCustomObjectsResponseBody.Example
{ "count": 1, "page": 1, "pageSize": 25, "links": {}, "items": [ { "id": "36e73253-16a9-ee11-ac6c-0abc489251b9", "name": "facb9d48d7c44486a7b0715ef0b2f7a2", "key": "facb9d48d7c44486a7b0715ef0b2f7a2", "description": "", "isActive": true, "isSendable": true, "sendableCustomObjectField": "SubscriberKey", "sendableSubscriberField": "_SubscriberKey", "isTestable": true, "categoryId": 152631, "ownerId": 712000003, "isObjectDeletable": true, "isFieldAdditionAllowed": true, "isFieldModificationAllowed": true, "createdDate": "2024-01-01T20:26:31.07", "createdById": 712000003, "createdByName": "TestUser", "modifiedDate": "2024-01-01T20:26:31.07", "modifiedById": 712000003, "modifiedByName": "TestUser", "ownerName": "TestUser", "partnerApiObjectTypeId": 310, "partnerApiObjectTypeName": "DataExtension", "rowCount": 100000, "dataRetentionProperties": { "isDeleteAtEndOfRetentionPeriod": false, "isRowBasedRetention": false, "isResetRetentionPeriodOnImport": false }, "fieldCount": 5 } ] } - 400
This response indicates that the API couldn’t retrieve a list of custom objects because there was a problem with the request. For example, the API returns this response when your request doesn’t include a
$searchquery parameter.Media type:
application/json. Schema:mceErrorResponseBody.Example
{ "message": "$search is a required parameter", "errorcode": 10005, "documentation": "" } - 401
Indicates that the API wasn’t able to authorize your request. When you receive a 401 response, verify that you obtained an authorization token and that the token is still valid.
Media type:
application/json. Schema:httpErrorResponseBody.Example
{ "documentation": "https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm", "errorcode": 0, "message": "Not Authorized" } - 403
This response indicates that the API accepted your request but couldn’t authorize it. When you receive a 403 response, make sure you have the necessary permission scope for the operation. You can modify permission scopes on the Installed Apps page in Marketing Cloud Engagement Setup.
Media type:
application/json. Schema:mceErrorResponseBody.Example
{ "documentation": "", "errorcode": 20002, "message": "Insufficient privileges to complete this action." }