-
Notifications
You must be signed in to change notification settings - Fork 12
API Endpoints
This documents the expected API endpoints and behavior as of the Cru Central Coast Keystone 1.0.0 release.
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
}
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.
POST
Find is still a bit of a mystery to me. I will finish this one when I actually understand it.
GET
I'm not really sure on this one either.
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>
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
Creates a new Resource Page.
Required payload fields:
{
title:string
}
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.
POST
Find is still a bit of a mystery to me. I will finish this one when I actually understand it.
GET
I'm not really sure on this one either.