All URIs are relative to /api/v1
Method | HTTP request | Description |
---|---|---|
createFlag | POST /flags | |
deleteFlag | DELETE /flags/{flagID} | |
findFlags | GET /flags | |
getFlag | GET /flags/{flagID} | |
getFlagEntityTypes | GET /flags/entity_types | |
getFlagSnapshots | GET /flags/{flagID}/snapshots | |
putFlag | PUT /flags/{flagID} | |
restoreFlag | PUT /flags/{flagID}/restore | |
setFlagEnabled | PUT /flags/{flagID}/enabled |
\Flagr\Client\Model\Flag createFlag($body)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$body = new \Flagr\Client\Model\CreateFlagRequest(); // \Flagr\Client\Model\CreateFlagRequest | create a flag
try {
$result = $apiInstance->createFlag($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->createFlag: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\CreateFlagRequest | create a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFlag($flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$flag_id = 789; // int | numeric ID of the flag
try {
$apiInstance->deleteFlag($flag_id);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->deleteFlag: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Flag[] findFlags($limit, $enabled, $description, $tags, $description_like, $key, $offset, $preload, $deleted)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$limit = 789; // int | the numbers of flags to return
$enabled = true; // bool | return flags having given enabled status
$description = "description_example"; // string | return flags exactly matching given description
$tags = "tags_example"; // string | return flags with the given tags (comma separated)
$description_like = "description_like_example"; // string | return flags partially matching given description
$key = "key_example"; // string | return flags matching given key
$offset = 789; // int | return flags given the offset, it should usually set together with limit
$preload = true; // bool | return flags with preloaded segments and variants
$deleted = true; // bool | return all deleted flags
try {
$result = $apiInstance->findFlags($limit, $enabled, $description, $tags, $description_like, $key, $offset, $preload, $deleted);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->findFlags: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
limit | int | the numbers of flags to return | [optional] |
enabled | bool | return flags having given enabled status | [optional] |
description | string | return flags exactly matching given description | [optional] |
tags | string | return flags with the given tags (comma separated) | [optional] |
description_like | string | return flags partially matching given description | [optional] |
key | string | return flags matching given key | [optional] |
offset | int | return flags given the offset, it should usually set together with limit | [optional] |
preload | bool | return flags with preloaded segments and variants | [optional] |
deleted | bool | return all deleted flags | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Flag getFlag($flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$flag_id = 789; // int | numeric ID of the flag to get
try {
$result = $apiInstance->getFlag($flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->getFlag: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string[] getFlagEntityTypes()
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
try {
$result = $apiInstance->getFlagEntityTypes();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->getFlagEntityTypes: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
string[]
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\FlagSnapshot[] getFlagSnapshots($flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$flag_id = 789; // int | numeric ID of the flag to get
try {
$result = $apiInstance->getFlagSnapshots($flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->getFlagSnapshots: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get |
\Flagr\Client\Model\FlagSnapshot[]
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Flag putFlag($body, $flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$body = new \Flagr\Client\Model\PutFlagRequest(); // \Flagr\Client\Model\PutFlagRequest | update a flag
$flag_id = 789; // int | numeric ID of the flag to get
try {
$result = $apiInstance->putFlag($body, $flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->putFlag: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\PutFlagRequest | update a flag | |
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Flag restoreFlag($flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$flag_id = 789; // int | numeric ID of the flag to get
try {
$result = $apiInstance->restoreFlag($flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->restoreFlag: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Flagr\Client\Model\Flag setFlagEnabled($body, $flag_id)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Flagr\Client\Api\FlagApi(
// 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()
);
$body = new \Flagr\Client\Model\SetFlagEnabledRequest(); // \Flagr\Client\Model\SetFlagEnabledRequest | set flag enabled state
$flag_id = 789; // int | numeric ID of the flag to get
try {
$result = $apiInstance->setFlagEnabled($body, $flag_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagApi->setFlagEnabled: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Flagr\Client\Model\SetFlagEnabledRequest | set flag enabled state | |
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]