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

# Get sites challenges actions

> This API returns :
- the targeted actions for the site and the challenge
- the usage type per action
- the status per action (ALREADY_DONE or ENGAGED)
- the number of engaged sites per action
- the estimated saving percentage on the usage per action




## OpenAPI

````yaml /api-reference/green-actions.yaml get /sites/{site-id}/challenges/{challenge-id}/actions
openapi: 3.0.1
info:
  title: Challenges lifecycle
  description: >
    This API manages the lifecycles of the challenges, the actions and the user
    engagements.
  termsOfService: ''
  version: 1.0.x
servers:
  - url: https://api.home.datanumia.com/api/v1
security: []
paths:
  /sites/{site-id}/challenges/{challenge-id}/actions:
    get:
      tags:
        - Challenge's actions
      description: |
        This API returns :
        - the targeted actions for the site and the challenge
        - the usage type per action
        - the status per action (ALREADY_DONE or ENGAGED)
        - the number of engaged sites per action
        - the estimated saving percentage on the usage per action
      operationId: getActionsWithChallengeEngagements
      parameters:
        - name: site-id
          in: path
          description: The site identifier
          required: true
          schema:
            type: string
        - name: challenge-id
          in: path
          description: The challenge identifier
          required: true
          schema:
            type: string
        - name: actionSavingPeriod
          in: query
          description: The action saving period
          schema:
            type: string
            enum:
              - ALL
              - HP
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetActionWithChallengeEngagementResponse'
        '400':
          description: >-
            Functional Error. Possible values   <table>\n           
            <tr><td><b>status</b></td><td><b>title</b></td><td><b>detail</b></td></tr>\n             
            <tr><td>400</td><td>INVALID_CONFIGURATION</td><td>nbDayConsumptionHistory
            field is mandatory</td></tr>\n  
            <tr><td>400</td><td>INVALID_CONFIGURATION</td><td>nbDayConsumptionRequired
            field is mandatory</td></tr>\n  
            <tr><td>400</td><td>INVALID_CONFIGURATION</td><td>tariffHeadings
            field is mandatory and should not be empty</td></tr>\n         
            </table>
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '404':
          description: >-
            Functional Error. Possible values   <table>\n           
            <tr><td><b>status</b></td><td><b>title</b></td><td><b>detail</b></td></tr>\n           
            <tr><td>404</td><td>CHALLENGE_NOT_FOUND</td><td>Challenge with id=%
            not found</td></tr>\n  
            <tr><td>404</td><td>CONTRACT_NOT_FOUND</td><td>Contract not
            found</td></tr>\n            </table>
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
        '500':
          description: Technical Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
components:
  schemas:
    GetActionWithChallengeEngagementResponse:
      required:
        - actionId
        - actionType
        - usageType
      type: object
      properties:
        actionId:
          type: string
          description: The action identifier
          example: HEATING_DROP_2C
        actionType:
          type: string
          description: The action type
          example: DROP
          enum:
            - DROP
            - SWITCHOFF
            - SHIFT
        globalSaving:
          type: number
          description: >-
            The estimated saving percentage on the global consumption of the
            called site-id
          example: 2
        status:
          type: string
          description: The action status
          enum:
            - ALREADY_DONE
            - ENGAGED
        usageSaving:
          type: number
          description: The estimated saving percentage on the action's usage
          example: 4
        usageType:
          type: string
          description: The usage type
          example: US_HEATING
        kwhGlobalSavingPerDay:
          type: number
          description: The global saving kwh per day
          example: 5
          nullable: true
        actionSavingPeriod:
          type: string
          description: The action saving period
          example: ALL
          enum:
            - ALL
            - HP
    ProblemDetail:
      required:
        - type
        - status
      properties:
        type:
          type: object
        title:
          type: string
          description: The problem title
        status:
          type: integer
          description: The problem status
        detail:
          type: string
          description: The problem detail
        instance:
          type: object
          description: The problem instance. By default, the request path
        properties:
          type: object
          description: A generic map of properties
      description: Representation for an RFC 7807 problem detail

````