Skip to content
This repository has been archived by the owner on Oct 27, 2019. It is now read-only.

API Endpoints

Kyle Reis edited this page Sep 19, 2017 · 4 revisions

This documents the expected API endpoints and behavior as of the Cru Central Coast Keystone 1.0.0 release.

Campuses

Community Groups

Events

Ministries

Notifications

Passengers

Prayer Requests

Prayer Responses

Resources

Data Format

{
  url: URL,
  type: String w/options('article', 'audio', 'video'),
  date: Date,
  title: String,
  author: String,
  description: String,
  restricted: Boolean,
  imageLink: URL,
  squareImageLink: URL
  tags: Reference to Resource Tag
}

All of the Resource endpoints are found at <url>/api/resources/<endpoint>


/

GET
Returns a listing of all of the non-restricted Resources and their data.
To get the restricted Resources also the query will need to contain LeaderAPIKey:Key

POST
Creates a new resource.
Required payload fields:

{  
  url:URL,  
  type:('article', 'audio', 'video'),  
  title:string,  
  author:string
}

/:id

GET
:id is the id of the resource you are trying to look up.
To get a restricted Resource the query will need to contain LeaderAPIKey:Key Returns all data for the resource with the provided id.

Example: <url>/api/resources/0342739457239487

PATCH
:id is the id of the resource you are trying to modify. The payload would include any fields you want to modify.


/find

POST
Find is still a bit of a mystery to me. I will finish this one when I actually understand it.


/enumValues/:key

GET
I'm not really sure on this one either.

Resource Pages

Data Format

{
  title: String,
  state: String w/options('draft', 'published', 'archived'),
  author: String,
  publishedDate: Date,
  content: HTML,
  tags: Reference to Resource Tag,
  restricted: Boolean
}

All of the Resource Page endpoints are found at <url>/api/resourcepages/<endpoint>

/

GET

Returns a listing of all of the Resource Pages and their data.
To get the restricted Resource Pages also the query will need to contain LeaderAPIKey:Key


POST

Creates a new Resource Page.
Required payload fields:

{  
  title:string  
}

/:id

GET
:id is the id of the Resource you are trying to look up.
To get a restricted Resource Page the query will need to contain LeaderAPIKey:Key. Returns all data for the Resource Page with the provided id.

Example: <url>/api/resourcepages/0342739457239487

PATCH
:id is the id of the Resource Page you are trying to modify. The payload would include any fields you want to modify.


/find

POST
Find is still a bit of a mystery to me. I will finish this one when I actually understand it.


/enumValues/:key

GET
I'm not really sure on this one either.

Resource Tags

Rides

Summer Missions

Users