All Projects → siteleaf → siteleaf-v1-api

siteleaf / siteleaf-v1-api

Licence: other
Siteleaf v1 API documentation

Projects that are alternatives of or similar to siteleaf-v1-api

CAVE
[deprecated] Configuration Assessment, Visualization and Evaluation
Stars: ✭ 43 (+22.86%)
Mutual labels:  archived
OSM-Completionist
⛔️ DEPRECATED iOS companion app for OpenStreetMap that allows contributors to complete missing information
Stars: ✭ 17 (-51.43%)
Mutual labels:  archived
zen archived
TLS integration and more!
Stars: ✭ 133 (+280%)
Mutual labels:  archived
passion
An object-oriented LÖVE game engine
Stars: ✭ 35 (+0%)
Mutual labels:  archived
fullcontact4j
⛔ [DEPRECATED] A Java client for the FullContact API
Stars: ✭ 28 (-20%)
Mutual labels:  archived
ton-client-rs
TON Labs SDK Client Library for Rust
Stars: ✭ 15 (-57.14%)
Mutual labels:  archived
DeepDIVA
⛔️ DEPRECATED <Python Framework for Reproducible Deep Learning Experiments>
Stars: ✭ 32 (-8.57%)
Mutual labels:  archived
Sims4ScriptingBPProj
Sims 4 Scripting Boilerplate Project
Stars: ✭ 32 (-8.57%)
Mutual labels:  archived
wdlRunR
Elastic, reproducible, and reusable genomic data science tools from R backed by cloud resources
Stars: ✭ 34 (-2.86%)
Mutual labels:  archived
steam
DEPRECATED Build, manage and deploy H2O's high-speed machine learning models.
Stars: ✭ 59 (+68.57%)
Mutual labels:  archived
Azure-AppServices-Diagnostics
Azure App Service Diagnostics provides developers ability to write various diagnostics features which helps customers to diagnose and troubleshoot their applications hosted on app services.
Stars: ✭ 42 (+20%)
Mutual labels:  archived
QR
DEPRECATED The bookmarklet and extensions generate QRCode of the current URL for viewing on mobile devices (Google Chrome/Mozilla Firefox/Opera/Safari)
Stars: ✭ 20 (-42.86%)
Mutual labels:  archived
react-relay-rebind
Component-scope state management for Relay modern & React.
Stars: ✭ 15 (-57.14%)
Mutual labels:  archived
ionic-3D-card-carousel
DEPRECATED Sample project that shows an experimental 3D card carousel in Ionic.
Stars: ✭ 29 (-17.14%)
Mutual labels:  archived
react-native-apple-sign-in
Apple Signin for your React Native applications
Stars: ✭ 16 (-54.29%)
Mutual labels:  archived
tooltip
[DEPRECATED] The tooltip that has all the right moves
Stars: ✭ 133 (+280%)
Mutual labels:  archived
Sphero-AR-SDK
🚫 DEPRECATED: Sphero's augmented reality SDK
Stars: ✭ 46 (+31.43%)
Mutual labels:  archived
lazy-require
Sponsor this project to keep it maintained, or use Deno instead.
Stars: ✭ 16 (-54.29%)
Mutual labels:  archived
siteleaf-node
Node library for Siteleaf v2 API
Stars: ✭ 14 (-60%)
Mutual labels:  siteleaf-api
AASecondaryScreen
[Deprecated] · Approachable implementation of iOS AirPlay-Mirroring using Swift.
Stars: ✭ 40 (+14.29%)
Mutual labels:  archived

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 http://learn.siteleaf.com/api/.

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

curl -X GET -u api_key:api_secret https://api.siteleaf.com/<api_endpoint>

API Endpoints

POST /v1/auth.json

Authenticates user and returns user API keys

Request

curl -X POST -u email:password https://api.siteleaf.com/v1/auth.json

Response

{
  "api_key": "e4f5b6acae2c39079c07e35d90d87b1c",
  "api_secret": "106afa1abf96767774bbcc4dd766d419"
}

GET /v1/ping.json

Pings the server.

Response

{
  "ping": "pong"
}

GET /v1/users/me.json

Returns the current user.

Response

