Playlyfe API v2.0

The Playlyfe API works over HTTP Secure (HTTPS) connections, and uses the OAuth2.0 protocol for authentication.

If you are looking to use Playlyfe platform to start creating your own gamified apps, have a look at our Getting Started Manual or do it by yourself using one of our SDKs to connect your app with Playlyfe.

Action

Action Examples

List All Action Designs

GET/design/versions/:version/actions

Get the details of all actions designs in the game.

TODO: describe the response

Parameters
NameDescription
fields

Comma separated string containing the required fields.

 Query Parameter Request Body Required

List All Action Designs

There are no examples yet for this route. You can Try It yourself though!

Create an Action

POST/design/versions/:version/actions

Create an action from the given design. The design should satisfy the action design schema.

Create an Action

There are no examples yet for this route. You can Try It yourself though!

Get Action Design

GET/design/versions/:version/actions/:component_id

Get the design of the requested action.

Get Action Design

There are no examples yet for this route. You can Try It yourself though!

Update Action Design

PATCH/design/versions/:version/actions/:action_id

Update the design of an existing action.

The request data should satisfy the action design update schema.

Update Action Design

There are no examples yet for this route. You can Try It yourself though!

Delete Action Design

DELETE/design/versions/:version/actions/:component_id

Delete the requested action design.

Delete Action Design

There are no examples yet for this route. You can Try It yourself though!

Process

Process Examples

List All Process Designs

GET/design/versions/:version/processes

Get details of all the Process designs in the game.

Parameters
NameDescription
source

Can take the value stash to fetch the stashed design.

 Query Parameter Request Body Required

List All Process Designs

There are no examples yet for this route. You can Try It yourself though!

Create a Process

POST/design/versions/:version/processes

Create a Process with the given design. The design should satisfy the Process create schema.

Create a Process

There are no examples yet for this route. You can Try It yourself though!

Get Process Design

GET/design/versions/:version/processes/:component_id

Get the design of the specified Process.

Get Process Design

There are no examples yet for this route. You can Try It yourself though!

Update Process Design

PATCH/design/versions/:version/processes/:component_id

Update the design for a given Process. The update should satisfy the Process design update schema.

Update Process Design

There are no examples yet for this route. You can Try It yourself though!

Delete Process Design

DELETE/design/versions/:version/processes/:component_id

Delete the design for the given Process.

Delete Process Design

There are no examples yet for this route. You can Try It yourself though!

Team

Team Examples

List All Team Designs

GET/design/versions/:version/teams

Get details of all the Team designs in the game.

Parameters
NameDescription
source

Can take the value stash to fetch the stashed design.

 Query Parameter Request Body Required

List All Team Designs

There are no examples yet for this route. You can Try It yourself though!

Create a Team

POST/design/versions/:version/teams

Create a Team with the given design. The design should satisfy the Team create schema.

Create a Team

There are no examples yet for this route. You can Try It yourself though!

Get Team Design

GET/design/versions/:version/teams/:component_id

Get the design of the specified Team.

Get Team Design

There are no examples yet for this route. You can Try It yourself though!

Update Team Design

PATCH/design/versions/:version/teams/:component_id

Update the design for a given Team. The update should satisfy the Team design update schema.

Update Team Design

There are no examples yet for this route. You can Try It yourself though!

Delete Team Design

DELETE/design/versions/:version/teams/:component_id

Delete the design for the given Team.

Delete Team Design

There are no examples yet for this route. You can Try It yourself though!

Metric

Metric Examples

List All Metric Designs

GET/design/versions/:version/metrics

Get details of all the metric designs in the game.

Parameters
NameDescription
source

Can take the value stash to fetch the stashed design.

 Query Parameter Request Body Required

List All Metric Designs

There are no examples yet for this route. You can Try It yourself though!

Create a Metric

POST/design/versions/:version/metrics

Create a Metric with the given design. The design should satisfy the Metric create schema.

Create a Metric

There are no examples yet for this route. You can Try It yourself though!

Get Metric Design

GET/design/versions/:version/metrics/:component_id

Get the design of the specified Metric.

Parameters
NameDescription
source

To be set to stash is the design stash is required.

 Query Parameter Request Body Required

Get Metric Design

There are no examples yet for this route. You can Try It yourself though!

Update Metric Design

PATCH/design/versions/:version/metrics/:component_id

Update the design for a given Metric. The update should satisfy the Metric design update schema.

Update Metric Design

There are no examples yet for this route. You can Try It yourself though!

Delete Metric Design

DELETE/design/versions/:version/metrics/:component_id

Delete the design for the given Metric.

Delete Metric Design

There are no examples yet for this route. You can Try It yourself though!

Rule

Rule Examples

List All Rule Designs

GET/design/versions/:version/rules

Get details of all the rule designs in the game.

List All Rule Designs

There are no examples yet for this route. You can Try It yourself though!

Create a Rule

POST/design/versions/:version/rules

Create a Rule with the given design. The design should satisfy the Rule create schema.

Create a Rule

There are no examples yet for this route. You can Try It yourself though!

Get Rule Design

GET/design/versions/:version/rules/:component_id

Get the design of the specified Rule.

Get Rule Design

There are no examples yet for this route. You can Try It yourself though!

Update Rule Design

PATCH/design/versions/:version/rules/:component_id

Update the design for a given Rule. The update should satisfy the Rule design update schema.

Update Rule Design

There are no examples yet for this route. You can Try It yourself though!

