Skip to content

Latest commit

 

History

History
677 lines (510 loc) · 13.4 KB

HTTP.md

File metadata and controls

677 lines (510 loc) · 13.4 KB

IMGER v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Imger it is an HTTP service for image processing based on filters and profiles. Supported filters: overlay, rotate, blur, contrast, brightness, crop, gamma.

Base URLs:

Email: Support License: MIT

profiles

Profile is a configured set of filters that can be applied when processing images.

get__profiles

Code samples

GET /api/v1/profiles HTTP/1.1

Accept: application/json

GET /profiles

Return a list of profiles

Parameters

Name In Type Required Description
limit query integer(int32) false Number of profiles to return (max 10, default 5)
skip query integer(int32) false Number of profiles to skip

Example responses

200 Response

[
  {
    "id": "string",
    "created": "2019-08-24T14:15:22Z",
    "updated": "2019-08-24T14:15:22Z",
    "filters": [
      {
        "id": "string",
        "parameters": [
          {
            "property1": {},
            "property2": {}
          }
        ]
      }
    ]
  }
]

Responses

Status Meaning Description Schema
200 OK List of profiles Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Profile] false none none
» id string false none none
» created string(date-time) false none none
» updated string(date-time) false none none
» filters [Filter] false none none
»» id string false none none
»» parameters [object] false none none
»»» additionalProperties object false none none
This operation does not require authentication

post__profiles

Code samples

POST /api/v1/profiles HTTP/1.1

Content-Type: application/json
Accept: application/json

POST /profiles

Creates a new profile

Body parameter

{
  "id": "string",
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Parameters

Name In Type Required Description
body body CreateProfile true Profile properties

Example responses

201 Response

{
  "id": "string",
  "created": "2019-08-24T14:15:22Z",
  "updated": "2019-08-24T14:15:22Z",
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
201 Created Returns the created profile Profile
400 Bad Request Body is not a valid json Error
404 Not Found Profile not found None
422 Unprocessable Entity Validation error Error
This operation does not require authentication

get__profiles_{id}

Code samples

GET /api/v1/profiles/{id} HTTP/1.1

Accept: application/json

GET /profiles/{id}

Returns a profile with the given ID

Parameters

Name In Type Required Description
id path string true Profile ID

Example responses

200 Response

{
  "id": "string",
  "created": "2019-08-24T14:15:22Z",
  "updated": "2019-08-24T14:15:22Z",
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Return a profile Profile
404 Not Found Profile not found None
This operation does not require authentication

put__profiles_{id}

Code samples

PUT /api/v1/profiles/{id} HTTP/1.1

Content-Type: application/json
Accept: application/json

PUT /profiles/{id}

Update profile with the given ID

Body parameter

{
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Parameters

Name In Type Required Description
id path string true Profile ID
body body UpdateProfile true Profile properties to update

Example responses

200 Response

{
  "id": "string",
  "created": "2019-08-24T14:15:22Z",
  "updated": "2019-08-24T14:15:22Z",
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Returns the updated profile Profile
400 Bad Request Body is not a valid json Error
404 Not Found Profile not found None
422 Unprocessable Entity Validation error Error
This operation does not require authentication

delete__profiles_{id}

Code samples

DELETE /api/v1/profiles/{id} HTTP/1.1

DELETE /profiles/{id}

Delete profile with the given ID

Parameters

Name In Type Required Description
id path string true Profile ID

Responses

Status Meaning Description Schema
204 No Content Deleted profile successfully None
404 Not Found Profile not found None
This operation does not require authentication

effects

Effects are used to transform images.

get__effects

Code samples

GET /api/v1/effects HTTP/1.1

Accept: application/json

GET /effects

Returns all available effects

Example responses

200 Response

[
  {
    "id": "string",
    "description": "string",
    "parameters": {
      "description": "string",
      "required": true,
      "type": "string",
      "example": "string",
      "default": "string",
      "values": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK A list of effects Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
anonymous [Effect] false none none
» id string false none none
» description string false none none
» parameters object false none none
»» description string false none none
»» required boolean false none none
»» type string false none none
»» example string false none none
»» default string false none none
»» values string false none none
This operation does not require authentication

get__effects_{id}

Code samples

GET /api/v1/effects/{id} HTTP/1.1

Accept: application/json

GET /effects/{id}

Returns an effect with the given ID

Parameters

Name In Type Required Description
id path string true Effect ID

Example responses

200 Response

{
  "id": "string",
  "description": "string",
  "parameters": {
    "description": "string",
    "required": true,
    "type": "string",
    "example": "string",
    "default": "string",
    "values": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Return an effect Effect
404 Not Found Effect not found None
This operation does not require authentication

images

Processes images based on filters and profiles.

get__images

Code samples

GET /api/v1/images?imgSrc=string HTTP/1.1

Accept: image/png

GET /images

Process image applying the given filters

Parameters

Name In Type Required Description
imgSrc query string true Image source url
profile query string false Profile to apply
filters query string false Json with filters

Example responses

400 Response

Responses

Status Meaning Description Schema
400 Bad Request Filters are not a valid json Error
404 Not Found Image not found None
422 Unprocessable Entity Filters are not valid Error
This operation does not require authentication

Schemas

Filter

{
  "id": "string",
  "parameters": [
    {
      "property1": {},
      "property2": {}
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string false none none
parameters [object] false none none
» additionalProperties object false none none

Profile

{
  "id": "string",
  "created": "2019-08-24T14:15:22Z",
  "updated": "2019-08-24T14:15:22Z",
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string false none none
created string(date-time) false none none
updated string(date-time) false none none
filters [Filter] false none none

CreateProfile

{
  "id": "string",
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string false none none
filters [Filter] false none none

UpdateProfile

{
  "filters": [
    {
      "id": "string",
      "parameters": [
        {
          "property1": {},
          "property2": {}
        }
      ]
    }
  ]
}

Properties

Name Type Required Restrictions Description
filters [Filter] false none none

Effect

{
  "id": "string",
  "description": "string",
  "parameters": {
    "description": "string",
    "required": true,
    "type": "string",
    "example": "string",
    "default": "string",
    "values": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
description string false none none
parameters object false none none
» description string false none none
» required boolean false none none
» type string false none none
» example string false none none
» default string false none none
» values string false none none

Error

{
  "error_type": "string",
  "message": "string"
}

Properties

Name Type Required Restrictions Description
error_type string false none none
message string false none none