> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Group of Missions

> Allows searching for Group of Missions (campaigns) available to the current authenticated user. Group of Missions are filtered based on what current listings and organizations the current user has access to.



## OpenAPI

````yaml /mission-v2-openapi.yaml get /v2/campaigns/
openapi: 3.0.3
info:
  title: Mission Service v2
  description: RESTful API for managing campaigns, tasks, and mission-related operations.
  version: 1.0.29
  contact:
    name: Synack Engineering
    email: engineering@synack.com
servers:
  - url: https://client.synack.com/api/tasks
    description: Commercial
  - url: https://client.synack.us/api/tasks
    description: FedRAMP (Medium)
security:
  - bearerAuth: []
tags:
  - name: Missions
    description: Access mission information.
paths:
  /v2/campaigns/:
    get:
      tags:
        - Missions
      summary: Search for Group of Missions.
      description: >-
        Allows searching for Group of Missions (campaigns) available to the
        current authenticated user. Group of Missions are filtered based on what
        current listings and organizations the current user has access to.
      operationId: GetCampaigns
      parameters:
        - name: page
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/Page'
        - name: perPage
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/PerPage'
        - name: sort
          description: Sorts by field names.
          in: query
          required: false
          schema:
            type: array
            description: >-
              If sorting is done on "TASKSFAILED" then it will set
              includeTaskStats to true.
            items:
              default: PUBLISHED
              enum:
                - PUBLISHED
                - TASKSFAILED
                - CREATED
                - STATUSCREATED
                - COMPLETED
        - name: sortDir
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/SortDir'
        - name: q
          description: Search by campaign's title, description or scope
          in: query
          required: false
          schema:
            type: string
        - name: createdByRole
          description: Filter campaigns by created_role
          in: query
          required: false
          schema:
            type: string
        - name: orgUids
          description: Filter by organization UIDs.
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: listingUids
          description: Filter by listing UIDs.
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              format: uuid
        - name: status
          description: Filter by Campaign Status.
          in: query
          required: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/CampaignStatus'
        - name: listingType
          description: Filter by listing types. Search is performed on the campaign's tags.
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - name: includeTaskStats
          description: >
            If this set to true, then additional tasks stats fields will be set
            for each campaign in the response which include:
              * tasksTotal
              * tasksCompleted
              * tasksPassed
              * tasksFailed
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: includeCatalogCategory
          description: >-
            If set to true, then the CampaignCatalog that each Campaign belongs
            to will be included in the response.
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: includePublishedWaiting
          description: >
            If this is set to true, then additional tasksPublishedWaiting field
            will be set for each campaign in the response, which contains the
            count of missions that have been in PUBLISHED state for more than 30
            minutes.
          in: query
          required: false
          schema:
            type: boolean
            default: false
        - name: publishedStartDate
          description: >-
            It is possible this value alone to the query. If both published
            start and end date are provided, it is required for startDate <
            endDate.
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: publishedEndDate
          description: >-
            It is possible this value alone to the query. If both published
            start and end date are provided, it is required for startDate <
            endDate.
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: deactivated
          description: Filter by activated/deactivated campaigns.
          in: query
          required: false
          schema:
            type: boolean
        - name: creditsDeducted
          description: Whether to return deducted credits.
          in: query
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful operation.
          headers:
            X-Request-ID:
              $ref: '#/components/schemas/RequestID'
            Pagination-Limit:
              $ref: '#/components/schemas/HeaderPaginationLimit'
            Pagination-Current-Page:
              $ref: '#/components/schemas/HeaderPaginationCurrentPage'
            Pagination-Total-Pages:
              $ref: '#/components/schemas/HeaderPaginationTotalPages'
            Pagination-Total-Count:
              $ref: '#/components/schemas/HeaderPaginationTotalCount'
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetCampaignsResult'
        '400':
          description: >-
            Returned when query params are in bad format or when some of the
            Tasks requested for retesting were not found.
          headers:
            X-Request-ID:
              $ref: '#/components/schemas/RequestID'
          content:
            application/problem+json:
              schema:
                type: object
                description: >-
                  Response returned with more information about the error that
                  occurred.
                properties:
                  errorCode:
                    $ref: '#/components/schemas/ExtErrorCode400'
                  errorMsg:
                    $ref: '#/components/schemas/ResponseErrMsg'
        '403':
          description: >-
            Returned whenever a user does not have the required features
            enabled, has no orgs/listings assigned.
          headers:
            X-Request-ID:
              $ref: '#/components/schemas/RequestID'
          content:
            application/problem+json:
              schema:
                type: object
