Campaigns

Save a campaign details

post/campaigns

Request

Request body

campaignType'system-update' | 'software-update'

Type of campaign (with version determine what kind of campaign you handle and the details object)

versioninteger

Version of campaign (with type determine what kind of campaign you handle and the details object)

Example request

{
  "info": {
    "id": "0076a379-f32d-4732-9e91-33ab219d8fde",
    "name": "Update all systems",
    "schedule": {
      "start": {
        "hour": 17,
        "minute": 22
      },
      "end": {
        "hour": 3,
        "minute": 42
      },
      "tz": "Europe/Paris"
    }
  },
  "version": 2,
  "details": {
    "targets": [
      [
        {
          "include": {
            "or": [
              "special:all"
            ]
          },
          "exclude": {
            "or": [
              "policyServer:root",
              "group:cd377524-808b-4b42-8724-6ef308efeac7"
            ]
          }
        }
      ]
    ]
  }
}

Response

Campaign details result

result'success' | 'error' required

Result of the request

action'saveCampaign' required

The id of the action

Example response

{
  "data": {
    "campaigns": [
      {
        "info": {
          "id": "0076a379-f32d-4732-9e91-33ab219d8fde",
          "name": "Update all systems",
          "schedule": {
            "start": {
              "hour": 17,
              "minute": 22
            },
            "end": {
              "hour": 3,
              "minute": 42
            },
            "tz": "Europe/Paris"
          }
        },
        "version": 2,
        "details": {
          "targets": [
            [
              {
                "include": {
                  "or": [
                    "special:all"
                  ]
                },
                "exclude": {
                  "or": [
                    "policyServer:root",
                    "group:cd377524-808b-4b42-8724-6ef308efeac7"
                  ]
                }
              }
            ]
          ]
        }
      }
    ]
  }
}

Changes

    • warning

      removed the request property ///////

    • warning

      removed the optional property ////////// from the response with the status

    • info

      added the new optional request property ///////

    • info

      added the optional property ////////// to the response with the status