Share via


Tag object

The Tag object contains info about tags that are associated with a photo or a video on Microsoft OneDrive.

The Live SDK REST API supports reading Tag objects. Use the wl.photos, and wl.skydrive scopes to read Tag objects. Use the wl.contacts_photos and wl.contacts_skydrive scopes to read the Tag objects that are associated with any photos that other users have shared with the user.

Valid object paths

  • /PHOTO_ID/tags

  • /VIDEO_ID/tags

  • /TAG_ID

Structures

The Tag object contains the following structures.

Structure

Type

R/W

Description

data

array

R

An array of Tag objects, if a collection of objects is returned.

id

string

R

The Tag object's ID.

user

object

R/W

The user object for the tagged person.

name (user object)

string

R/W

The name of the tagged person.

id (user object)

string

R/W

The user ID of the tagged user if they have one; otherwise, null.

x

number

R/W

The center of the tag's horizontal position, measured as a floating-point percentage from 0 to 100, from the left edge of the photo. This value is not returned for Video objects.

y

number

R/W

The center of the tag's vertical position, measured as a floating-point percentage from 0 to 100, from the top edge of the photo. This value is not returned for Video objects.

created_time

string

R

The time, in ISO 8601 format, at which the tag was created.

Examples

The following is an example of a collection of Tag objects. (For brevity, only the first object is shown.)

{
    "id": "tag.22688711f5410e6c.22688711f5410e6c!767.PRaXZrdHI1uYGQYi9CU0StrzHak",
    "user": {
        "name": "Roberto Tamburello",
        "id": "8c8ce076ca27823f"
    },
    "x": 43.8986,
    "y": 54.4138,
    "created_time": "2011-04-22T01:17:00+0000"
}

Note

Information about the tagged user is stored in the user attribute. The x and y members are not present on tags that are returned from a object.

To get a collection of Tag objects by using the Live SDK REST API, make a GET request to /RESOURCE_ID/tags.

See also

REST objects