REST API

This reference document is designed for those interested in developing for platforms not supported by the SDKs or for those interested in exploring API features in detail. All the communication to the Picozu server requires to be done over SSL. You can use the Developer Console to test your applications before deploying them.

Standard API errors
CodeDescription
400Bad input parameter / bad request; request could not be understood by the server due to malformed syntax.
401Not authorized, authentication is required and has failed or has not yet been provided.
405A request was made of a resource using a request method not supported by that resource; for example, using GET when data is to be presented via POST.
500Internal Server Error.
501The server either does not recognize the request method, or it lacks the ability to fulfil the request.
503The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
Standard error messages
CodeMessageDescription
001You are not authorized to execute this action.
002Bad or incomplete request, check out the data you entered and try again.
003You need to be signed in to execute this action.
004Unable to save the file to the requested format.
005Unable to create a new user.
API methods

/core/version/

Description

Get the Picozu library version.

URL Structure
https://www.picozu.com/api/core/version/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the version information.

The HTTP response contains the data in JSON format.

Sample response
{
    "library": "1.2.112314",
    "api": "1.2"
}
Errors
001The API key is invalid.

/core/search/

Description

Search into Picozu pages.

URL Structure
https://www.picozu.com/api/core/search/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
  • searchrequired The term you wish to search for.
Returns

.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "count": 1,
    "count_total": 1,
    "pages": 1,
    "posts": [{
        "id": 210,
        "type": "page",
        "slug": "test-post",
        "url": "https://www.picozu.com/test-post/",
        "status": "publish",
        "title": "Test Post",
        "title_plain": "Test Post",
        "content": "",
        "excerpt": "",
        "date": "2013-01-19 18:59:08",
        "modified": "2014-10-17 23:24:57",
        "categories": [],
        "author": {
            "id": 200,
            "slug": "user",
            "name": "Important User",
            "first_name": "Important",
            "last_name": "User",
            "nickname": "Important User",
            "url": "http://www.picozu.com",
            "description": ""
        }
    }]
}
Errors
001The API key is invalid.

/core/capabilities/

Description

Get app capabilities information.

URL Structure
https://www.picozu.com/api/core/capabilities/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the capabilities information.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "capabilities": {
        "airbrush": {
            "name": "Airbrush",
            "handle": "airbrush",
            "category_name": "Tools",
            "category": 3,
            "active": 1
        },
        "brush": {
            "name": "Brush",
            "handle": "brush",
            "category_name": "Tools",
            "category": 3,
            "active": 1
        },
        ...
        "youtube": {
            "name": "Youtube",
            "handle": "youtube",
            "category_name":"Plugins",
            "category": 1,
            "active": 1
        }
    }
}
Errors
001The API key is invalid.

/core/plugins/

Description

Get a list of the plugins available in Picozu.

URL Structure
https://www.picozu.com/api/core/plugins/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of all the plugins.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 2,
    "plugins": [{
        "name": "Camera",
        "handle": "camera",
        "description": "Adds webcam/camera support to Picozu. By enabling it you can import and edit a photo taken with your webcam. Once enabled you will find the option to import from camera in the Image - Import menu.",
        "category": "1",
        "version": "1.0",
        "email": "office@picozu.com",
        "url": "www.picozu.com",
        "date": "2014-12-19 00:00:00"
    }, {
        "name": "Charts",
        "handle": "charts",
        "description": "Allows you to integrate various types of charts into your workspaces and adjust settings such as shapes and colors. You will find the Charts icon on the toolbar and the popup window has tips for every plugin option. Hover over them for more details.",
        "category": "1",
        "version": "1.0",
        "email": "office@picozu.com",
        "url": "www.picozu.com",
        "date": "2014-12-19 00:00:00"
    }]
}
Errors
001The API key is invalid.

/core/themes/

Description

Get a list of the themes available in Picozu.

URL Structure
https://www.picozu.com/api/core/themes/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of all the themes.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 2,
    "themes": [{
        "name": "Galaxy",
        "handle": "galaxy",
        "description": "",
        "category": "2",
        "version": "1.0",
        "email": "office@picozu.com",
        "url": "www.picozu.com",
        "date": "2013-10-15 06:42:38"
    }, {
        "name": "Kids",
        "handle": "kids",
        "description": "",
        "category": "2",
        "version": "1.0",
        "email": "office@picozu.com",
        "url": "www.picozu.com",
        "date": "2013-10-15 06:42:38"
    }]
}
Errors
001The API key is invalid.

