Integration/HealthIntegration.php
private function updateIncident($incidentId, $incidentStatus = null, $name = null, $body = null, $componentIds = [])
    {
        $result = [];
        if ($this->isConfigured()) {
            $clientIdKey = $this->getClientIdKey();
            $cacheKey    = 'statuspageUpdateIncident'.$this->keys[$clientIdKey].implode('-', $componentIds);
            $cacheExpire = 10;
            if (!$result = $this->cache->get($cacheKey, $cacheExpire)) {
                $clientSKey = $this->getClientSecretKey();
                $state      = $this->getAuthLoginState();
                $url        = $this->getAuthenticationUrl()
                    .'pages/'.$this->keys[$clientIdKey].'/incidents/'.$incidentId.'.json'
                    .'?api_key='.$this->keys[$clientSKey]
                    .'&response_type=code'
                    .'&state='.$state;
                if ($body) {
                    $url .= '&incident[body]='.urlencode($body);
                }
                if ($incidentStatus) {
                    $url .= '&incident[status]='.urlencode($incidentStatus);
                }
                if ($name) {
                    $url .= '&incident[name]='.urlencode($name);
                }
                foreach ($componentIds as $componentId) {
                    $url .= '&incident[component_ids][]='.(int) $componentId;
                }
                $result = $this->makeRequest($url, ['ignore_event_dispatch' => true], 'PATCH');
                if (is_array($result) && count($result)) {
                    $this->cache->set($cacheKey, $result, $cacheExpire);
                }
            }
        }

        return $result;
    }
private function updateIncident($incidentId, $incidentStatus = null, $name = null, $body = null, $componentIds = [])
    {
        $result = [];
        if ($this->isConfigured()) {
            $clientIdKey = $this->getClientIdKey();
            $cacheKey    = 'statuspageUpdateIncident'.$this->keys[$clientIdKey].implode('-', $componentIds);
            $cacheExpire = 10;
            if (!$result = $this->cache->get($cacheKey, $cacheExpire)) {
                $clientSKey = $this->getClientSecretKey();
                $state      = $this->getAuthLoginState();
                $url        = $this->getAuthenticationUrl()
                    .'pages/'.$this->keys[$clientIdKey].'/incidents/'.$incidentId.'.json'
                    .'?api_key='.$this->keys[$clientSKey]
                    .'&response_type=code'
                    .'&state='.$state;
                if ($body) {
                    $url .= '&incident[body]='.urlencode($body);
                }
                if ($incidentStatus) {
                    $url .= '&incident[status]='.urlencode($incidentStatus);
                }
                if ($name) {
                    $url .= '&incident[name]='.urlencode($name);
                }
                foreach ($componentIds as $componentId) {
                    $url .= '&incident[component_ids][]='.(int) $componentId;
                }
                $result = $this->makeRequest($url, ['ignore_event_dispatch' => true], 'PATCH');
                if (is_array($result) && count($result)) {
                    $this->cache->set($cacheKey, $result, $cacheExpire);
                }
            }
        }

        return $result;
    }
private function updateIncident ( $ incidentId , $ incidentStatus = null , $ name = null , $ body = null , $ componentIds = [ ] ) { $ result = [ ] ; if ( $ this -> isConfigured ( ) ) { $ clientIdKey = $ this -> getClientIdKey ( ) ; $ cacheKey = 'statuspageUpdateIncident' . $ this -> keys [ $ clientIdKey ] . implode ( '-' , $ componentIds ) ; $ cacheExpire = 10 ; if ( ! $ result = $ this -> cache -> get ( $ cacheKey , $ cacheExpire ) ) { $ clientSKey = $ this -> getClientSecretKey ( ) ; $ state = $ this -> getAuthLoginState ( ) ; $ url = $ this -> getAuthenticationUrl ( ) . 'pages/' . $ this -> keys [ $ clientIdKey ] . '/incidents/' . $ incidentId . '.json' . '?api_key=' . $ this -> keys [ $ clientSKey ] . '&response_type=code' . '&state=' . $ state ; if ( $ body ) { $ url .= '&incident[body]=' . urlencode ( $ body ) ; } if ( $ incidentStatus ) { $ url .= '&incident[status]=' . urlencode ( $ incidentStatus ) ; } if ( $ name ) { $ url .= '&incident[name]=' . urlencode ( $ name ) ; } foreach ( $ componentIds as $ componentId ) { $ url .= '&incident[component_ids][]=' . ( int ) $ componentId ; } $ result = $ this -> makeRequest ( $ url , [ 'ignore_event_dispatch' => true ] , 'PATCH' ) ; if ( is_array ( $ result ) && count ( $ result ) ) { $ this -> cache -> set ( $ cacheKey , $ result , $ cacheExpire ) ; } } } return $ result ; }
Update an active statuspage incident.

@param       $incidentId
@param null  $incidentStatus The status, one of investigating|identified|monitoring|resolved
@param null  $name           The name of the incident
@param null  $body           The body of the new incident update that will be created
@param array $componentIds   List of components affected by the incident

@return array|mixed|string
Update an active statuspage incident .