Share:
ClickHelp Documentation

API: Getting Projects

You can use ClickHelp API to obtain information on projects in your portal and topics in those projects.

Getting projects requests list:


Get All Projects and Publications

GET Request Get all projects and publications
/api/v1/projects HTTP/1.1 

You can obtain the full list of projects and publications available to the current user using the sample request below.

Authorization

This request is using basic authentication.

Request parameters

This request does not have any request parameters.

Request example

Below is an example of a CURL command line you can use in a batch file to get all projects and publications available to the "administrator" user.

Code
curl -X GET ^
--basic ^
--user administrator:t62dVG0YkqdTHO4G4K7z2jQ8 ^
--cacert comodo.ca-bundle ^
https://kb.clickhelp.co/api/v1/projects

Response example

JSON
{[  
{
"fullUrl":"http://kb.clickhelp.co/articles/project-imported-manual",
"parentUrl":null,
"title":"Imported Manual",
"url":"project-imported-manual",
"visibility":"Private",
"createdOn":"2017-12-07T11:39:23"
},
{
"fullUrl":"http://kb.clickhelp.co/articles/imported-manual-publication",
"parentUrl":"project-imported-manual",
"title":"Imported Manual Publication",
"url":"imported-manual-publication",
"visibility":"Public",
"createdOn":"2017-12-22T13:28:44"
}
]}

Response fields

title String The title of the project or publication.
url String The project URL identifier (e.g. "clickhelp-documentation"). 
fullUrl String

The full URL which can be used to open the project in a web browser (the URL will resolve to the first topic in TOC automatically).

For example "http://doc.clickhelp.co/project/clickhelp-documentation"

parentUrl String The URL identifier of a parent entity. This field can be used to determine whether the entity is a project or publication and which project the publication belongs to. For projects, this field will always be null. For publications, this field will contain the URL identifier of the project the publication belongs to (e.g. "project-clickhelp-documentation").
visibility String

The project or publication visibility. Always "Private" for projects, can be one of the following values for publications:

  • Private
  • Restricted
  • Public
createdOnStringThe project or publication creation date in the ISO 8601 format and the GMT timezone.

Response Codes

All API functions may return error codes listed in the Error Handling topic. Below are the operation-specific meanings of some response codes:

200: OK

The status request has succeeded, the response body contains the task progress information.

403: Forbidden

The user does not have permission to obtain the list of projects and publications from the portal.

Get Projects and Publications Available to Specific User

GET Request Get projects and publications available to specific user
/api/v1/users/{userName}/projects HTTP/1.1 

You can obtain the full list of publications available to a specific Power Reader user using the sample request below.

Authorization

This request is using basic authentication.

Request parameters

Path parameters

userName

required

string The login of the Power Reader

Request Example

Below is an example of a CURL command line you can use in a batch file to get all projects and publications available to the "reader" user.

Code
curl -X GET ^
--basic ^
--user administrator:t62dVG0YkqdTHO4G4K7z2jQ8 ^
--cacert comodo.ca-bundle ^
https://kb.clickhelp.co/api/v1/users/reader/projects

Response example

JSON
{[  
{
"fullUrl":"http://kb.clickhelp.co/articles/admin-manual",
"parentUrl":"project-admin-manual",
"title":"Admin Manual",
"url":"admin-manual",
"visibility":"Restricted"
},
{
"fullUrl":"http://kb.clickhelp.co/articles/imported-manual-publication",
"parentUrl":"project-imported-manual",
"title":"Imported Manual Publication",
"url":"imported-manual-publication",
"visibility":"Public"
}
]}

Response fields

title String The title of the project or publication.
url String The project URL identifier (e.g. "clickhelp-documentation"). 
fullUrl String

The full URL which can be used to open the project in a web browser (the URL will resolve to the first topic in TOC automatically).

For example "http://doc.clickhelp.co/project/clickhelp-documentation"

parentUrl String The URL identifier of a parent entity. This field can be used to determine whether the entity is a project or publication and which project the publication belongs to. For projects, this field will always be null. For publications, this field will contain the URL identifier of the project the publication belongs to (e.g. "project-clickhelp-documentation").
visibility String

The project or publication visibility. Always "Private" for projects, can be one of the following values for publications:

  • Private
  • Restricted
  • Public
createdOnStringThe project or publication creation date in the ISO 8601 format and the GMT timezone.

Response codes

All API functions may return error codes listed in the Error Handling topic. Below are the operation-specific meanings of some response codes:

200: OK

The status request has succeeded, the response body contains the task progress information.

403: Forbidden

The authenticated user does not have permission to obtain the list of projects and publications from the portal. Or, the user does not have permission to view the given Power Reader's profile.

Get Specific Project

GET Request Get specific project
/api/v1/projects/{id} HTTP/1.1 

You can obtain information on a specific project or publication using the sample request below.

Authorization

This request is using basic authentication.

Request parameters

Path parameters

id

required

string The ID of the project or the publication to get information about.

Request Example

Below is an example of a CURL command line you can use in a batch file to get all projects and publications available to the "administrator" user.

Code
curl -X GET ^
--basic ^
--user administrator:t62dVG0YkqdTHO4G4K7z2jQ8 ^
--cacert comodo.ca-bundle ^
https://kb.clickhelp.co/api/v1/projects/imported-manual-publication

Response example

JSON
{  
"fullUrl":"http://kb.clickhelp.co/articles/imported-manual-publication",
"parentUrl":"project-imported-manual",
"title":"Imported Manual Publication",
"url":"imported-manual-publication",
"visibility":"Public"
}

Response fields

title String The title of the project or publication.
url String The project URL identifier (e.g. "clickhelp-documentation"). 
fullUrl String

The full URL which can be used to open the project in a web browser (the URL will resolve to the first topic in TOC automatically).

For example "http://doc.clickhelp.co/project/clickhelp-documentation"

parentUrl String The URL identifier of a parent entity. This field can be used to determine whether the entity is a project or publication and which project the publication belongs to. For projects, this field will always be null. For publications, this field will contain the URL identifier of the project the publication belongs to (e.g. "project-clickhelp-documentation").
visibility String

The project or publication visibility. Always "Private" for projects, can be one of the following values for publications:

  • Private
  • Restricted
  • Public
createdOnStringThe project or publication creation date in the ISO 8601 format and the GMT timezone.

Response codes

All API functions may return error codes listed in the Error Handling topic. Below are the operation-specific meanings of some response codes:

200: OK

The status request has succeeded, the response body contains the task progress information.

403: Forbidden

The user does not have permission to access the project or publication.

404: Not Found

There is no project or publication with the given URL.