/user/heartbeat/

Description

Get user and app capabilities information.

URL Structure
https://www.picozu.com/api/user/heartbeat/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the currently logged in user and capabilities information.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "whitelabel": 0,
    "logo": null,
    "user": {
        "id": 200,
        "username": "user",
        "nickname": "Important User",
        "email": "email@userdomain.com",
        "registered": "2013-12-22 18:26:49",
        "avatar": "https://www.picozu.com/u/avatars/200/d74ef1e11f3b2897e9c9800cbdf83945.jpg"
    },
    "capabilities": [{
        "airbrush": 1,
        "brush": 1,
        "colorfill": 1,
        ...
        "galaxy": 1,
        "kids": 0
    }]
}
Errors
001The API key is invalid.

/user/signin/

Description

Sign in a user to Picozu.

URL Structure
https://www.picozu.com/api/user/signin/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
  • usernamerequired The username you wish to sign in with.
  • passwordrequired The password of the above username.
Returns

Object containing the user information on success.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "whitelabel": 0,
    "logo": null,
    "user": {
        "id": 200,
        "username": "user",
        "nickname": "Important User",
        "email": "email@userdomain.com",
        "registered": "2013-12-22 18:26:49",
        "avatar": "https://www.picozu.com/u/avatars/200/d74ef1e11f3b2897e9c9800cbdf83945.jpg"
    }
}
Errors
001The API key is invalid.
002The provided information is invalid.

/user/signout/

Description

Sign out the currently logged in user.

URL Structure
https://www.picozu.com/api/user/signout/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns
– nothing –

The HTTP response contains the data in JSON format.

Errors
001The API key is invalid.

/user/profile/

Description

Get profile information for the currently logged in user.

URL Structure
https://www.picozu.com/api/user/profile/
Method
POST
Parameters
  • keyrequired The API key of your application.
Returns

.

The HTTP response contains the data in JSON format.

Errors
001The API key is invalid.
003You are not signed in to Picozu.

/user/recover/

Description

Recovers a forgotten password.

URL Structure
https://www.picozu.com/api/user/recover/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
  • usernamerequired .
  • emailrequired .
Returns
– nothing –

The HTTP response contains the data in JSON format.

Errors
001The API key is invalid.

/user/signup/

Description

Registers a username with Picozu.

URL Structure
https://www.picozu.com/api/user/signup/
Method
POST
Parameters
  • keyrequired The API key of your application.
  • usernamerequired .
Returns

.

The HTTP response contains the data in JSON format.

Errors
001The API key is invalid.
005The provided information is invalid or username already in use.

/user/notifications/

Description

Retrieve a list of all your unread notifications.

URL Structure
https://www.picozu.com/api/user/notifications/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

The list of your unread notifications.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 1,
    "notifications": [
        {
            "id": "1",
            "content": "This is a notifications",
            "url": "https://www.picozu.com/members/phil"
        }
    ]
}
Errors
001The API key is invalid.
003You are not signed in to Picozu.

/media/images/

Description

Registers a username with Picozu.

URL Structure
https://www.picozu.com/api/media/images/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 2,
    "images": [{
        "title": "Sample Image",
        "description": "Image description",
        "thumb": "/v/images/200/L4avxXvNx5v1jnxg9BDHwq10-200x200.png",
        "mid": "/v/images/200/L4avxXvNx5v1jnxg9BDHwq10-700x525.png",
        "orig": "/v/images/200/L4avxXvNx5v1jnxg9BDHwq10.png",
        "ext": "png"
    }, {
        "title": "Another Image",
        "description": "Another image description",
        "thumb": "/v/images/200/EB5uWWnxrG2YZgKeaW2FgJZI-200x200.png",
        "mid": "/v/images/200/EB5uWWnxrG2YZgKeaW2FgJZI-700x525.png",
        "orig": "/v/images/200/EB5uWWnxrG2YZgKeaW2FgJZI.png",
        "ext": "png"
    }]
}
Errors
001The API key is invalid.
003You are not signed in to Picozu.

/oath/request_token/

Description

Step 1 of authentication. Obtain an OAuth request token to be used for the rest of the authentication process.

This method corresponds to Obtaining an Unauthorized Request Token in the OAuth Core 1.0 specification.