{
  "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.json

Returns array of users associated with your sites and the sites you belong to.

Response

[
 {
   "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.json

Returns 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

[
 {
   "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.json

Creates 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

{
  "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.json

Returns the given site.

Params

  • include (optional) — Array of entities to include (user, pages, assets)

Response

{
  "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.json

Updates 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

{
  "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.json

Deletes the given site.

POST /v1/sites/:id/publish.json

Publishes the site in the background and returns a job id. Check it's status at GET /v1/jobs/:job_id

Response

{
  "job_id": "abcdef0123456789abcdef01"
}

GET /v1/sites/:id/pages.json

Returns an array of all pages for the given site.

Params

  • include (optional) — Array of entities to include (user, site, parent, pages, posts, assets)

Response

[
 {
   "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.json

Creates 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

{
  "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.json

Repositions pages on the given site.

Params

  • ids — Nested JSON array of Page IDs and their children

Request

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

[
 {
   "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.json

Returns an array of all posts for the given site.

Params

  • include (optional) — Array of entities to include (user, site, parent, assets)

Response

[
 {
   "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.json

Returns an array of all assets for the given site.

Response

[
 {
   "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.json

Creates an asset on the given site.

Params

  • file (optional) — Asset file
  • url (optional) — Asset remote URL
  • meta (optional) — Array of Asset metadata

Response

{
  "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.json

Returns an array of users for the given site.

Response

[
 {
   "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.json

Returns an array of Pages created by the authenticated user.

Params

  • include (optional) — Array of entities to include (user, site, parent, pages, posts, assets)

Response

[
 {
   "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.json

Returns the given page.

Params

  • include (optional) — Array of entities to include (user, site, parent, pages, posts, assets)

Response

{
  "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.json

Updates 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

{
  "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.json

Deletes the given page.

GET /v1/pages/:id/posts.json

Returns 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

[
 {
   "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.json

Creates 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

{
  "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.json

Returns an array of assets on the given page.

Response

[
 {
   "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.json

Creates an asset on the given page.

Params

  • file (optional) — Asset file
  • url (optional) — Asset remote URL
  • meta (optional) — Array of Asset metadata

Response

{
  "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.json

Repositions assets on the given page.

Params

  • ids — Array of Asset IDs

Response

[
 {
   "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.json

Creates metadata on the given page.

Params

  • key — Metadata key
  • value — Metadata value

Response

{
  "id": "51a39a57ef75ac7634000011",
  "key": "color",
  "value": "blue"
}

GET /v1/posts.json

Returns an array of posts created by the authenticated user.

Params

  • include (optional) — Array of entities to include (user, site, parent, assets)

Response

[
 {
   "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.json

Returns the given post.

Params

  • include (optional) — Array of entities to include (user, site, parent, assets)

Response

{
  "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.json

Updates 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

{
  "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.json

Deletes the given post.

POST /v1/posts/:id/taxonomy.json

Creates taxonomy on the given post.

Params

  • key — Taxonomy key
  • values — Array of values

Response

{
  "id": "51a39a57ef75ac7634000007",
  "key": "Tags",
  "slug": "tags",
  "values": [
    {
      "value": "Announcement",
      "slug": "announcement",
      "url": "/blog/tags/announcement"
    }
  ]
}

GET /v1/posts/:id/assets.json

Returns an array of assets on the given post.

Response

[
 {
   "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.json

Creates an asset on the given post.

Params

  • file (optional) — Asset file
  • url (optional) — Asset remote URL
  • meta (optional) — Array of Asset metadata

Response

{
  "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.json

Repositions assets on the given post.

Params

  • ids — Array of Asset IDs

Response

[
 {
   "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.json

Returns the given taxonomy.

Response

{
  "id": "51a39a57ef75ac7634000007",
  "key": "Tags",
  "slug": "tags",
  "values": [
    {
      "value": "Announcement",
      "slug": "announcement",
      "url": "/blog/tags/announcement"
    }
  ]
}

PUT /v1/taxonomy/:id.json

Updates the given taxonomy.

Params

  • key (optional) — Taxonomy key
  • values (optional) — Array of values

Response

{
  "id": "51a39a57ef75ac7634000007",
  "key": "Tags",
  "slug": "tags",
  "values": [
    {
      "value": "Announcement",
      "slug": "announcement",
      "url": "/blog/tags/announcement"
    }
  ]
}

DELETE /v1/taxonomy/:id.json

Deletes the given taxonomy.

GET /v1/assets/:id.json

Returns the given asset.

Response

{
  "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.json

Updates the given asset.

Params

  • filename (optional) — Asset filename
  • meta (optional) — Array of Metadata

Response

{
  "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.json

Deletes the given asset.

PUT /v1/assets/:id/restore.json

Restores the given deleted asset.

Response

{
  "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.json

Returns an array of all theme assets for the given site.

Response

[
 {
   "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.json

Creates a theme asset on the given site.

Params

  • file — Theme asset file
  • filename (optional) — Theme asset filename
  • replace (optional) — Should file replace theme?

Response

{
  "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": [

  ]
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].