alissonlinneker / statuspage-php-sdk
# Code of Conduct Please don't abuse the API, and please report all feature requests and issues to https://support.atlassian.com/contact # Rate Limiting Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit increased, please contact us at https
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
Code of Conduct
Please don't abuse the API, and please report all feature requests and issues to https://support.atlassian.com/contact
Rate Limiting
Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit increased, please contact us at https://support.atlassian.com/contact
Error codes 420 or 429 indicate that you have exceeded the rate limit and the request has been rejected.
Basics
HTTPS
It's required
URL Prefix
In order to maintain version integrity into the future, the API is versioned. All calls currently begin with the following prefix:
RESTful Interface
Wherever possible, the API seeks to implement repeatable patterns with logical, representative URLs and descriptive HTTP verbs. Below are some examples and conventions you will see throughout the documentation.
- Collections are buckets: https://api.statuspage.io/v1/pages/asdf123/incidents.json
- Elements have unique IDs: https://api.statuspage.io/v1/pages/asdf123/incidents/jklm456.json
- GET will retrieve information about a collection/element
- POST will create an element in a collection
- PATCH will update a single element
- PUT will replace a single element in a collection (rarely used)
- DELETE will destroy a single element
Sending Data
Information can be sent in the body as form urlencoded or JSON, but make sure the Content-Type header matches the body structure or the server gremlins will be angry.
All examples are provided in JSON format, however they can easily be converted to form encoding if required. Some examples of how to convert things are below:
// JSON
{
\"incident\": {
\"name\": \"test incident\",
\"components\": [\"8kbf7d35c070\", \"vtnh60py4yd7\"]
}
}
// Form Encoded (using curl as an example):
curl -X POST https://api.statuspage.io/v1/example \\
-d \"incident[name]=test incident\" \\
-d \"incident[components][]=8kbf7d35c070\" \\
-d \"incident[components][]=vtnh60py4yd7\"
Authentication
For more information, please visit https://support.atlassian.com/contact.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/alissonlinneker/statuspage-php-sdk.git" } ], "require": { "alissonlinneker/statuspage-php-sdk": "*@dev" } }
Then run composer install
Or
Once you have Composer installed, you can install the statuspage-php-sdk by running the following command in the root directory of your project:
composer require alissonlinneker/statuspage-php-sdk
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: api_key $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new OpenAPI\Client\Api\ComponentGroupsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $page_id = 'page_id_example'; // string | Page identifier $id = 'id_example'; // string | Component group identifier try { $result = $apiInstance->deletePagesPageIdComponentGroupsId($page_id, $id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ComponentGroupsApi->deletePagesPageIdComponentGroupsId: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.statuspage.io/v1
Models
- Component
- ComponentGroupUptime
- ComponentGroupUptimeRelatedEvents
- ComponentUptime
- ComponentUptimeRelatedEvents
- DeletePagesPageIdPageAccessGroupsPageAccessGroupIdComponents
- DeletePagesPageIdPageAccessUsersPageAccessUserIdComponents
- DeletePagesPageIdPageAccessUsersPageAccessUserIdMetrics
- ErrorEntity
- GroupComponent
- Incident
- IncidentTemplate
- IncidentUpdate
- Metric
- MetricAddResponse
- MetricAddResponseMetricIdInner
- MetricsProvider
- Page
- PageAccessGroup
- PageAccessUser
- PatchPages
- PatchPagesPage
- PatchPagesPageIdComponentGroups
- PatchPagesPageIdComponents
- PatchPagesPageIdIncidents
- PatchPagesPageIdIncidentsIncident
- PatchPagesPageIdIncidentsIncidentComponents
- PatchPagesPageIdIncidentsIncidentIdIncidentUpdates
- PatchPagesPageIdIncidentsIncidentIdIncidentUpdatesIncidentUpdate
- PatchPagesPageIdMetrics
- PatchPagesPageIdMetricsMetric
- PatchPagesPageIdMetricsProviders
- PatchPagesPageIdMetricsProvidersMetricsProvider
- PatchPagesPageIdPageAccessGroups
- PatchPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
- PatchPagesPageIdPageAccessUsersPageAccessUserIdComponents
- PatchPagesPageIdPageAccessUsersPageAccessUserIdMetrics
- PatchPagesPageIdStatusEmbedConfig
- PatchPagesPageIdStatusEmbedConfigStatusEmbedConfig
- PatchPagesPageIdSubscribers
- Permissions
- PermissionsData
- PermissionsDataPages
- PostOrganizationsOrganizationIdUsers
- PostOrganizationsOrganizationIdUsersUser
- PostPagesPageIdComponentGroups
- PostPagesPageIdComponentGroupsComponentGroup
- PostPagesPageIdComponents
- PostPagesPageIdComponentsComponent
- PostPagesPageIdIncidentTemplates
- PostPagesPageIdIncidentTemplatesTemplate
- PostPagesPageIdIncidents
- PostPagesPageIdIncidentsIncident
- PostPagesPageIdIncidentsIncidentComponents
- PostPagesPageIdIncidentsIncidentIdSubscribers
- PostPagesPageIdIncidentsIncidentIdSubscribersSubscriber
- PostPagesPageIdMetricsData
- PostPagesPageIdMetricsMetricIdData
- PostPagesPageIdMetricsMetricIdDataData
- PostPagesPageIdMetricsProviders
- PostPagesPageIdMetricsProvidersMetricsProvider
- PostPagesPageIdMetricsProvidersMetricsProviderIdMetrics
- PostPagesPageIdMetricsProvidersMetricsProviderIdMetricsMetric
- PostPagesPageIdPageAccessGroups
- PostPagesPageIdPageAccessGroupsPageAccessGroup
- PostPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
- PostPagesPageIdPageAccessUsers
- PostPagesPageIdPageAccessUsersPageAccessUser
- PostPagesPageIdPageAccessUsersPageAccessUserIdComponents
- PostPagesPageIdPageAccessUsersPageAccessUserIdMetrics
- PostPagesPageIdSubscribers
- PostPagesPageIdSubscribersReactivate
- PostPagesPageIdSubscribersResendConfirmation
- PostPagesPageIdSubscribersSubscriber
- PostPagesPageIdSubscribersUnsubscribe
- Postmortem
- PutOrganizationsOrganizationIdPermissions
- PutOrganizationsOrganizationIdPermissionsPages
- PutOrganizationsOrganizationIdPermissionsPagesPageId
- PutPages
- PutPagesPageIdComponentGroups
- PutPagesPageIdComponents
- PutPagesPageIdIncidents
- PutPagesPageIdIncidentsIncidentIdIncidentUpdates
- PutPagesPageIdIncidentsIncidentIdPostmortem
- PutPagesPageIdIncidentsIncidentIdPostmortemPostmortem
- PutPagesPageIdIncidentsIncidentIdPostmortemPublish
- PutPagesPageIdIncidentsIncidentIdPostmortemPublishPostmortem
- PutPagesPageIdMetrics
- PutPagesPageIdMetricsProviders
- PutPagesPageIdPageAccessGroups
- PutPagesPageIdPageAccessGroupsPageAccessGroupIdComponents
- PutPagesPageIdPageAccessUsersPageAccessUserIdComponents
- PutPagesPageIdPageAccessUsersPageAccessUserIdMetrics
- PutPagesPageIdStatusEmbedConfig
- SingleMetricAddResponse
- StatusEmbedConfig
- Subscriber
- SubscriberCountByState
- SubscriberCountByType
- SubscriberCountByTypeAndState
- User
Authorization
Authentication schemes defined for the API:
api_key
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.0
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen