parameters: ()
return_statement: return "ok", 200
docstring: Initiate change state.
      Returns:
docstring_summary: Initiate change state.
      Returns:
docstring_tokens: Initiate change state . Returns :
function: def change_state():
      """
      Initiate change state.
      Returns:
  
      """
      payload = json.loads(request.get_data(as_text=False) or "(empty payload)")
      logging.debug(
          "Starting change_state action %s project %s tagkey %s tagvalue %s",
          payload["action"],
          payload["project"],
          payload["tagkey"],
          payload["tagvalue"],
      )
      schedule_tasks.change_state(
          payload["tagkey"], payload["tagvalue"], payload["action"], payload["project"]
      )
      return "ok", 200
function_tokens: def change_state ( ) : payload = json . loads ( request . get_data ( as_text = False ) or "(empty payload)" ) logging . debug ( "Starting change_state action %s project %s tagkey %s tagvalue %s" , payload [ "action" ] , payload [ "project" ] , payload [ "tagkey" ] , payload [ "tagvalue" ] , ) schedule_tasks . change_state ( payload [ "tagkey" ] , payload [ "tagvalue" ] , payload [ "action" ] , payload [ "project" ] ) return "ok" , 200