Delete Rule Design

DELETE/design/versions/:version/rules/:component_id

Delete the design for the given Rule.

Delete Rule Design

There are no examples yet for this route. You can Try It yourself though!

Leaderboard

Leaderboard Examples

List All Leaderboard Designs

GET/design/versions/:version/leaderboards

Get details of all leaderboard designs in the game.

List All Leaderboard Designs

There are no examples yet for this route. You can Try It yourself though!

Create a Leaderboard

POST/design/versions/:version/leaderboards

Create a leaderboard with the given design. The design should satisfy the leaderboard create schema.

Create a Leaderboard

There are no examples yet for this route. You can Try It yourself though!

Get Leaderboard Design

GET/design/versions/:version/leaderboards/:component_id

Get the design of the specified leaderboard.

Get Leaderboard Design

There are no examples yet for this route. You can Try It yourself though!

Update Leaderboard Design

PATCH/design/versions/:version/leaderboards/:component_id

Update the design for a given leaderboard. The update should satisfy the leaderboard design update schema.

Update Leaderboard Design

There are no examples yet for this route. You can Try It yourself though!

Delete Leaderboard Design

DELETE/design/versions/:version/leaderboards/:component_id

Delete the design for the given leaderboard.

Delete Leaderboard Design

There are no examples yet for this route. You can Try It yourself though!

Issue

Issue Examples

List All Game Issues

GET/design/issues

Lists all compatibility issues found during deploying the game.

List All Game Issues

There are no examples yet for this route. You can Try It yourself though!

Get Issue Details

GET/design/issues/:issue_id

Get details of the given issue ID along with the possible fixes.

Get Issue Details

There are no examples yet for this route. You can Try It yourself though!

Fix Issue

POST/design/issues/:issue_id

Apply the fixes for an issue with the given ID. The fix provided should satisfy the given schema.

Fix Issue

There are no examples yet for this route. You can Try It yourself though!

Bootstrap

Bootstrap Examples

Get Game Bootstrap

GET/design/versions/:version/bootstrap

Get details of the the game's bootstrap design.

Get Game Bootstrap

There are no examples yet for this route. You can Try It yourself though!

Update Game Bootstrap

PATCH/design/versions/:version/bootstrap

Update the game's bootstrap design.

Update Game Bootstrap

There are no examples yet for this route. You can Try It yourself though!

Deployment

Deployment Examples

Deploy Your Game Design

POST/design/versions/:version/deploy

Simulates or Launches the current game design based on whether the client is a test client. This is useful when integrating, you don't need to add conditions to check whether you are in staging or production.

In case the game was previously launched (in production), any potential design incompatibilities will be notified. Once these issues are fixed, you can upgrade the game. If there are no issues while deploying the game, it is upgraded automatically.

Deploy Your Game Design

There are no examples yet for this route. You can Try It yourself though!

Upgrade Game

POST/design/upgrade

Upgrades the game in production.

This is only to be used when there were issues when deploying the game and the issues have now been fixed.

If there are no issues while deploying the game, it is upgraded automatically.

Upgrade Game

There are no examples yet for this route. You can Try It yourself though!

Image

Image Examples

Get All Uploaded Images

GET/design/images

Returns all the images related to this game that you have uploaded to Playlyfe.

Parameters
NameDescription
skip

Number of teams to skip.

Defaults to0
limit

Maximum number of teams to return.

Defaults to10
 Query Parameter Request Body Required

Get All Uploaded Images

Request
GET https://api.playlyfe.com/v2/runtime/design/images HTTP/1.1
Response
[
  {
    "tags": [],
    "album": "g:test",
    "sizes": [
      {
        "height": null,
        "width": null,
        "name": "original"
      },
      {
        "height": 140,
        "width": 140,
        "name": "large"
      },
      {
        "height": 72,
        "width": 72,
        "name": "medium"
      },
      {
        "height": 40,
        "width": 40,
        "name": "small"
      },
      {
        "height": 24,
        "width": 24,
        "name": "icon"
      }
    ],
    "id": "1,10be003d08"
  }
]

Upload an Image

POST/design/images

Upload an image to the game album. The request body must a multi-part form data with the file field name as file. It will return the image id for the image which was uploaded. You can then use this id to assign images to your components.

Upload an Image

Request
POST https://api.playlyfe.com/v2/runtime/design/images HTTP/1.1
Response
{
  "tags": [],
  "album": "g:test",
  "sizes": [
    {
      "height": null,
      "width": null,
      "name": "original"
    },
    {
      "height": 140,
      "width": 140,
      "name": "large"
    },
    {
      "height": 72,
      "width": 72,
      "name": "medium"
    },
    {
      "height": 40,
      "width": 40,
      "name": "small"
    },
    {
      "height": 24,
      "width": 24,
      "name": "icon"
    }
  ],
  "id": "1,10be003d08"
}

Read an Image

GET/design/images/:image_id

Read an image that you created on Playlyfe.

Read an Image

Request
GET https://api.playlyfe.com/v2/runtime/design/images/1,10be003d08 HTTP/1.1
Response
Binary Image Data
Possible Errors
404image_not_found

Image 'id' does not exist

Delete an Image

DELETE/design/images/:image_id

Delete an image that you created on Playlyfe.

Delete an Image

Request
DELETE https://api.playlyfe.com/v2/runtime/design/images/1,10be003d08 HTTP/1.1
Response
{
  "message": "The image '1,10be003d08' has been deleted "
}