Search documentation
karat

+

K

User Documentation ↗

Get object media

GET/api/gotham/v1/objects/{primaryKey}/media
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Get media metadata for object. Media metadata contains an identifier and other attributes suitable for display/download, such as content type and title.

Path parameters

primaryKey
string

The primary key of the requested object.

Query parameters

preview
boolean
optional

Represents a boolean value that restricts an endpoint to preview mode when set to true.

Response body

GetMediaResponse
object

Success response

Hide child attributes

Hide child attributes

media
list<Media>
optional
Show child attributes

Show child attributes

Media
object

The representation of a media reference attached to an Object. To download media contents, pass the Media RID to the get media content operation.

Show child attributes

Show child attributes

rid
string

The unique resource identifier of a media component.

title
string

The user-friendly title of a of media, suitable for displaying to users.

description
string
optional

The user-friendly description of a of media, suitable for displaying to users. May not be present for all media.

sizeBytes
string
optional

The size of media in bytes.

mediaType
string

The media type of the media. Examples: application/json, application/pdf, application/octet-stream, image/jpeg

security
list<SecurityKey>
optional

The ID of the security details for this media. There can be multiple associated with a single media. If a user has he security markings or groups of any of them, they will have the associated permission.

Show child attributes

Show child attributes

SecurityKey
string

The unique identifier of the object component security for an object component. This key is only meant for deduplication and lookup in the security details included in a single response. It has no guarantees or meaning outside a single response.

securityDetails
map<SecurityKey, ObjectComponentSecurity>
optional
Show child attributes

Show child attributes

SecurityKey
string

The unique identifier of the object component security for an object component. This key is only meant for deduplication and lookup in the security details included in a single response. It has no guarantees or meaning outside a single response.

ObjectComponentSecurity
object

Security mutation details for a component of an object - property, media, link. Specifying security overrides the system's default security when creating and updating data. If portion markings are specified, permissions may be specified. If portion markings are not specified, permissions must be specified.

This model may evolve over time for other security features.

Show child attributes

Show child attributes

portionMarkings
list<PortionMarking>
optional

Collection of classification portion markings; markings are validated against the system's Classification Based Access Control (CBAC) rules.

If invalid, an InvalidClassificationPortionMarkings error will be thrown.

If not specified, no markings will be applied.

Show child attributes

Show child attributes

PortionMarking
string

Security markings represent the level of access control that applies to a specific piece of information (e.g., object property, object title). Security markings are required upon creating a new object, and upon adding a new property to an existing object. To access information with one or more markings, the user must have access to the markings associated with that information as defined by your organization's defined security rules. Only users with the correct permissions can get, update, or delete a property with security markings.

In particular, if a user creates an object and adds a property of type with highly restricted markings, it is possible that subsequent calls to the get object properties endpoint may fail to display the highly restricted property.

Contact your Palantir administrator for more information on the markings that your organization uses.

permissions
list<PermissionItem>
optional

An optional mapping of groups to permissions allowed for the group. If not specified, the system's default is for the Everyone group to have WRITE permission, and the Administrators group to have OWNER permission.

A user will get the highest permission of any of the group they belong to. If portion markings are specified, the user must have access to all the markings specified before these permissions are applied.

Show child attributes

Show child attributes

PermissionItem
object

A mapping of a group to a permission.

Show child attributes

Show child attributes

group
object

A qualified group name as used when defining permissions. A group contains a name, and optionally a realm. The realm is required for external groups.

Show child attributes

Show child attributes

name
string

The base name of the group.

realm
string
optional

The realm of the group. Empty for internal groups.

permission
string (enum)

A permission, one of READ, WRITE, or OWNER. Each successive permission implies the previous ones, so WRITE implies READ, and OWNER implies READ and WRITE.

Enum values: READ, WRITE, OWNER

Examples

Request

Copied!
1 2 3 curl \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/gotham/v1/objects/ri.gotham.111111-0.object-internal.111111/media?preview=true"

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 { "media": [ { "rid": "ri.gotham.111111-0.media-internal.111111.xtdsXlRMFmRRUdwQsD2kZOYOLY_2FS0VQ9SviNM6AJ_2FJM_3D", "title": "myimage.jpg", "description": "My Image Description", "sizeBytes": 10312, "mediaType": "image/jpeg" } ] }