Docs

Docs

  • Getting Started
  • Features
  • Docs
  • API
  • FAQS

›Guides

Getting Started

  • Introduction
  • Detections

Development

  • Quickstart
  • Concepts

Guides

  • First Analysis
  • Understanding analysis results
  • Select a specific Location
  • Select a specific Device
  • Configuring the Notification Service
  • Managing Custom Alert Rules
  • Create a Project
  • A closer look at the detection: Permission API
  • RTB Analysis

Threat Intelligence

  • Introduction
  • Odin
  • Endpoint
  • Authentication
  • Lookup
  • Violation Weight Map

Real-Time Blocking

  • Introduction
  • User Manual

GraphQL

  • Overview
  • Concepts
  • Forming Calls

Create a Project

In this guide we're going to see how you can programmatically create some analysis over time.

If you're not familiar with GraphQL, please have a look at its dedicated section in this documentation.

The AdSecure platform is able to generate analysis at a defined interval based on your settings. This feature will help you to monitor some of your ads over time.

In this guide we're going to set up a complete project. As it relies on concepts already covered in other guides, please be sure that you're already comfortable with them:

  • Select a specific Location
  • Select a specific Device
  • Configuring the Notification Service
  • Managing Custom Alert Rules

Prerequisites

Before starting this guide, please be sure that you're ready to use our service by following the steps illustrated in the Quickstart section.

Simple case

For the purpose of this example, we're going to analyse a simple web page:

https://examples.adsecure.com/simple

In order to ask the AdSecure's crawler to analyse this content, we need to create a new Project entry.

When you create a new Project, the AdSecure generate for you the corresponding Analysis entries at regular interval of time. The crawler is then informed that a new task needs to be handled and start analysing the provided content.

For creating a new project we need to send a payload that contains the following fields:

  • The name that's going to help us to easily remember the scope of this project. This value is also going to be used to generate the project's login.
  • The list of locations that are going to be used (ref: Select a specific Location).
  • The list of notifications that are going to be used (ref: Configuring the Notification Service).
  • The list of devices that are going to be used (ref: Select a specific Device).
  • The alertRule that you want to apply (ref: Managing Custom Alert Rules).
  • The interval between two iterations of the project. The allowed values in milliseconds (ms) are: 900000, 1800000, 3600000, 7200000, 14400000, 28800000, 43200000 and 86400000.
  • The maxIterations that defines the amount of time the project has to be run before being stopped (max: 30). When set to 0 (default value), the iterations don't stop automatically.
  • The content which represent the content that you'll like to analyse.
Query
mutation {
  createProject(
    input: {
      name: "My automated project",
      content: "https://google.com".
      locations: [
        {
          login: "USA",
          type: STANDARD,
          provider: "OTHER"
        },
        {
          login: "USA",
          type: RESIDENTIAL,
          provider: "OTHER"
        },
        {
          login: "USA",
          type: MOBILE,
          provider: "T-MOBILE"
        }
      ],
      devices: [
        "google_pixel_2_chrome"
      ],
      alertRule: "landing_page_error",
      notifications: "notify-me-on-violation"
      interval: 900000
      maxIterations: 5
    }
  ) {
    id
    status
  }
}
Response
{
  "data": {
    "createProject": {
      "id": "YW5hbHlzaXN8YThiYzk0M2ItNTY3ZS00NzA5LWIwOWItMTI1YmMzNGMxMjUwfDIwMTgtMDktMDI=",
      "status": "RUNNING"
    }
  }
}

This project is going to launch 3 analysis (one for each location) emulating a Google Pixel 2 each 15 minutes. After 5 iteration, the project is going to be paused.

← Managing Custom Alert RulesA closer look at the detection: Permission API →
  • Prerequisites
  • Simple case
Copyright © 2022 AdSecure