API

Updated ,Created

API for the zrenderer service (https://github.com/zhad3/zrenderer).
Contact Info: team@openapitools.org
Version: 1.3
BasePath:
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

  1. APIKey KeyParamName:x-accesstoken KeyInQuery:false KeyInHeader:true

Methods

[ Jump to Models ]

Table of Contents

Admin

Rendering

Token

Admin

Up
post /admin/tokens
Create new access token (createToken)
Request body for token settings will only be used when the requester has the capability to modify access tokens.

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

BaseToken BaseToken (optional)
Body Parameter

Return type

Example data

Content-Type: application/json
{
  "id" : 4,
  "token" : "knlw2e6mppf5f49b7hrolypta8gjmp3g"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok TokenCreateResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

500

Server Error. GenericResponse

Up
delete /admin/tokens/{id}
Delete existing access token (deleteToken)
Admin tokens cannot be deleted.

Path parameters

id (required)
Path Parameter — Id of the access token default: null format: int32

Return type

Example data

Content-Type: application/json
{
  "statusMessage" : "Response message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok. GenericResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

404

Not found. GenericResponse

500

Server Error. GenericResponse

Up
get /admin/health
Retrieve status of service (getHealth)
Returns health data about the service. GC data is only returned for admins.

Return type

Example data

Content-Type: application/json
{
  "up" : true,
  "gc" : {
    "usedSize" : 2488464,
    "freeSize" : 2754352
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok HealthResponse

Up
get /admin/tokens
Get all access tokens (getTokens)
Only the admin may retrieve the admin token

Return type

array[AccessToken]

Example data

Content-Type: application/json
[ {
  "id" : 4,
  "token" : "knlw2e6mppf5f49b7hrolypta8gjmp3g",
  "isAdmin" : false,
  "description" : "Fred's token",
  "capabilities" : {
    "createAccessTokens" : false,
    "revokeAccessTokens" : false,
    "modifyAccessTokens" : false,
    "readAccessTokens" : false,
    "readHealth" : true
  },
  "properties" : {
    "maxJobIdsPerRequest" : 5,
    "maxRequestsPerHour" : 100
  }
}, {
  "id" : 5,
  "token" : "7k2sfh10cu1dio5l0pt9tig7aate9h9g",
  "isAdmin" : false,
  "description" : "Unknown's Bot",
  "capabilities" : {
    "createAccessTokens" : false,
    "revokeAccessTokens" : false,
    "modifyAccessTokens" : false,
    "readAccessTokens" : false,
    "readHealth" : true
  },
  "properties" : {
    "maxJobIdsPerRequest" : 10,
    "maxRequestsPerHour" : 500
  }
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok

401

Unauthorized. GenericResponse

Up
post /admin/tokens/{id}
Modify existing access token (modifyToken)

Path parameters

id (required)
Path Parameter — Id of the access token default: null format: int32

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

BaseToken BaseToken (optional)
Body Parameter

Return type

Example data

Content-Type: application/json
{
  "statusMessage" : "Response message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok. GenericResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

404

Not found. GenericResponse

500

Server Error. GenericResponse

Rendering

Up
post /render
Send a request to render sprites (render)

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

RenderRequest RenderRequest (required)
Body Parameter

Query parameters

downloadimage (optional)
Query Parameter — If provided, the request will return the first rendered image. default: null

Return type

Example data

Content-Type: application/json
{
  "output" : [ "output/1002/0-0.png", "output/1002/0-1.png", "output/1002/0-2.png", "output/1002/0-3.png", "output/1002/0.png" ]
}

Example data

Content-Type: application/zip
Custom MIME type example not yet supported: application/zip

Example data

Content-Type: image/png
Custom MIME type example not yet supported: image/png

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json
  • image/png
  • application/zip

Responses

200

Ok RenderResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

500

Server Error. GenericResponse

Token

Up
post /admin/tokens
Create new access token (createToken)
Request body for token settings will only be used when the requester has the capability to modify access tokens.

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

BaseToken BaseToken (optional)
Body Parameter

Return type

Example data

Content-Type: application/json
{
  "id" : 4,
  "token" : "knlw2e6mppf5f49b7hrolypta8gjmp3g"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok TokenCreateResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

500

Server Error. GenericResponse

Up
delete /admin/tokens/{id}
Delete existing access token (deleteToken)
Admin tokens cannot be deleted.

Path parameters

id (required)
Path Parameter — Id of the access token default: null format: int32

Return type

Example data

Content-Type: application/json
{
  "statusMessage" : "Response message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok. GenericResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

404

Not found. GenericResponse

500

Server Error. GenericResponse

Up
get /admin/health
Retrieve status of service (getHealth)
Returns health data about the service. GC data is only returned for admins.

Return type

Example data

Content-Type: application/json
{
  "up" : true,
  "gc" : {
    "usedSize" : 2488464,
    "freeSize" : 2754352
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok HealthResponse

Up
get /token/info
Get requesting access token info (getTokenInfo)
Returns the capabilities and properties of the requesting access token

Return type

Example data

Content-Type: application/json
{
  "capabilities" : {
    "createAccessTokens" : false,
    "readAccessTokens" : false,
    "readHealth" : true,
    "modifyAccessTokens" : false,
    "revokeAccessTokens" : false
  },
  "properties" : {
    "maxJobIdsPerRequest" : 5,
    "maxRequestsPerHour" : 100
  }
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok TokenInfoResponse

401

Unauthorized. GenericResponse

Up
get /admin/tokens
Get all access tokens (getTokens)
Only the admin may retrieve the admin token

Return type

array[AccessToken]

Example data

Content-Type: application/json
[ {
  "id" : 4,
  "token" : "knlw2e6mppf5f49b7hrolypta8gjmp3g",
  "isAdmin" : false,
  "description" : "Fred's token",
  "capabilities" : {
    "createAccessTokens" : false,
    "revokeAccessTokens" : false,
    "modifyAccessTokens" : false,
    "readAccessTokens" : false,
    "readHealth" : true
  },
  "properties" : {
    "maxJobIdsPerRequest" : 5,
    "maxRequestsPerHour" : 100
  }
}, {
  "id" : 5,
  "token" : "7k2sfh10cu1dio5l0pt9tig7aate9h9g",
  "isAdmin" : false,
  "description" : "Unknown's Bot",
  "capabilities" : {
    "createAccessTokens" : false,
    "revokeAccessTokens" : false,
    "modifyAccessTokens" : false,
    "readAccessTokens" : false,
    "readHealth" : true
  },
  "properties" : {
    "maxJobIdsPerRequest" : 10,
    "maxRequestsPerHour" : 500
  }
} ]

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok

401

Unauthorized. GenericResponse

Up
post /admin/tokens/{id}
Modify existing access token (modifyToken)

Path parameters

id (required)
Path Parameter — Id of the access token default: null format: int32

Consumes

This API call consumes the following media types via the Content-Type request header:
  • application/json

Request body

BaseToken BaseToken (optional)
Body Parameter

Return type

Example data

Content-Type: application/json
{
  "statusMessage" : "Response message"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.
  • application/json

Responses

200

Ok. GenericResponse

400

Illegal input for operation. GenericResponse

401

Unauthorized. GenericResponse

404

Not found. GenericResponse

500

Server Error. GenericResponse

Models

[ Jump to Methods ]

Table of Contents

  1. AccessToken -
  2. BaseToken -
  3. GenericResponse -
  4. HealthResponse -
  5. HealthResponse_gc -
  6. RenderRequest -
  7. RenderResponse -
  8. TokenCapabilities -
  9. TokenCreateResponse -
  10. TokenInfoResponse -
  11. TokenProperties -

AccessToken - Up

description (optional)
String The name/description of the access token to easily identify the owner/purpose of it.
capabilities (optional)
properties (optional)
id (optional)
Integer The identifier of this access token. format: int32
token (optional)
String The actual token value that is used to make requests.
isAdmin (optional)
Boolean Whether this token has admin privileges. Will only be returned if requested with an admin token.

BaseToken - Up

description (optional)
String The name/description of the access token to easily identify the owner/purpose of it.
capabilities (optional)
properties (optional)

HealthResponse - Up

up (optional)
Boolean Whether the service is up and running
gc (optional)

HealthResponse_gc - Up

usedSize (optional)
Integer The size of bytes allocated on the GC heap format: int32
freeSize (optional)
Integer The size of bytes freed on the GC heap format: int32

RenderRequest - Up

job
array[String] Job id(s) which should be rendered. Can contain multiple comma separated values as well as ranges (e.g. "1001-1999"). Providing a single value of "none" will not render the body, only the head with headgers.
action (optional)
Integer Action of the job which should be drawn. format: int32
frame (optional)
Integer Frame of the action which should be drawn. Set to -1 to draw all frames. format: int32
gender (optional)
BigDecimal Gender of the player character. Possible values are: 1=male or 0=female. format: int32
Enum:
0
1
head (optional)
Integer Head id which should be used when drawing a player. format: int32
outfit (optional)
Integer The alternative outfit for player characters. Not all characters have alternative outfits. In these cases the default character will be rendered instead. format: int32
headgear (optional)
array[Integer] Headgears which should be attached to the players head. format: int32
garment (optional)
Integer Garment which should be attached to the players body. format: int32
weapon (optional)
Integer Weapon which should be attached to the players body. format: int32
shield (optional)
Integer Shield which should be attached to the players body. format: int32
bodyPalette (optional)
Integer Palette for the body sprite. Set to -1 to use the standard palette. format: int32
headPalette (optional)
Integer Palette for the head sprite. Set to -1 to use the standard palette. format: int32
headdir (optional)
BigDecimal Direction in which the head should turn. This is only applied to player sprites and only to the stand and sit action. Possible values are: 0=straight, 1=left, 2=right or 3=all. If 'all' is set then this direction system is ignored and all frames are interpreted like any other one. format: int32
Enum:
0
1
2
3
madogearType (optional)
BigDecimal The alternative madogear sprite for player characters. Only applicable to madogear jobs. Possible values are 'robot' (0) and 'suit' (2). format: int32
Enum:
0
2
enableShadow (optional)
Boolean Draw shadow underneath the sprite.
canvas (optional)
String Sets a canvas onto which the sprite should be rendered. The canvas requires two options: its size and an origin point inside the canvas where the sprite should be placed. The format is as following: {width}x{height}±{x}±{y}. An origin point of +0+0 is equal to the top left corner. Example: 200x250+100+125. This would create a canvas and place the sprite in the center.
outputFormat (optional)
BigDecimal Defines the output format. Possible values are 0=png or 1=zip. If zip is chosen the zip will contain png files. format: int32
Enum:
0
1

TokenCapabilities - Up

Contains a list of capabilities that this token has.
createAccessTokens (optional)
Boolean Can use the endpoint to create new access tokens.
revokeAccessTokens (optional)
Boolean Can use the endpoint to revoke/delete access tokens.
modifyAccessTokens (optional)
Boolean Can use the endpoint to modify existing access tokens.
readAccessTokens (optional)
Boolean Can use the endpoint to return a list of existing access tokens.
readHealth (optional)
Boolean Can use the endpoint to retrieve health status.

TokenCreateResponse - Up

id (optional)
Integer Id of the newly created access token format: int32
token (optional)
String Token value of the newly created access token

TokenInfoResponse - Up

capabilities (optional)
properties (optional)

TokenProperties - Up

Contains a list of properties that this token has.
maxJobIdsPerRequest (optional)
Integer How many job ids this token may provide per request format: int32
maxRequestsPerHour (optional)
Integer Unused format: int32