GET /api/v2/images/:id
Show an Image

Examples

GET /api/v2/images/5
200
{
  "data": {
    "id": "5",
    "type": "images",
    "links": {
      "self": "http://test.host/api/v2/images/5"
    },
    "attributes": {
      "media": "https://static-dev.smartkarma.com/images/media/000/000/005/original/test.png?1503974552",
      "media-file-name": "test.png",
      "media-file-size": 1024,
      "media-updated-at": "2017-08-29T10:42:32.965+08:00",
      "width": 0,
      "height": 0
    },
    "relationships": {
      "attachable": {
        "links": {
          "self": "http://test.host/api/v2/images/5/relationships/attachable",
          "related": "http://test.host/api/v2/images/5/attachable"
        }
      }
    }
  }
}

Params

Param name Description
id
required

Image ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


POST /api/v2/images
Create Image

Examples

POST /api/v2/images
{
  "data": {
    "type": "images",
    "attributes": {
      "media": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxQTEhUUExQVFBQXGBcYGBcWFxQYGBcXHBUXFxgYGhQcHCggGBolHBQXITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGxAQGzQkICYsLCwsLDQsLCwsLywsLCwsLCw0LCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLP/AABEIAOEA4QMBEQACEQEDEQH/xAAbAAEBAQEBAQEBAAAAAAAAAAAEBQMCBgEAB//EADQQAAEEAQIEBAUEAgIDAQAAAAEAAgMRBCExBRJBUSJhgZETMnHB8BShsdFS4WJyI7PxFf/EABsBAAMBAQEBAQAAAAAAAAAAAAMEBQIBBgAH/8QANhEAAgIBBAEDAwEHAgYDAAAAAQIAAxEEEiExQRMiUQUUMmEjcYGRobHwQlIVM5LB0eFDgvH/2gAMAwEAAhEDEQA/AP6ARzN0Prrr5Jn8TzE9XrNzBkbjP8R+v7j/AG4IncI5fmFjuuN7uoem1mGQZpPON0NFOcGOFQ65k3IyOWndOvl5/RNomeIxp9OQRiEn4mCN0ZdOQY+2lA7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K/Bdh6/wkNd0YhrPyl9+y87/qktfykTL3CpV/iP3ynV1OGKis6YuPdYPUA3UaEAxebw7BYaA8xZ/PdJ2dwfmb42yEfxgn7lKH89kPxEn7hs3dHr6nW/5R/dJ2b80f/Z3/AKZFsef3f91iP0jx/nkT8tylP//Z",
      "media-file-name": "my_uploaded_image.jpg",
      "media-file-size": "1024",
      "media-updated-at": "2017-08-29 10:42:24 +0800"
    },
    "relationships": {
      "attachable": {
        "data": {
          "type": "insights",
          "id": "1"
        }
      }
    }
  }
}
201
{
  "data": {
    "id": "1",
    "type": "images",
    "links": {
      "self": "http://test.host/api/v2/images/1"
    },
    "attributes": {
      "media": "https://static-dev.smartkarma.com/images/media/000/000/001/original/my_uploaded_image.jpg?1503974544",
      "media-file-name": "my_uploaded_image.jpg",
      "media-file-size": 1024,
      "media-updated-at": "2017-08-29T10:42:24.000+08:00",
      "width": 225,
      "height": 225
    },
    "relationships": {
      "attachable": {
        "links": {
          "self": "http://test.host/api/v2/images/1/relationships/attachable",
          "related": "http://test.host/api/v2/images/1/attachable"
        }
      }
    }
  }
}

Params

Param name Description
data
required

Image information

Validations:

  • Must be a Hash

data[type]
required

Validations:

data[attributes]
required

Validations:

  • Must be a Hash

data[attributes][media]
required

the file in data URL format

Validations:

  • Must be a String

data[attributes][media-file-name]
required

Validations:

  • Must be a String

data[attributes][media-file-size]
optional , nil allowed

Validations:

  • Must be a String

data[relationships]
required

Validations:

  • Must be a Hash

data[relationships][attachable]
required

Validations:

  • Must be a Hash

data[relationships][attachable][data]
required

Validations:

  • Must be a Hash

data[relationships][attachable][data][type]
required

Attachable type, which is `insights`

Validations:

  • Must be a String

data[relationships][attachable][data][id]
required

Insight ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


DELETE /api/v2/images/:id
Delete an Insight Document

Examples

DELETE /api/v2/images/6
204
{}

Params

Param name Description
id
required

Image ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.