Documentation

Introduction

This API service provides information about this concrete5 install, such as information about basic site configurations, the logged in user, and information about specific users and pages.


API Basics

This api provides responses in json. All api requests require a key to use. You can find this key in your profile page. You are limited to 100 requests every 86400 seconds. If you exceed this limitation more than 10 times your key will be banned.


Query Format

All query strings should be formatted like this: http://localhost:8888/bleed/index.php/api/?key=YOURKEY&action=blah. The possible choices for action are basic, currentUser, user, and page. These are explained in the following sections.


Basic Action

If the action stipulated is basic, basic information about the site is provided such as the site name and concrete5 version. This allows you to do simple integrations with third party systems to display the site name and to make sure a package is installed that you will query data from.


Current User

If the action stipulated is currentUser, then information about the logged in user will be provided. The information given is user ID, username, user email, and any user attributes. This allows for sso connections to be made between two applications.


User

If the action stipulated is user, then an addition parameter is required, ID. The id should be the user ID of the user you want to get information from. The information provided is user ID, username, user email, and any user properties. This allows for member lists or profile information to be pulled from a c5 site.


Page

If the action stipulated is page, then an addition parameter is required, ID. The id should be the collection ID of the page you want to get information from. The information provided is page creator, page type handle, page handle, page name, page description, and any page properties. This allows for page lists or page information to be pulled from a c5 site and used externally.


Examples

  • To get a User ID 27s Information: http://localhost:8888/bleed/index.php/api/?key=823429241&action=user&id=27
  • To get a Page ID 34s Information: http://localhost:8888/bleed/index.php/api/?key=823429241&action=page&id=34
  • To get the Logged In Users Information: http://localhost:8888/bleed/index.php/api/?key=823429241&action=currentUser


Errors

Errors are provided with a key of error and the message being the error message. Error Codes:
  • API Key is banned
  • API Key is banned
  • No action specified.
  • Invalid API Key.
  • You must specify a user/page id.
  • Invalid user/page id.