POST api/v1/media

Upload a media item.

Request Information

URI Parameters

None.

Body Parameters

AddMediaItemDto
NameDescriptionTypeAdditional information
ContentType

Content Type of the attachment.

string

None.

Media

Media as pure byte array. Note: Use only one of Media or Base64Media not both

Collection of byte

None.

Base64Media

Media as Base64 encoded string. Note: Use only one of Media or Base64Media not both

string

None.

Caption

A caption to go with the item. This will be used as status post text if the CreateStatusPost option is set to true

string

None.

Description

Option description to go with the photo

string

None.

UniqueMediaName

A Unique name that is associated with media items. When media is requested using the UniqueMediaName it can show the latest or a stream of the media associated with the name.

string

None.

Location

Location this photo was taken (or of)

LocationDto

None.

Tags

Tags to associate with the photo

Collection of string

None.

CreateStatusPost

Create a status post for this media item.

boolean

None.

TTL

How long the item should be kept for before being deleted (in seconds)

integer

None.

Request Formats

application/json, text/json, application/senml+json

Sample:
{
  "ContentType": "sample string 1",
  "Media": "QEA=",
  "Base64Media": "sample string 2",
  "Caption": "sample string 3",
  "Description": "sample string 4",
  "UniqueMediaName": "sample string 5",
  "Location": {
    "Name": "sample string 1",
    "Latitude": 2.1,
    "Longitude": 3.1,
    "Elevation": 4.1,
    "WellKnownLocationId": "48e846ce-290d-44b8-893c-5daa5dd2aab8",
    "LastUpdated": "2024-12-26T07:42:56.043556+00:00"
  },
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "CreateStatusPost": true,
  "TTL": 1
}

application/xml, text/xml

Sample:
<AddMediaItemDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Media">
  <Base64Media>sample string 2</Base64Media>
  <Caption>sample string 3</Caption>
  <ContentType>sample string 1</ContentType>
  <CreateStatusPost>true</CreateStatusPost>
  <Description>sample string 4</Description>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:Elevation>4.1</d2p1:Elevation>
    <d2p1:LastUpdated>2024-12-26T07:42:56.043556+00:00</d2p1:LastUpdated>
    <d2p1:Latitude>2.1</d2p1:Latitude>
    <d2p1:Longitude>3.1</d2p1:Longitude>
    <d2p1:Name>sample string 1</d2p1:Name>
    <d2p1:WellKnownLocationId>48e846ce-290d-44b8-893c-5daa5dd2aab8</d2p1:WellKnownLocationId>
  </Location>
  <Media>QEA=</Media>
  <TTL>1</TTL>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <UniqueMediaName>sample string 5</UniqueMediaName>
</AddMediaItemDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

MediaItemDto
NameDescriptionTypeAdditional information
Id

Id

globally unique identifier

None.

UserId

Published by this user/member/device

globally unique identifier

None.

ContentType

Content type (png, jpg, etc).

string

None.

Caption

A caption to go with the item. This will be used as status post text if the CreateStatusPost option is set to true

string

None.

Description

Option description to go with the photo

string

None.

UniqueMediaName

A Unique name that is associated with media items. When media is requested using the UniqueMediaName it can show the latest or a stream of the media associated with the name.

string

None.

Location

Location this photo was taken (or of)

LocationDto

None.

Tags

Tags to associate with the photo

Collection of string

None.

Links

List of the links (e.g. self)

Collection of LinkDto

None.

Actions

List of actionable links (e.g. delete)

Collection of LinkDto

None.

DateAdded

When the item was added.

date

None.

LastUpdated

When the item was last updated

date

None.

Private

If this media item is flagged as private to the individual account.

boolean

None.

Response Formats

application/json, text/json, application/senml+json

Sample:
{
  "Id": "b83bc7c7-ef24-428d-8801-f0840f4f8b87",
  "UserId": "0819ac65-0e63-42a0-9444-9cb2948b2127",
  "ContentType": "sample string 3",
  "Caption": "sample string 4",
  "Description": "sample string 5",
  "UniqueMediaName": "sample string 6",
  "Location": {
    "Name": "sample string 1",
    "Latitude": 2.1,
    "Longitude": 3.1,
    "Elevation": 4.1,
    "WellKnownLocationId": "7d1c622b-902d-4dff-a7fb-e4d4f79c2825",
    "LastUpdated": "2024-12-26T07:42:56.0589453+00:00"
  },
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "Links": [
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    },
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    }
  ],
  "Actions": [
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    },
    {
      "Href": "sample string 1",
      "Rel": "sample string 2",
      "Action": "sample string 3"
    }
  ],
  "DateAdded": "2024-12-26T07:42:56.0589453+00:00",
  "LastUpdated": "2024-12-26T07:42:56.0589453+00:00",
  "Private": true
}

application/xml, text/xml

Sample:
<MediaItemDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Media">
  <Actions xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
  </Actions>
  <Caption>sample string 4</Caption>
  <ContentType>sample string 3</ContentType>
  <DateAdded>2024-12-26T07:42:56.0589453+00:00</DateAdded>
  <Description>sample string 5</Description>
  <Id>b83bc7c7-ef24-428d-8801-f0840f4f8b87</Id>
  <LastUpdated>2024-12-26T07:42:56.0589453+00:00</LastUpdated>
  <Links xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
    <d2p1:LinkViewModel>
      <d2p1:Action>sample string 3</d2p1:Action>
      <d2p1:Href>sample string 1</d2p1:Href>
      <d2p1:Rel>sample string 2</d2p1:Rel>
    </d2p1:LinkViewModel>
  </Links>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:Elevation>4.1</d2p1:Elevation>
    <d2p1:LastUpdated>2024-12-26T07:42:56.0589453+00:00</d2p1:LastUpdated>
    <d2p1:Latitude>2.1</d2p1:Latitude>
    <d2p1:Longitude>3.1</d2p1:Longitude>
    <d2p1:Name>sample string 1</d2p1:Name>
    <d2p1:WellKnownLocationId>7d1c622b-902d-4dff-a7fb-e4d4f79c2825</d2p1:WellKnownLocationId>
  </Location>
  <Private>true</Private>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <UniqueMediaName>sample string 6</UniqueMediaName>
  <UserId>0819ac65-0e63-42a0-9444-9cb2948b2127</UserId>
</MediaItemDto>