URL Structure
https://www.picozu.com/oauth/request_token/
Method
POST
Parameters

See Consumer Obtains a Request Token in the OAuth Core 1.0 specification for a description of the OAuth parameters used for fetching a request token. Since this method is on behalf of an unauthenticated user, no access token or secret should be involved when signing or sending the request.

Returns

A request token and the corresponding request token secret, URL-encoded. This token/secret pair is meant to be used with /oauth/access_token/ to complete the authentication process and cannot be used for any other API calls. See Service Provider Issues an Unauthorized Request Token in the OAuth Core 1.0 specification for additional discussion of the values returned when fetching a request token.

Sample response
oauth_token=agf8FhaAesqnzStu&oauth_token_secret=2ZDZvtotaihkBxKO

/oauth/authorize/

Description

Step 2 of authentication. Applications should direct the user to /oauth/authorize/. This isn’t an API call per se, but rather a web endpoint that lets the user sign in to Picozu and choose whether to grant the application the ability to access information on their behalf. Without the user’s authorization in this step, it isn’t possible for your application to obtain an access token from /oauth/access_token/.

This method corresponds to Obtaining User Authorization in the OAuth Core 1.0 specification.

URL Structure
https://www.picozu.com/oauth/authorize/

Note: The user must be redirected to the Picozu website over HTTPS. After the user decides whether or not to authorize your application, they will be redirected to the URL specified by oauth_callback.

Method
GET
Parameters
  • oauth_tokenrequired The request token obtained via /oauth/request_token/.
  • oauth_callback After the user either authorizes or disallows your application, they are redirected to this URL.
Returns

Because the application doesn’t call /oauth/authorize/ directly, there is no direct return value. After the user authorizes the application, the request token can be used to retrieve an access token via the /oauth/access_token/ API call. If the oauth_callback parameter is omitted, the application must find some other way of determining when the authorization step is complete. For example, the application can have the user explicitly indicate to it that this step is complete, but this flow may be less intuitive for users than the redirect flow.

If oauth_callback is specified and the user authorizes the application, they will get redirected to the specified URL with the following additional URL query parameters appended:

  • oauth_token The request token that was just authorized. The request token secret isn’t sent back.

/oauth/access_token/

Description

Step 3 of authentication. After the /oauth/authorize/ step is complete, the application can call /oauth/access_token/ to acquire an access token.

This method corresponds to Obtaining an Access Token in the OAuth Core 1.0 specification.

URL Structure
https://www.picozu.com/oauth/access_token/
Method
POST
Parameters

See Consumer Requests an Access Token in the OAuth Core 1.0 specification for a description of the parameters used for fetching an access token. Note that the oauth_token and oauth_token_secret for this method are the request token and request token secret obtained previously via /oauth/request_token/.

Returns

URL-encoded access token and access token secret. Upon return, the authorization process is now complete and the access token and corresponding secret can be used to sign requests for the main API calls. See Service Provider Grants an Access Token in the OAuth Core 1.0 specification for additional discussion of the values returned when fetching an access token.

Sample response
oauth_token=R0BMVa2wzG7WdDxV&oauth_token_secret=M1sR10dgEZGn0hXp

/notes/create/

Description

Create a personal note via the Notes plugin.

URL Structure
https://www.picozu.com/api/notes/create/
Method
POST
Parameters
  • keyrequired The API key of your application.
  • titlerequired Title of the note.
  • noterequired Contents of the note, 256 characters limit.
Returns

– nothing –

Errors
001The API key is invalid.
003The provided information is invalid.

/notes/delete/

Description

Delete a personal note via the Notes plugin.

URL Structure
https://www.picozu.com/api/notes/delete/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
  • idrequired Internal ID of the note.
Returns

– nothing –

Errors
001The API key is invalid.
003The provided information is invalid.

/notes/update/

Description

Update the contents of a personal note via the Notes plugin.

URL Structure
https://www.picozu.com/api/notes/update/
Method
POST
Parameters
  • keyrequired The API key of your application.
  • idrequired Internal ID of the note.
  • titlerequired Title of the note.
  • noterequired Contents of the note, 256 characters limit.
Returns

– nothing –

Errors
001The API key is invalid.
003The provided information is invalid.

/notes/all/

Description

Get a list of your personal notes via the Notes plugin.

