GraphQL Campaign Mutations¶
Overview¶
Best Practices¶
API Use Recommendations¶
Assessment templates aren't as critical as Test Case templates. They're useful in the UI for creating repeatable activities. They also make it much easier for a purple team operator to get started, however they aren't as critical for reporting as Test Case templates.
Assessment Mutation Examples¶
Create a local Assessment¶
Note
Creates an Assessment in the local db
. To add Campaigns to an Assessment you've created, check out the Campaigns GraphQL documentation.
mutation ($input: CreateAssessmentInput!) {
assessment {
create(input: $input) {
assessments {
id, name, description, createTime
}
}
}
}
{
"input": {
"db": "MY_USER_DB",
"assessmentData": [
{
"name": "New Assessment 1",
"organizationId": "1cf413ba-326a-4d18-979c-367eb1306f69",
"description": "New Assessment",
"killChainId": "5cd6bf81-e3f2-4430-ba0c-5288328a20c5"
}
]
}
}
{
"data": {
"assessment": {
"create": {
"assessments": [
{
"id": "d48751ef-8a64-406b-bb64-517c8b136562",
"name": "New Assessment 1",
"description": "New Assessment",
"createTime": 1643925589790
}
]
}
}
}
}