Snippets
Create, update, delete and query Snippets for a Marketo organization.
Table Specific Information
Select
Note: All filterable columns must be specified using the '=' operator.
Retrieve a list of accessible snippets from the target instance, filterable by Status.
SELECT * FROM Snippets WHERE Status = 'draft'
Retrieve the snippet record for the given target Id.
SELECT * FROM Snippets WHERE Id = 1234
INSERT
To create a new Snippet, specify at least the Name, FolderId and FolderType column.
INSERT INTO Snippets (Name, Description, FolderId, FolderType) VALUES ('My Snippet', 'Test Snippet insert', 31, 'Folder')
Update
Any field that is not read-only can be updated.
UPDATE Snippets SET Description = 'Testing Update', IsArchive = 'No', Name = 'Test Update' WHERE Id = 8
Delete
To delete a Snippet you must specify the ID field.
DELETE FROM Snippets WHERE Id = 1934
Columns
Name | Type | ReadOnly | Filterable | Description |
Id [KEY] | Integer | True | True |
Id of the asset. |
Name | String | False |
Name of the asset. | |
CreatedAt | Datetime | True |
Datetime the asset was created. | |
Description | String | False |
Description of the asset. | |
FolderId | Integer | False |
Id of the folder. | |
FolderType | String | False |
Type of folder. The allowed values are Folder, Program. | |
FolderName | String | False |
Name of folder. | |
Status | String | True | True |
Status filter for draft or approved versions. |
UpdatedAt | Datetime | True |
Datetime the asset was most recently updated. | |
Url | String | True |
Url of the asset in the Marketo UI. | |
Workspace | String | True |
Name of the workspace. | |
IsArchive | String | False |
Archival status of the snippet |