Slides

Slides are the images used within each deck, and our key tool of measurement. Each slide contains an image and caption. All of the images are selected by our Psychology Team, with the caption added to provide additional context. Each slide is paired with a specific set of personality traits, and is used to build the data set of a user's personality.

List

This method allows you to get a list of the slides for this assessment. It includes the path to each image for each slide and the position that the slides should be presented to the user.

Resource Information

HTTP Method GET
Resource URL https://api.traitify.com/v1/assessments/{assessment_id}/slides
Authentication Required? Yes
Response Format JSON

Query Parameters

position
required
The order this slide should be shown to the user taking this assessment
caption
required
The caption to show with the image for this slide
image_*
required
These are the images used for this slide

Example Request

GET
Authorization: Basic {your_public_key}:x
https://api.traitify.com/v1/assessments/{assessment_id}/slides

Example Response

200 OK

[
    {
        "id": "b93af357-0cd7-494e-b436-c67313c0fab6",
        "position": 1,
        "caption": "Using a Microscope ",
        "image_desktop": "https://traitify-api.s3.amazonaws.com/slides/b93af357-0cd7-494e-b436-c67313c0fab6/desktop",
        "image_desktop_retina": "https://traitify-api.s3.amazonaws.com/slides/b93af357-0cd7-494e-b436-c67313c0fab6/desktop_retina",
        "response": null,
        "time_taken": null,
        "completed_at": null,
        "created_at": 1414091516995,
        "focus_x": 62,
        "focus_y": 47
    },
    {
        "id": "2f898dd3-9eca-427e-94a8-332c5a0102da",
        "position": 2,
        "caption": "Media Production ",
        "image_desktop": "https://traitify-api.s3.amazonaws.com/slides/2f898dd3-9eca-427e-94a8-332c5a0102da/desktop",
        "image_desktop_retina": "https://traitify-api.s3.amazonaws.com/slides/2f898dd3-9eca-427e-94a8-332c5a0102da/desktop_retina",
        "response": null,
        "time_taken": null,
        "completed_at": null,
        "created_at": 1414091516995,
        "focus_x": 50,
        "focus_y": 50
    },
    ...
]


Bulk Update

This method allows you to update an assessment's slide responses in bulk. You pass in an array of the parameters below. There should be one array item for each slide you want to update.

Resource Information

HTTP Method PUT
Resource URL https://api.traitify.com/v1/assessments/{assessment_id}/slides
Authentication Required? Yes
Response Format JSON

Parameters

id
required
The id of the assessment slide you want to update
Example values: 781acd1f-8184-482d-a3d1-e6190d0b7db5, 99dc6bec-b9e8-414e-97fe-2d9ee4c6be08
response
required
The response from the person taking the assessment; "me" == true, "not me" == false
Example values: true, false
time_taken
required
The time (in milliseconds) it took for the person to respond to this slide
Example values: 1500, 900, 28030

Example Request

PUT
Authorization: Basic {your_public_key}:x
https://api.traitify.com/v1/assessments/{assessment_id}/slides

[
    {
        "id": "b93af357-0cd7-494e-b436-c67313c0fab6",
        "response": true,
        "time_taken": 1000
    },
    {
        "id": "2f898dd3-9eca-427e-94a8-332c5a0102da",
        "response": false,
        "time_taken": 900
    }
]

Example Response

200 OK

[
    {
        "id": "b93af357-0cd7-494e-b436-c67313c0fab6",
        "position": 1,
        "caption": "Using a Microscope ",
        "image_desktop": "https://traitify-api.s3.amazonaws.com/slides/b93af357-0cd7-494e-b436-c67313c0fab6/desktop",
        "image_desktop_retina": "https://traitify-api.s3.amazonaws.com/slides/b93af357-0cd7-494e-b436-c67313c0fab6/desktop_retina",
        "response": true,
        "time_taken": 600,
        "completed_at": 1414091516995,
        "created_at": 1414091516995,
        "focus_x": 62,
        "focus_y": 47
    },
    {
        "id": "2f898dd3-9eca-427e-94a8-332c5a0102da",
        "position": 2,
        "caption": "Media Production ",
        "image_desktop": "https://traitify-api.s3.amazonaws.com/slides/2f898dd3-9eca-427e-94a8-332c5a0102da/desktop",
        "image_desktop_retina": "https://traitify-api.s3.amazonaws.com/slides/2f898dd3-9eca-427e-94a8-332c5a0102da/desktop_retina",
        "response": false,
        "time_taken": 600,
        "completed_at": 1414091516995,
        "created_at": 1414091516995,
        "focus_x": 50,
        "focus_y": 50
    }
]


Update

This method allows you to update a single slide for an assessment.

Resource Information

HTTP Method PUT
Resource URL https://api.traitify.com/v1/assessments/{assessment_id}/slides/{slide_id}
Authentication Required? Yes
Response Format JSON

Parameters

id
required
The id of the assessment slide you want to update
Example values: 781acd1f-8184-482d-a3d1-e6190d0b7db5, 99dc6bec-b9e8-414e-97fe-2d9ee4c6be08
response
required
The response from the person taking the assessment; "me" == true, "not me" == false
Example values: true, false
time_taken
required
The time (in milliseconds) it took for the person to respond to this slide
Example values: 1500, 900, 28030

Example Request

PUT
Authorization: Basic {your_public_key}:x
https://api.traitify.com/v1/assessments/{assessment_id}/slides/{slide_id}

{
    "id": "781acd1f-8184-482d-a3d1-e6190d0b7db5",
    "response": true,
    "time_taken": 1000
}

Example Response

200 OK

{
    "id": "781acd1f-8184-482d-a3d1-e6190d0b7db5",
    "position": 1,
    "caption": "Swimming",
    "image_desktop": "https://traitify-api.s3.amazonaws.com/slides/781acd1f-8184-482d-a3d1-e6190d0b7db5/desktop",
    "image_desktop_retina": "https://traitify-api.s3.amazonaws.com/slides/781acd1f-8184-482d-a3d1-e6190d0b7db5/desktop_retina",
    "response": true,
    "time_taken": 1000,
    "completed_at": 1394724020890,
    "created_at": 1394719145536
}