Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siteleaf/siteleaf-v1-api
Siteleaf v1 API documentation
https://github.com/siteleaf/siteleaf-v1-api
archived documentation siteleaf-api siteleaf-v1
Last synced: 28 days ago
JSON representation
Siteleaf v1 API documentation
- Host: GitHub
- URL: https://github.com/siteleaf/siteleaf-v1-api
- Owner: siteleaf
- Created: 2013-05-21T23:31:32.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-06-06T19:09:41.000Z (over 8 years ago)
- Last Synced: 2024-04-21T02:09:21.406Z (9 months ago)
- Topics: archived, documentation, siteleaf-api, siteleaf-v1
- Homepage: http://www.siteleaf.com
- Size: 13.7 KB
- Stars: 34
- Watchers: 10
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**NOTE:** These documents refer to an outdated version of Siteleaf, and are provided for archival purposes. For help with the latest version of the Siteleaf API see .
# Siteleaf - API Documentation
## API Authentication
Siteleaf uses Basic Auth of the user's API key and secret to authenticate each request. To retrieve a user's API key and secret, use the `POST /v1/auth` endpoint, passing the user's email and password authenticated with Basic Auth.
### Basic Auth
```shell
curl -X GET -u api_key:api_secret https://api.siteleaf.com/
```
## API Endpoints
### POST /v1/auth.json
Authenticates user and returns user API keys#### Request
```shell
curl -X POST -u email:password https://api.siteleaf.com/v1/auth.json
```#### Response
```json
{
"api_key": "e4f5b6acae2c39079c07e35d90d87b1c",
"api_secret": "106afa1abf96767774bbcc4dd766d419"
}
```-
### GET /v1/ping.json
Pings the server.#### Response
```json
{
"ping": "pong"
}
```-
### GET /v1/users/me.jsonReturns the current user.
#### Response
```json
{
"id": "51af47a8ef75ac5e8c000001",
"email": "[email protected]",
"firstname": "Barack",
"lastname": "Obama",
"fullname": "Barack Obama",
"created_at": "2015-06-24T10:08:20.741-04:00",
"updated_at": "2015-06-24T10:08:20.741-04:00"
}
```-
### GET /v1/users.jsonReturns array of users associated with your sites and the sites you belong to.
#### Response
```json
[
{
"id": "51af47a8ef75ac5e8c000001",
"email": "[email protected]",
"firstname": "Barack",
"lastname": "Obama",
"fullname": "Barack Obama",
"created_at": "2015-06-24T10:08:20.746-04:00",
"updated_at": "2015-06-24T10:08:20.746-04:00"
}
]
```-
### GET /v1/sites.jsonReturns an array of sites that the authenticated user belongs to.
#### Params
* **domain** *(optional)* — Site domain
* **include** *(optional)* — Array of entities to include (`user`, `pages`, `assets`)#### Response
```json
[
{
"id": "51af47c1ef75acd940000002",
"title": "My Site",
"domain": "mysite.com",
"cname": "abcdefghijklmnopqrst-abcdefghijklmnopqrstuvwxyz123456.a1.abc.rackcdn.com",
"timezone": "Eastern Time (US & Canada)",
"created_at": "2015-06-24T10:08:20.748-04:00",
"updated_at": "2015-06-24T10:08:20.748-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"meta": [
]
}
]
```-
### POST /v1/sites.jsonCreates a site belonging to the authenticated user.
#### Params
* **title** — Site title
* **domain** — Site domain
* **timezone** *(optional)* — Site timezone
* **meta** *(optional)* — Array of Site metadata#### Response
```json
{
"id": "51af47c1ef75acd940000002",
"title": "My Site",
"domain": "mysite.com",
"cname": "abcdefghijklmnopqrst-abcdefghijklmnopqrstuvwxyz123456.a1.abc.rackcdn.com",
"timezone": "Eastern Time (US & Canada)",
"created_at": "2015-06-24T10:08:20.746-04:00",
"updated_at": "2015-06-24T10:08:20.746-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"meta": []
}
```-
### GET /v1/sites/:id.jsonReturns the given site.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `pages`, `assets`)#### Response
```json
{
"id": "51af47c1ef75acd940000002",
"title": "My Site",
"domain": "mysite.com",
"cname": "abcdefghijklmnopqrst-abcdefghijklmnopqrstuvwxyz123456.a1.abc.rackcdn.com",
"timezone": "Eastern Time (US & Canada)",
"created_at": "2015-06-24T10:08:20.746-04:00",
"updated_at": "2015-06-24T10:08:20.746-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"meta": []
}
```-
### PUT /v1/sites/:id.jsonUpdates the given site.
#### Params
* **title** *(optional)* — Site title
* **domain** *(optional)* — Site domain
* **timezone** *(optional)* — Site timezone
* **meta** *(optional)* — Array of Site metadata
* **hosting** *(optional)* — Site hosting (`siteleaf`, `ftp`, `s3`, `cloudfiles`, `github`)
* **ftp_settings** *(optional)* — Site FTP settings (see hosting settings)
* **s3_settings** *(optional)* — Site S3 settings (see hosting settings)
* **cloudfiles_settings** *(optional)* — Site Cloudfiles settings (see hosting settings)
* **github_settings** *(optional)* — Site GitHub settings (see hosting settings)
* **user_id** *(optional)* — Site owner ID (must have role)#### Response
```json
{
"id": "51af47c1ef75acd940000002",
"title": "My Site",
"domain": "mysite.com",
"cname": "abcdefghijklmnopqrst-abcdefghijklmnopqrstuvwxyz123456.a1.abc.rackcdn.com",
"timezone": "Eastern Time (US & Canada)",
"created_at": "2015-06-24T10:08:20.746-04:00",
"updated_at": "2015-06-24T10:08:20.746-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"meta": []
}
```-
### DELETE /v1/sites/:id.jsonDeletes the given site.
-
### POST /v1/sites/:id/publish.jsonPublishes the site in the background and returns a job id.
Check it's status at GET /v1/jobs/:job_id#### Response
```json
{
"job_id": "abcdef0123456789abcdef01"
}
```-
### GET /v1/sites/:id/pages.jsonReturns an array of all pages for the given site.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `pages`, `posts`, `assets`)#### Response
```json
[
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.751-04:00",
"updated_at": "2015-06-24T10:08:20.751-04:00",
"published_at": "2015-06-24T10:08:20.751-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": [
]
}
]
```-
### POST /v1/sites/:id/pages.jsonCreates a page on the given site.
#### Params
* **title** — Page title
* **body** *(optional)* — Page body
* **custom_slug** *(optional)* — Page custom slug
* **published_at** *(optional)* — Page published date
* **visibility** *(optional)* — Page visibility (`draft`, `hidden`, `visible`)
* **user_id** *(optional)* — Page author ID
* **parent_id** *(optional)* — Page parent ID
* **meta** *(optional)* — Array of Page metadata
* **asset_ids** *(optional)* — Array of existing Asset IDs#### Response
```json
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.749-04:00",
"updated_at": "2015-06-24T10:08:20.749-04:00",
"published_at": "2015-06-24T10:08:20.749-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": []
}
```-
### PUT /v1/sites/:id/pages.jsonRepositions pages on the given site.
#### Params
* **ids** — Nested JSON array of Page IDs and their children#### Request
```shell
curl -u API_KEY:API_SECRET \
-X PUT \
-d 'ids=[{"id":"51a38..."},{"id":"51a15...","children":[{"id":"51a39..."},{"id":"51a40..."}]}]' \
https://api.siteleaf.com/v1/sites/51a158a8ef75ac1ada000001/pages
```#### Response
```json
[
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.751-04:00",
"updated_at": "2015-06-24T10:08:20.751-04:00",
"published_at": "2015-06-24T10:08:20.751-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": [
]
}
]
```-
### GET /v1/sites/:id/posts.jsonReturns an array of all posts for the given site.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `assets`)#### Response
```json
[
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.754-04:00",
"updated_at": "2015-06-24T10:08:20.754-04:00",
"published_at": "2015-06-24T10:08:20.754-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": [
]
}
]
```-
### GET /v1/sites/:id/assets.jsonReturns an array of all assets for the given site.
#### Response
```json
[
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.841-04:00",
"updated_at": "2015-06-24T10:08:20.841-04:00",
"meta": [
]
}
]
```-
### POST /v1/sites/:id/assets.jsonCreates an asset on the given site.
#### Params
* **file** *(optional)* — Asset file
* **url** *(optional)* — Asset remote URL
* **meta** *(optional)* — Array of Asset metadata#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-
### GET /v1/sites/:id/users.jsonReturns an array of users for the given site.
#### Response
```json
[
{
"id": "51af47a8ef75ac5e8c000001",
"email": "[email protected]",
"firstname": "Barack",
"lastname": "Obama",
"fullname": "Barack Obama",
"created_at": "2015-06-24T10:08:20.746-04:00",
"updated_at": "2015-06-24T10:08:20.746-04:00"
}
]
```-
### GET /v1/pages.jsonReturns an array of Pages created by the authenticated user.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `pages`, `posts`, `assets`)#### Response
```json
[
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.751-04:00",
"updated_at": "2015-06-24T10:08:20.751-04:00",
"published_at": "2015-06-24T10:08:20.751-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": [
]
}
]
```-
### GET /v1/pages/:id.jsonReturns the given page.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `pages`, `posts`, `assets`)#### Response
```json
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.749-04:00",
"updated_at": "2015-06-24T10:08:20.749-04:00",
"published_at": "2015-06-24T10:08:20.749-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": []
}
```-
### PUT /v1/pages/:id.jsonUpdates the given page.
#### Params
* **title** *(optional)* — Page title
* **body** *(optional)* — Page body
* **custom_slug** *(optional)* — Page slug
* **published_at** *(optional)* — Page published date
* **visibility** *(optional)* — Page visibility (`draft`, `hidden`, `visible`)
* **user_id** *(optional)* — Page author ID
* **parent_id** *(optional)* — Page parent ID
* **meta** *(optional)* — Array of Page Metadata (see Metadata)
* **position** *(optional)* — Position of page#### Response
```json
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.749-04:00",
"updated_at": "2015-06-24T10:08:20.749-04:00",
"published_at": "2015-06-24T10:08:20.749-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": []
}
```-
### DELETE /v1/pages/:id.jsonDeletes the given page.
-
### GET /v1/pages/:id/posts.jsonReturns an array of posts on the given page.
#### Params
* **offset** *(optional)* — Number of Posts to offset
* **count** *(optional)* — Number of Posts to return
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `assets`)#### Response
```json
[
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.754-04:00",
"updated_at": "2015-06-24T10:08:20.754-04:00",
"published_at": "2015-06-24T10:08:20.754-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": [
]
}
]
```-
### POST /v1/pages/:id/posts.jsonCreates a post on the given page.
#### Params
* **title** — Post title
* **body** *(optional)* — Post body
* **custom_slug** *(optional)* — Post custom slug
* **published_at** *(optional)* — Post published date
* **visibility** *(optional)* — Post visibility
* **user_id** *(optional)* — Post author ID
* **meta** *(optional)* — Array of Taxonomy
* **taxonomy** *(optional)* — Array of Metadata
* **asset_ids** *(optional)* — Array of Asset IDs#### Response
```json
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.752-04:00",
"updated_at": "2015-06-24T10:08:20.752-04:00",
"published_at": "2015-06-24T10:08:20.753-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": []
}
```-
### GET /v1/pages/:id/assets.jsonReturns an array of assets on the given page.
#### Response
```json
[
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.841-04:00",
"updated_at": "2015-06-24T10:08:20.841-04:00",
"meta": [
]
}
]
```-
### POST /v1/pages/:id/assets.jsonCreates an asset on the given page.
#### Params
* **file** *(optional)* — Asset file
* **url** *(optional)* — Asset remote URL
* **meta** *(optional)* — Array of Asset metadata#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-
### PUT /v1/pages/:id/assets.jsonRepositions assets on the given page.
#### Params
* **ids** — Array of Asset IDs#### Response
```json
[
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.841-04:00",
"updated_at": "2015-06-24T10:08:20.841-04:00",
"meta": [
]
}
]
```-
### POST /v1/pages/:id/meta.jsonCreates metadata on the given page.
#### Params
* **key** — Metadata key
* **value** — Metadata value#### Response
```json
{
"id": "51a39a57ef75ac7634000011",
"key": "color",
"value": "blue"
}
```-
### GET /v1/posts.jsonReturns an array of posts created by the authenticated user.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `assets`)#### Response
```json
[
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.754-04:00",
"updated_at": "2015-06-24T10:08:20.754-04:00",
"published_at": "2015-06-24T10:08:20.754-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": [
]
}
]
```-
### GET /v1/posts/:id.jsonReturns the given post.
#### Params
* **include** *(optional)* — Array of entities to include (`user`, `site`, `parent`, `assets`)#### Response
```json
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.752-04:00",
"updated_at": "2015-06-24T10:08:20.752-04:00",
"published_at": "2015-06-24T10:08:20.753-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": []
}
```-
### PUT /v1/posts/:id.jsonUpdates the given post.
#### Params
* **title** *(optional)* — Post title
* **body** *(optional)* — Post body
* **custom_slug** *(optional)* — Post custom slug
* **published_at** *(optional)* — Post published date
* **visibility** *(optional)* — Post visibility (`draft`, `hidden`, `visible`)
* **parent_id** *(optional)* — Post parent ID
* **user_id** *(optional)* — Post author ID
* **meta** *(optional)* — Array of Metadata
* **taxonomy** *(optional)* — Array of Taxonomy#### Response
```json
{
"id": "51a39a57ef75ac7634000006",
"title": "My Content",
"slug": "my-content",
"url": "/pages/my-content",
"body": "This is *my* content",
"visibility": "draft",
"created_at": "2015-06-24T10:08:20.752-04:00",
"updated_at": "2015-06-24T10:08:20.752-04:00",
"published_at": "2015-06-24T10:08:20.753-04:00",
"user_id": "51af47a8ef75ac5e8c000001",
"site_id": "51af47c1ef75acd940000002",
"parent_id": "51a39a57ef75ac7634000005",
"meta": []
}
```-
### DELETE /v1/posts/:id.jsonDeletes the given post.
-
### POST /v1/posts/:id/taxonomy.jsonCreates taxonomy on the given post.
#### Params
* **key** — Taxonomy key
* **values** — Array of values#### Response
```json
{
"id": "51a39a57ef75ac7634000007",
"key": "Tags",
"slug": "tags",
"values": [
{
"value": "Announcement",
"slug": "announcement",
"url": "/blog/tags/announcement"
}
]
}
```-
### GET /v1/posts/:id/assets.jsonReturns an array of assets on the given post.
#### Response
```json
[
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.841-04:00",
"updated_at": "2015-06-24T10:08:20.841-04:00",
"meta": [
]
}
]
```-
### POST /v1/posts/:id/assets.jsonCreates an asset on the given post.
#### Params
* **file** *(optional)* — Asset file
* **url** *(optional)* — Asset remote URL
* **meta** *(optional)* — Array of Asset metadata#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-
### PUT /v1/posts/:id/assets.jsonRepositions assets on the given post.
#### Params
* **ids** — Array of Asset IDs#### Response
```json
[
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.841-04:00",
"updated_at": "2015-06-24T10:08:20.841-04:00",
"meta": [
]
}
]
```-
### GET /v1/taxonomy/:id.jsonReturns the given taxonomy.
#### Response
```json
{
"id": "51a39a57ef75ac7634000007",
"key": "Tags",
"slug": "tags",
"values": [
{
"value": "Announcement",
"slug": "announcement",
"url": "/blog/tags/announcement"
}
]
}
```-
### PUT /v1/taxonomy/:id.jsonUpdates the given taxonomy.
#### Params
* **key** *(optional)* — Taxonomy key
* **values** *(optional)* — Array of values#### Response
```json
{
"id": "51a39a57ef75ac7634000007",
"key": "Tags",
"slug": "tags",
"values": [
{
"value": "Announcement",
"slug": "announcement",
"url": "/blog/tags/announcement"
}
]
}
```-
### DELETE /v1/taxonomy/:id.jsonDeletes the given taxonomy.
-
### GET /v1/assets/:id.jsonReturns the given asset.
#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-
### PUT /v1/assets/:id.jsonUpdates the given asset.
#### Params
* **filename** *(optional)* — Asset filename
* **meta** *(optional)* — Array of Metadata#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-
### DELETE /v1/assets/:id.jsonDeletes the given asset.
-
### PUT /v1/assets/:id/restore.jsonRestores the given deleted asset.
#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-
### GET /v1/sites/:site_id/theme/assets.jsonReturns an array of all theme assets for the given site.
#### Response
```json
[
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.841-04:00",
"updated_at": "2015-06-24T10:08:20.841-04:00",
"meta": [
]
}
]
```-
### POST /v1/sites/:site_id/theme/assets.jsonCreates a theme asset on the given site.
#### Params
* **file** — Theme asset file
* **filename** *(optional)* — Theme asset filename
* **replace** *(optional)* — Should file replace theme?#### Response
```json
{
"id": "51a39a57ef75ac7634000009",
"filename": "my-file.gif",
"url": "/assets/my-file.gif",
"permalink": "http://mysite.com/assets/my-file.gif",
"file": {
"url": null,
"thumbnail": {
"url": null
}
},
"content_type": "image/gif",
"filesize": 23856,
"checksum": "9187a6775bdce8f1f2143accea89ba6c",
"created_at": "2015-06-24T10:08:20.756-04:00",
"updated_at": "2015-06-24T10:08:20.756-04:00",
"meta": []
}
```-