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

v1.0 2023-06-22 16:04 UTC

This package is auto-updated.

Last update: 2024-10-22 19:47:12 UTC


README

Latest Stable Version

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:

https://api.statuspage.io/v1/

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.

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

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