components:
  schemas:
    Page:
      type: integer
      description: Page to start showing results from.
      minimum: 1
      default: 1
    PerPage:
      type: integer
      description: Number of items to show per page.
      minimum: 1
      default: 1
    SortDir:
      type: string
      description: Sort direction.
      default: desc
      enum:
        - asc
        - desc
    CampaignStatus:
      type: string
      description: Campaign status enum.
      enum:
        - CREATED
        - COMPLETED
        - PUBLISHED
    RequestID:
      type: string
      format: uuid
      description: >-
        A unique UUID generated for every request. In the case of an error, this
        error should be included in the error report by the user so that we can
        easily filter the logs and find the error quicker.
    HeaderPaginationLimit:
      type: string
      description: The number of per page entries.
    HeaderPaginationCurrentPage:
      type: string
      description: The current page requested on the query params.
    HeaderPaginationTotalPages:
      type: string
      description: The total number of pages available for the specified query.
    HeaderPaginationTotalCount:
      type: string
      description: The total number of entries available for the specified query.
    GetCampaignsResult:
      type: object
      description: >-
        Response model used by the GET /campaigns/ endpoint. All nullable fields
        will be omitted from the response body if their value is null.
      properties:
        id:
          type: string
          format: uuid
        title:
          type: string
        listingUid:
          type: string
          format: uuid
        listingCodename:
          type: string
        listingName:
          type: string
        organizationUid:
          type: string
          format: uuid
        organizationName:
          type: string
        organizationCodename:
          type: string
        status:
          $ref: '#/components/schemas/CampaignStatus'
        published:
          type: string
          format: date
          nullable: true
        completed:
          type: string
          format: date
          nullable: true
        tasksCompleted:
          type: integer
        tasksTotal:
          type: integer
        tasksPassed:
          type: integer
        tasksFailed:
          type: integer
        tasksPublishedWaiting:
          type: integer
          description: >-
            Count of missions that have been in PUBLISHED state for more than 30
            minutes.
        isRetestable:
          type: boolean
          description: |
            This flag will be set to true if these conditions are met:
              * The campaign is completed.
              * The campaign is not a retest (parentUid is NULL).
              * The campaign's listing has the boss active flag set to true.
              * The campaign's listing has active tests.
              * The campaign's listing is not paused by the client.
        parentUid:
          type: string
          format: uuid
          nullable: true
        deactivated:
          type: string
          format: date
          nullable: true
        createdOn:
          type: string
          format: date
          nullable: true
        createdByRole:
          type: string
          nullable: true
        creditsDeducted:
          type: integer
          nullable: true
        catalogCategory:
          $ref: '#/components/schemas/CatalogCategoryResult'
    ExtErrorCode400:
      type: integer
      format: int64
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 7
        - 8
        - 9
        - 10
        - 11
      description: |
        400 Bad Request extended error codes:
          * 1 - Invalid Parameters found in the request.
          * 2 - Campaign is not retestable.
          * 3 - Some Task IDs were not found. When this code is set, the payload will contain a string array with all of the Task IDs that were not found.
          * 4 - Task ID was not specified when trying to spend credits.
          * 5 - Task is deactivated.
          * 7 - Campaign template was not found.
          * 8 - Task already has v1 evidence information.
          * 9 - Some requested Task Templates for instantiation were not found.
          * 10 - No active sprint was found for listing.
          * 11 - Invalid task response value.
          * 12 - Some requested Campaign for missionize was not found.
          * 13 - Some SVs already have tasks associated.
          * 14 - Some requested Task Templates for missionize were not found.
          * 15 - Type not supported during missionize.
          * 16 - The requested task types echoed in the payload are not allowed for the current user.
          * 17 - The requested does not have enough balance to created.
    ResponseErrMsg:
      type: string
      description: >-
        When included, this error message provides the developer a more
        descriptive error message in the default lang (english). This error
        message should not be used to show to the client.
    CatalogCategoryResult:
      type: object
      description: >-
        The CatalogCategory which this Campaign belongs to (via
        CampaignTemplate).
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````