First Analysis
This first guide is going to help you to run your first Analysis.
If you're not familiar with GraphQL, please have a look at its dedicated section in this documentation.
In order to analyse your first content, you'll have to send a request to our API. This request is going to launch the AdSecure's crawler on the content of your choice.
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 first 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 Analysis
entry. When you create a new Analysis
, the AdSecure's crawler is informed that a new task needs to be handled and start analysing the provided content.
The entry's creation in GraphQL is associated to a mutation
query and because we want to analyse the content of https://examples.adsecure.com/simple
, we're going to put this URL as the value of the input.content
parameter.
Also, and in order to be able to retrieve our analysis later in this guide, we're going to ask the GraphQL API to return us the Analysis
's id
.
Query
mutation {
createAnalysis(input: {
content: "https://examples.adsecure.com/simple"
}) {
id
}
}
Response
{
"data": {
"createAnalysis": {
"id": "YW5hbHlzaXN8YThiYzk0M2ItNTY3ZS00NzA5LWIwOWItMTI1YmMzNGMxMjUwfDIwMTgtMDktMDI="
}
}
}
Congrats! You've just created your first analysis. It was pretty simple but it one of the most important queries that you'll have to make against our API.
From that point, a new Analysis
entry has been created in our database and the AdSecure crawler is now analysing the https://examples.adsecure.com/simple
web page.
As the analysis is going to be complete after a few seconds, you can now take a look at the understanding analysis results guide, that will come handy in order to know where to look in the response.
Next steps
These examples were illustrating some simple use cases of our service. As your own usage could require more advanced features, we're inviting you to keep on discovering our API through the others guides available: