campaigns
Protocol buffer definition for campaigns
sift/campaigns/v1/campaigns.proto
Campaign
Field | Type | Label | Description |
---|---|---|---|
campaign_id | string | ||
organization_id | string | ||
client_key | string | ||
name | string | ||
description | string | ||
created_by_user_id | string | ||
modified_by_user_id | string | ||
created_date | google.protobuf.Timestamp | ||
modified_date | google.protobuf.Timestamp | ||
archived_date | google.protobuf.Timestamp | ||
tags | sift.tags.v1.TagRef | repeated | |
reports | CampaignReport | repeated | A campaign, at its core, is a list of reports |
created_from_campaign_id | string | If 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
Field | Type | Label | Description |
---|---|---|---|
report_id | string | Direct reference to the report. Set this on the client to tell the backend which report you're referring to. | |
report_name | string | ||
num_annotations | uint32 | How many annotations exist under the report's various rules. | |
num_passed_rules | uint32 | How many rules from this report were never triggered and generated NO annotations. | |
num_accepted_rules | uint32 | How many rules have annotations which are ALL marked as accepted. | |
num_failed_rules | uint32 | How many rules have ANY annotations which are marked as failed. | |
num_open_rules | uint32 | How 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
Field | Type | Label | Description |
---|---|---|---|
report_ids | sift.common.type.v1.ResourceIdentifiers | Create a campaign directly from a set of reports | |
run_ids | sift.common.type.v1.ResourceIdentifiers | Create a campaign from a set of runs by collecting all the reports generated by those runs | |
campaign_id | sift.common.type.v1.ResourceIdentifier | Duplicate another campaign |
CreateCampaignRequest
The request of a call to CampaignService_CreateCampaign
to create a campaign.
Field | Type | Label | Description |
---|---|---|---|
name | string | The descriptive display name of the created campaign | |
description | string | A custom description for the campaign | |
tags | sift.common.type.v1.NamedResources | Tags to be applied to the new campaign | |
organization_id | string | organization_id is only required if your user belongs to multiple organizations | |
client_key | string | User-specified unique identifier. | |
create_from | CreateCampaignFrom | Initialize 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.
Field | Type | Label | Description |
---|---|---|---|
campaign | Campaign |
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.
GetCampaignResponse
The response of a call to CampaignService_GetCampaign
to retrieve a campaign.
Field | Type | Label | Description |
---|---|---|---|
campaign | Campaign |
ListCampaignsRequest
The request for a call to CampaignService_ListCampaigns
to retrieve campaigns.
Field | Type | Label | Description |
---|---|---|---|
page_size | uint32 | The 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_token | string | A 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. | |
filter | string | A 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_id | string | This field is only required if your user belongs to multiple organizations. | |
include_archived | bool | If true then archived campaigns will be included in the query. Defaults to false . | |
order_by | string | How 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
.
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.
Field | Type | Label | Description |
---|---|---|---|
campaign | Campaign | The campaign to update. | |
update_mask | google.protobuf.FieldMask | The 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
.
Field | Type | Label | Description |
---|---|---|---|
campaign | Campaign |
CampaignService
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetCampaign | GetCampaignRequest | GetCampaignResponse | Retrieve a campaign. |
CreateCampaign | CreateCampaignRequest | CreateCampaignResponse | Create a campaign. |
ListCampaigns | ListCampaignsRequest | ListCampaignsResponse | List campaigns. |
UpdateCampaign | UpdateCampaignRequest | UpdateCampaignResponse | Updates an existing campaign using the list of fields specified in update_mask . |