Skip to content

Latest commit

 

History

History
144 lines (96 loc) · 4.94 KB

ConfluenceApi.md

File metadata and controls

144 lines (96 loc) · 4.94 KB

ConfluenceClient\ConfluenceApi

All URIs are relative to http://localhost/rest/api

Method HTTP request Description
getContentById GET /content/{pageId} Gets a confluence page content by id.
getSpace GET /space/{spaceKey} Returns information about a space.

getContentById

\ConfluenceClient\Model\ConfluencePageRepresentation getContentById($page_id, $status, $version, $expand)

Gets a confluence page content by id.

Returns a piece of Content.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: crowdAuth
$config = ConfluenceClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new ConfluenceClient\Api\ConfluenceApi(
    // 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 = 56; // int | The page ID to return information about the page.
$status = 'status_example'; // string | list of Content statuses to filter results on. Default value: [current]
$version = new \stdClass; // object | 
$expand = 'history,space,version'; // string | A comma separated list of properties to expand on the content. Default value: history,space,version We can also specify some extensions such as extensions.inlineProperties (for getting inline comment-specific properties) or extensions.resolution for the resolution status of each comment in the results

try {
    $result = $apiInstance->getContentById($page_id, $status, $version, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfluenceApi->getContentById: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page_id int The page ID to return information about the page.
status string list of Content statuses to filter results on. Default value: [current] [optional]
version object [optional]
expand string A comma separated list of properties to expand on the content. Default value: history,space,version We can also specify some extensions such as extensions.inlineProperties (for getting inline comment-specific properties) or extensions.resolution for the resolution status of each comment in the results [optional] [default to 'history,space,version']

Return type

\ConfluenceClient\Model\ConfluencePageRepresentation

Authorization

crowdAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSpace

\ConfluenceClient\Model\ConfluenceSpaceExists getSpace($space_key, $expand)

Returns information about a space.

Returns information about a space.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure HTTP basic authorization: crowdAuth
$config = ConfluenceClient\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new ConfluenceClient\Api\ConfluenceApi(
    // 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
);
$space_key = 'space_key_example'; // string | The space key to return information about the space
$expand = 'expand_example'; // string | a comma separated list of properties to expand on the space

try {
    $result = $apiInstance->getSpace($space_key, $expand);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConfluenceApi->getSpace: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
space_key string The space key to return information about the space
expand string a comma separated list of properties to expand on the space [optional]

Return type

\ConfluenceClient\Model\ConfluenceSpaceExists

Authorization

crowdAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]