Snippets
Create, update, delete and query snippets for a Marketo organization.
GetSnippetContent can be used to get the content of a snippet.
UpdateSnippetContent can be used to update the content of a snippet.
Select
Note: Filters provided with one of the supported operators listed in the "Operators" column are processed server-side, all the other filters are processed client-side.
SELECT * FROM Snippets WHERE status='approved'
SELECT * FROM Snippets WHERE Id='9'
SELECT * FROM Snippets WHERE Id='9' AND Status='approved'
Insert
INSERT INTO Snippets (Name, FolderId, FolderType, Description)
VALUES ('test insert smart snippet', '31', 'Folder', 'Test Insert Description')
Update
UPDATE Snippets SET Description='Testing Update', IsArchive='true', Name='Test Update' WHERE Id=12
Delete
DELETE FROM Snippets WHERE Id=7
DELETE FROM Snippets WHERE Name='My Snippet2'
DELETE FROM Snippets WHERE ID IN (1, 9, 111)
DELETE FROM Snippets WHERE Name IN ('My Snippet1', 'My Snippet11')
Columns
Name | Type | ReadOnly | Operators | Description |
Id [KEY] | Int | True | = |
The unique, Marketo-assigned identifier of the snippet. |
Status [KEY] | String | True | = |
Status filter for draft or approved versions. |
Name | String | False |
The name of the snippet. | |
Description | String | False |
The description of the snippet. | |
URL | String | True |
The URL of the snippet in the Marketo UI. | |
WorkspaceName | String | True |
Workspace name of the asset. | |
FolderId | Int | False | = |
The unique, Marketo-assigned identifier of the parent folder/program. |
FolderName | String | True |
The name of the folder | |
FolderType | String | False | = |
The type of folder (Folder,Program) |
CreatedAt | Datetime | True |
Datetime the snippet was created. | |
UpdatedAt | Datetime | True |
Datetime the snippet was most recently updated. |