Skip to main content

Introduction

TTNINJS

The TTNINJS from newswire follows the 1.7 version of the spec, but can have slight differences from the documents from the media API or deliverer pipeline.

One intentional difference is that image renditions don't include dimensions and byte sizes. This is done to avoid extra lookups in the delivery process, which would introduce new error sources and latencies.

Newsvalue

If no newsvalue is present in the document it will be derived from the "webprio" instead.

WebprioNewsvalue
15
24
32

API Access

Generating clients

You can either use the OpenAPI specification to generate a generic client, or the protobuf specification to generate a Twirp client.

Authentication

The content API supports OAuth2 token bearer authentication. Documentation here.

In order to access the API, the token must have at least scope roles and the grantee/user must have the role ROLE_OFP_CUSTOMER_ADMIN.

Delivery tags

Delivery tags set by rules will be added to the TTNINJS documents as signal.deliverytags:

"signals": {
"deliverytags": [
"tag-a",
"tag-b"
]
}

Setting up a delivery destination

Deliveries can be set up either through TT Studio, or through the API. Rules are best created through TT Studio, but can also be managed through the API. The delivered items can be read through the GetDeliveries method and/or be sent through one of the push methods below.

S3 Delivery

S3 delivery can be used with any S3 compatible service, and it's configured with endpoint and credentials. If you're using AWS S3 the endpoint should be the format s3.[region-code].amazonaws.com, f.ex.:

s3.eu-west-1.amazonaws.com
s3.eu-north-1.amazonaws.com
s3.eu-west-1.amazonaws.com

When delivering to an S3 destination the S3 object will be tagged with the "delivery-[name of tag]": "true". In the example above the S3 object would be tagged with:

{
"delivery-tag-a": "true",
"delivery-tag-b": "true"
}

This should allow easy routing for serverless processing based on the delivery tag.

Permissions

The user will need to have the s3:PutObject and s3:PutObjectTagging permissions or equivalent, as it uploads objects with tagging to support the delivery tags.

SFTP Delivery

SFTP delivery can be set up with either key authentication (recommended) or password authentication. When setting up key authentication you can choose to either have the key generated (recommended, as this allows us to set up authentication without ever sending the private key over public internet) or provide your own private key.