campaigns

Protocol buffer definition for campaigns

sift/campaigns/v1/campaigns.proto

Campaign

FieldTypeLabelDescription
campaign_idstring
organization_idstring
client_keystring
namestring
descriptionstring
created_by_user_idstring
modified_by_user_idstring
created_dategoogle.protobuf.Timestamp
modified_dategoogle.protobuf.Timestamp
archived_dategoogle.protobuf.Timestamp
tagssift.tags.v1.TagRefrepeated
reportsCampaignReportrepeatedA campaign, at its core, is a list of reports
created_from_campaign_idstringIf this campaign was created by duplicating another campaign, that other campaign will be referenced here

CampaignReport

A top-level summary of the report's rules is provided here so clients needn't aggregate this information themselves

FieldTypeLabelDescription
report_idstringDirect reference to the report. Set this on the client to tell the backend which report you're referring to.
report_namestring
num_annotationsuint32How many annotations exist under the report's various rules.
num_passed_rulesuint32How many rules from this report were never triggered and generated NO annotations.
num_accepted_rulesuint32How many rules have annotations which are ALL marked as accepted.
num_failed_rulesuint32How many rules have ANY annotations which are marked as failed.
num_open_rulesuint32How many rules have annotations of which SOME are marked as open and NONE are marked as failed.

CreateCampaignFrom

Campaigns can be created from a few different sources

FieldTypeLabelDescription
report_idssift.common.type.v1.ResourceIdentifiersCreate a campaign directly from a set of reports
run_idssift.common.type.v1.ResourceIdentifiersCreate a campaign from a set of runs by collecting all the reports generated by those runs
campaign_idsift.common.type.v1.ResourceIdentifierDuplicate another campaign

CreateCampaignRequest

The request of a call to CampaignService_CreateCampaign to create a campaign.

FieldTypeLabelDescription
namestringThe descriptive display name of the created campaign
descriptionstringA custom description for the campaign
tagssift.common.type.v1.NamedResourcesTags to be applied to the new campaign
organization_idstringorganization_id is only required if your user belongs to multiple organizations
client_keystringUser-specified unique identifier.
create_fromCreateCampaignFromInitialize the campaign, or leave this field empty to create an empty campaign to be populated later

CreateCampaignResponse

The response of a call to CampaignService_CreateCampaign to create a campaign.

FieldTypeLabelDescription
campaignCampaign

GetCampaignRequest

The request for a call to CampaignService_GetCampaign to retrieve a campaign. If campaign_id is provided then all other arguments will be ignored. The organization_id argument is only required if using client_key and the user belongs to multiple organizations.

FieldTypeLabelDescription
campaign_idstring
client_keystring
organization_idstring

GetCampaignResponse

The response of a call to CampaignService_GetCampaign to retrieve a campaign.

FieldTypeLabelDescription
campaignCampaign

ListCampaignsRequest

The request for a call to CampaignService_ListCampaigns to retrieve campaigns.

FieldTypeLabelDescription
page_sizeuint32The maximum number of campaigns to return. The service may return fewer than this value. If unspecified, at most 50 campaigns will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.
page_tokenstringA page token, received from a previous ListCampaigns call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListCampaigns must match the call that provided the page token. Optional.
filterstringA Common Expression Language (CEL) filter string. Available fields to filter by are campaign_id, tag_id, tag_name, client_key, and name. For further information about how to use CELs, please refer to this guide. For more information about the fields used for filtering, please refer to this definition. Optional.
organization_idstringThis field is only required if your user belongs to multiple organizations.
include_archivedboolIf true then archived campaigns will be included in the query. Defaults to false.
order_bystringHow to order the retrieved campaigns. Formatted as a comma-separated string i.e. "FIELD_NAME[ desc],...". Available fields to order_by are created_date and modified_date. If left empty, items are ordered by created_date in ascending order (oldest-first). For more information about the format of this field, read this Example: "created_date desc,modified_date"

ListCampaignsResponse

The response of a call to CampaignService_ListCampaignsResponse.

FieldTypeLabelDescription
campaignsCampaignrepeated
next_page_tokenstring

UpdateCampaignRequest

The request for a call to CampaignService_UpdateCampaign to update a campaign. When updating tags or rules, the update will perform a full replace. Additionally, when updating rules, only the rule ID or the rule client key is required, but it is okay to provide both. If some rules contain only client keys and others only rule IDs, they will be consolidated.

FieldTypeLabelDescription
campaignCampaignThe campaign to update.
update_maskgoogle.protobuf.FieldMaskThe list of fields to be updated. The fields available to be updated are name, archived_date, description, tags, and reports.

UpdateCampaignResponse

The response of a call to CampaignService_UpdateCampaign.

FieldTypeLabelDescription
campaignCampaign

CampaignService

Method NameRequest TypeResponse TypeDescription
GetCampaignGetCampaignRequestGetCampaignResponseRetrieve a campaign.
CreateCampaignCreateCampaignRequestCreateCampaignResponseCreate a campaign.
ListCampaignsListCampaignsRequestListCampaignsResponseList campaigns.
UpdateCampaignUpdateCampaignRequestUpdateCampaignResponseUpdates an existing campaign using the list of fields specified in update_mask.

On this page