{"id":18498053,"url":"https://github.com/apivideo/statuspage-php","last_synced_at":"2025-04-09T00:30:55.161Z","repository":{"id":56949297,"uuid":"198641833","full_name":"apivideo/statuspage-php","owner":"apivideo","description":"StatusPage php client by api.video.","archived":false,"fork":false,"pushed_at":"2022-12-20T12:49:38.000Z","size":37,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T19:44:44.382Z","etag":null,"topics":["metrics","php"],"latest_commit_sha":null,"homepage":"https://api.video","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apivideo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-24T13:32:51.000Z","updated_at":"2023-05-26T08:44:16.000Z","dependencies_parsed_at":"2023-01-30T00:46:11.145Z","dependency_job_id":null,"html_url":"https://github.com/apivideo/statuspage-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fstatuspage-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fstatuspage-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fstatuspage-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apivideo%2Fstatuspage-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apivideo","download_url":"https://codeload.github.com/apivideo/statuspage-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247949745,"owners_count":21023378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metrics","php"],"created_at":"2024-11-06T13:37:24.996Z","updated_at":"2025-04-09T00:30:53.805Z","avatar_url":"https://github.com/apivideo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video)\n\n[![badge](https://img.shields.io/github/stars/apivideo/statuspage-php?style=social)](https://github.com/apivideo/statuspage-php)\n\n[![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)\n\n![](https://github.com/apivideo/.github/blob/main/assets/apivideo_banner.png)\n\n[api.video](https://api.video) is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.\n\n# apivideo/statuspage-php\n\n[StatusPage](https://statuspage.io) php client by [api.video](https://api.video).\n\n## Install\n\nThis package is installable and auto-loadable via [Composer](https://getcomposer.org):\n\n```shell\n$ composer require apivideo/statuspage-php\n```\n\n### Quick start\n\nFind your [StatusPage account page](https://manage.statuspage.io/pages/723skcwdvm7j/edit) to find your API key and other IDs.\n\nAuto-completion of code is available for every object of the library to ease development. \n\n```php\n\u003c?php\n\nuse ApiVideo\\StatusPage\\Client;\n\n$client = new Client('2c04e0b2-8c4a-b941-de65-012a61b7f6ea'); // User API key \n\nforeach ($client-\u003ecomponents as $component) {\n    echo $component-\u003eid.': '.$component-\u003ename.\"\\n\";\n}\n$client-\u003ecomponents-\u003esetStatus('7mst16b00d59', 'partial_outage');\n\nforeach ($client-\u003emetrics as $metric) {\n    echo $metric-\u003eid.': '.$metric-\u003ename.\"\\n\";\n}\n$client-\u003emetrics-\u003eaddPoint('gu1kkk8qe0dl', 12.5);\n```\n\n## Full API\n\nIf you have several pages in your StatusPage account, you need to select the page before operating on metrics or components.\n\nIt's better to set the default page ID as it avoids an API request to guess it. \n\n\n### Client instantiation\n\n```php\n\u003c?php\n\nuse ApiVideo\\StatusPage\\Client;\n\n$client = new Client(\n    '2c04e0b2-8c4a-b941-de65-012a61b7f6ea', // User API key\n    [\n        'page-id' =\u003e 'zujkhu4kgivg',        // (optional) Default page ID\n    ]\n);\n\n// You can also set the default page later.\n$client-\u003esetDefaultPageId('zujkhu4kgivg');\n```\n\n### Components API\n\n```php\n\u003c?php\n\nuse ApiVideo\\StatusPage\\Client;\nuse ApiVideo\\StatusPage\\Model\\Component;\n\n$client = new Client(/*..*/);\n\nforeach ($client-\u003ecomponents as $component) {\n    // Available properties:\n    echo $component-\u003eid;\n    echo $component-\u003ename;\n    echo $component-\u003edescription;\n    echo $component-\u003ecreated_at;\n    echo $component-\u003estatus;\n    echo $component-\u003eupdated_at;\n    echo $component-\u003egroup;\n    echo $component-\u003egroup_id;\n    echo $component-\u003eautomation_email;\n    echo $component-\u003eonly_show_if_degraded;\n    echo $component-\u003epage_id;\n    echo $component-\u003eposition;\n    echo $component-\u003eshowcase;\n}\n\n$component = $client-\u003ecomponents-\u003ecreate([\n    'name'        =\u003e 'Component name',\n    'description' =\u003e 'This is an example component',\n]);\necho $component-\u003eid; // a5xc8i1a03ki\n$component = $client-\u003ecomponents-\u003eupdate('a5xc8i1a03ki', ['description' =\u003e 'Another description']);\n$component = $client-\u003ecomponents-\u003esetStatus('a5xc8i1a03ki', Component::STATUS_MAINTENANCE); // Avoid using magic strings\n$client-\u003ecomponents-\u003edelete('a5xc8i1a03ki');\n```\n\n### Metrics API\n\n```php\n\u003c?php\n\nuse ApiVideo\\StatusPage\\Client;\n\n$client = new Client(/*..*/);\n\nforeach ($client-\u003emetrics as $metric) {\n    echo $metric-\u003eid;\n    echo $metric-\u003ename;\n    echo $metric-\u003ecreated_at;\n    echo $metric-\u003eupdated_at;\n    echo $metric-\u003emost_recent_data_at;\n    echo $metric-\u003ebackfilled;\n    echo $metric-\u003edecimal_places;\n    echo $metric-\u003emetrics_display_id;\n    echo $metric-\u003esuffix;\n    echo $metric-\u003etooltip_description;\n    echo $metric-\u003ey_axis_hidden;\n    echo $metric-\u003ey_axis_max;\n    echo $metric-\u003ey_axis_min;\n}\n\n$metric = $client-\u003emetrics-\u003ecreate([\n    'name'        =\u003e 'Component name',\n    'description' =\u003e 'This is an example component',\n]);\necho $metric-\u003eid; // 9zwc0v70t29n\n$metric = $client-\u003emetrics-\u003eupdate('9zwc0v70t29n', ['description' =\u003e 'Another description']);\n\n// Metric points\n$client-\u003emetrics-\u003eaddPoint('9zwc0v70t29n', random_int(0, 100));\n$metric = $client-\u003emetrics-\u003eget('9zwc0v70t29n');\necho $metric-\u003ename.' (last updated on '.date(DATE_ATOM, $metric-\u003emost_recent_data_at).')';\nprint_r($client-\u003emetrics-\u003egetPoints('9zwc0v70t29n'));\n\n$client-\u003emetrics-\u003edelete('9zwc0v70t29n');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapivideo%2Fstatuspage-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapivideo%2Fstatuspage-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapivideo%2Fstatuspage-php/lists"}