URL Structure
https://www.picozu.com/api/notes/all/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of your personal notes.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": "3",
    "notes": [{
        "id": "1",
        "title": "First Note",
        "note": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
        "date": "2014-12-15 02:33:45"
    }, {
        "id": "2",
        "title": "Second Note",
        "note": "Ut at nunc non tortor ultrices ultrices.",
        "date": "2014-12-15 02:33:39"
    }, {
        "id": "3",
        "title": "One more",
        "note": "Sed commodo justo non risus laoreet laoreet. Suspendisse dignissim enim at elit tempus feugiat.",
        "date": "2014-12-15 02:33:33"
    }]
}
Errors
001The API key is invalid.
003The provided information is invalid.

/support/my/

Description

Get a list of your personal (non-public) support issues via the Support plugin.

URL Structure
https://www.picozu.com/api/support/my/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of your personal (non-public) support issues.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 2,
    "issues": [{
        "id": "3",
        "subject": "Camera plugin",
        "description": "The camera plugin is not working on Firefox 33. Everything seems to work just fine on Google Chrome.",
        "date": "2014-11-21 12:58:35",
        "type": "1",
        "type_name": "Bug",
        "priority": "3",
        "priority_name": "Medium",
        "author": "100",
        "user_assigned": "Marius"
    }, {
        "id": "2",
        "subject": "Fractals plugin",
        "description": "The fractal plugin is not working on an empty tab, unless an image is loaded first.",
        "date": "2014-11-21 12:55:04",
        "type": "1",
        "type_name": "Bug",
        "priority": "2",
        "priority_name": "High",
        "author": "100",
        "user_assigned": "Marius"
    }]
}
Errors
001The API key is invalid.

/support/all/

Description

Get a list of the support issues via the Support plugin.

URL Structure
https://www.picozu.com/api/support/all/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of all the support issues.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 2,
    "issues": [{
        "id": "3",
        "subject": "Camera plugin",
        "description": "The camera plugin is not working on Firefox 33. Everything seems to work just fine on Google Chrome.",
        "date": "2014-11-21 12:58:35",
        "type": "1",
        "type_name": "Bug",
        "priority": "3",
        "priority_name": "Medium",
        "author": "234",
        "user_assigned": "Marius"
    }, {
        "id": "2",
        "subject": "Fractals plugin",
        "description": "The fractal plugin is not working on an empty tab, unless an image is loaded first.",
        "date": "2014-11-21 12:55:04",
        "type": "1",
        "type_name": "Bug",
        "priority": "2",
        "priority_name": "High",
        "author": "643",
        "user_assigned": "Marius"
    }]
}
Errors
001The API key is invalid.

/support/create/

Description

Create a new support issue via the Support plugin.

URL Structure
https://www.picozu.com/api/support/create/
Method
POST
Parameters
  • keyrequired The API key of your application.
  • subjectrequired Subject of the support issue.
  • descriptionrequired Description of the support issue.
  • typerequired Issue type, do a /support/types/ request to get a list of possible issue types.
  • priorityrequired Issue priority, do a /support/priorities/ request to get a list of possible issue priorities.
  • publicrequired Flag if the issue is public or not, can be 1 or 0.
Returns

ID of the newly created support issue.

Errors
001The API key is invalid.
003You are not signed in to Picozu.

/support/priorities/

Description

Get a list of the available issue priorities.

URL Structure
https://www.picozu.com/api/support/priorities/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of all the available issue priorities.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 5,
    "priorities": [{
        "id": "1",
        "name": "Critical"
    }, {
        "id": "2",
        "name": "High"
    }, {
        "id": "3",
        "name": "Medium"
    }, {
        "id": "4",
        "name": "Low"
    }, {
        "id": "5",
        "name": "Notice"
    }]
}
Errors
001The API key is invalid.

/support/types/

Description

Get a list of the available issue types.

URL Structure
https://www.picozu.com/api/support/types/
Method
GET or POST
Parameters
  • keyrequired The API key of your application.
Returns

Object containing the list of all the available issue types.

The HTTP response contains the data in JSON format.

Sample response
{
    "status": "ok",
    "total": 2,
    "types": [{
        "id": "1",
        "name": "Bug"
    }, {
        "id": "2",
        "name": "Improvement"
    }]
}
Errors
001The API key is invalid.

© 2011 - 2017 Picozu, The HTML5 Image Editor - Terms and Conditions - Privacy Policy

Forgot your details?