DoubleStreamEx |
DoubleStreamEx.append(double... values) |
Returns a new DoubleStreamEx which is a concatenation of this
stream and the stream containing supplied values
|
DoubleStreamEx |
DoubleStreamEx.append(DoubleStream other) |
Creates a lazily concatenated stream whose elements are all the elements
of this stream followed by all the elements of the other stream.
|
DoubleStreamEx |
IntStreamEx.asDoubleStream() |
|
DoubleStreamEx |
LongStreamEx.asDoubleStream() |
|
DoubleStreamEx |
DoubleStreamEx.atLeast(double value) |
Returns a stream consisting of the elements of this stream that greater
than or equal to the specified value.
|
DoubleStreamEx |
DoubleStreamEx.atMost(double value) |
Returns a stream consisting of the elements of this stream that less than
or equal to the specified value.
|
static DoubleStreamEx |
DoubleStreamEx.constant(double value,
long length) |
Returns a sequential unordered DoubleStreamEx of given length
which elements are equal to supplied value.
|
DoubleStreamEx |
DoubleStreamEx.distinct() |
|
DoubleStreamEx |
DoubleStreamEx.dropWhile(DoublePredicate predicate) |
Returns a stream consisting of all elements from this stream starting
from the first element which does not match the given predicate.
|
DoubleStreamEx |
IntStreamEx.elements(double[] array) |
Returns a DoubleStreamEx consisting of the elements of given
array corresponding to the indices which appear in this stream.
|
static DoubleStreamEx |
DoubleStreamEx.empty() |
Returns an empty sequential DoubleStreamEx .
|
DoubleStreamEx |
DoubleStreamEx.filter(DoublePredicate predicate) |
|
DoubleStreamEx |
DoubleStreamEx.flatMap(DoubleFunction<? extends DoubleStream> mapper) |
|
DoubleStreamEx |
AbstractStreamEx.flatMapToDouble(Function<? super T,? extends DoubleStream> mapper) |
|
DoubleStreamEx |
IntStreamEx.flatMapToDouble(IntFunction<? extends DoubleStream> mapper) |
Returns a DoubleStreamEx consisting of the results of replacing
each element of this stream with the contents of a mapped stream produced
by applying the provided mapping function to each element.
|
DoubleStreamEx |
LongStreamEx.flatMapToDouble(LongFunction<? extends DoubleStream> mapper) |
Returns a DoubleStreamEx consisting of the results of replacing
each element of this stream with the contents of a mapped stream produced
by applying the provided mapping function to each element.
|
static DoubleStreamEx |
DoubleStreamEx.generate(DoubleSupplier s) |
Returns an infinite sequential unordered stream where each element is
generated by the provided DoubleSupplier .
|
DoubleStreamEx |
DoubleStreamEx.greater(double value) |
Returns a stream consisting of the elements of this stream that strictly
greater than the specified value.
|
DoubleStreamEx |
DoubleStreamEx.intersperse(int delimiter) |
Returns a new stream containing all the elements of the original stream interspersed with
given delimiter.
|
static DoubleStreamEx |
DoubleStreamEx.iterate(double seed,
DoublePredicate predicate,
DoubleUnaryOperator f) |
Returns a sequential ordered DoubleStreamEx produced by iterative
application of a function to an initial element, conditioned on
satisfying the supplied predicate.
|
static DoubleStreamEx |
DoubleStreamEx.iterate(double seed,
DoubleUnaryOperator f) |
Returns an infinite sequential ordered DoubleStreamEx produced by
iterative application of a function f to an initial element
seed , producing a stream consisting of seed ,
f(seed) , f(f(seed)) , etc.
|
DoubleStreamEx |
DoubleStreamEx.less(double value) |
Returns a stream consisting of the elements of this stream that strictly
less than the specified value.
|
DoubleStreamEx |
DoubleStreamEx.limit(long maxSize) |
|
DoubleStreamEx |
DoubleStreamEx.map(DoubleUnaryOperator mapper) |
|
DoubleStreamEx |
DoubleStreamEx.mapFirst(DoubleUnaryOperator mapper) |
Returns a stream where the first element is the replaced with the result
of applying the given function while the other elements are left intact.
|
DoubleStreamEx |
DoubleStreamEx.mapLast(DoubleUnaryOperator mapper) |
Returns a stream where the last element is the replaced with the result
of applying the given function while the other elements are left intact.
|
DoubleStreamEx |
AbstractStreamEx.mapToDouble(ToDoubleFunction<? super T> mapper) |
|
DoubleStreamEx |
IntStreamEx.mapToDouble(IntToDoubleFunction mapper) |
|
DoubleStreamEx |
LongStreamEx.mapToDouble(LongToDoubleFunction mapper) |
|
static DoubleStreamEx |
DoubleStreamEx.of(double element) |
Returns a sequential DoubleStreamEx containing a single element.
|
static DoubleStreamEx |
DoubleStreamEx.of(double... elements) |
Returns a sequential ordered DoubleStreamEx whose elements are
the specified values.
|
static DoubleStreamEx |
DoubleStreamEx.of(double[] array,
int startInclusive,
int endExclusive) |
Returns a sequential DoubleStreamEx with the specified range of
the specified array as its source.
|
static DoubleStreamEx |
DoubleStreamEx.of(float... elements) |
Returns a sequential ordered DoubleStreamEx whose elements are
the specified float values casted to double.
|
static DoubleStreamEx |
DoubleStreamEx.of(float[] array,
int startInclusive,
int endExclusive) |
Returns a sequential DoubleStreamEx with the specified range of
the specified array as its source.
|
static DoubleStreamEx |
DoubleStreamEx.of(Double[] array) |
Returns a sequential ordered DoubleStreamEx whose elements are
the unboxed elements of supplied array.
|
static DoubleStreamEx |
DoubleStreamEx.of(DoubleBuffer buf) |
Returns a sequential ordered DoubleStreamEx whose elements are
the values in the supplied DoubleBuffer .
|
static DoubleStreamEx |
DoubleStreamEx.of(Collection<Double> collection) |
Returns a sequential ordered DoubleStreamEx whose elements are
the unboxed elements of supplied collection.
|
static DoubleStreamEx |
DoubleStreamEx.of(OptionalDouble optional) |
Returns a sequential DoubleStreamEx containing an
OptionalDouble value, if present, otherwise returns an empty
DoubleStreamEx .
|
static DoubleStreamEx |
DoubleStreamEx.of(PrimitiveIterator.OfDouble iterator) |
|
static DoubleStreamEx |
DoubleStreamEx.of(Random random) |
Returns an effectively unlimited stream of pseudorandom double
values, each between zero (inclusive) and one (exclusive) produced by
given Random object.
|
static DoubleStreamEx |
DoubleStreamEx.of(Random random,
double randomNumberOrigin,
double randomNumberBound) |
Returns an effectively unlimited stream of pseudorandom double
values, each conforming to the given origin (inclusive) and bound
(exclusive) produced by given Random object.
|
static DoubleStreamEx |
DoubleStreamEx.of(Random random,
long streamSize) |
Returns a stream producing the given streamSize number of
pseudorandom double values, each between zero (inclusive) and one
(exclusive) produced by given Random object.
|
static DoubleStreamEx |
DoubleStreamEx.of(Random random,
long streamSize,
double randomNumberOrigin,
double randomNumberBound) |
Returns a stream producing the given streamSize number of
pseudorandom double values, each conforming to the given origin
(inclusive) and bound (exclusive) produced by given Random
object.
|
static DoubleStreamEx |
DoubleStreamEx.of(Spliterator.OfDouble spliterator) |
|
static DoubleStreamEx |
DoubleStreamEx.of(DoubleStream stream) |
Returns a DoubleStreamEx object which wraps given
DoubleStream .
|
DoubleStreamEx |
DoubleStreamEx.onClose(Runnable closeHandler) |
|
DoubleStreamEx |
DoubleStreamEx.pairMap(DoubleBinaryOperator mapper) |
Returns a stream consisting of the results of applying the given function
to the every adjacent pair of elements of this stream.
|
DoubleStreamEx |
DoubleStreamEx.parallel() |
|
DoubleStreamEx |
DoubleStreamEx.parallel(ForkJoinPool fjp) |
|
DoubleStreamEx |
DoubleStreamEx.peek(DoubleConsumer action) |
|
DoubleStreamEx |
DoubleStreamEx.peekFirst(DoubleConsumer action) |
Returns a stream consisting of the elements of this stream, additionally
performing the provided action on the first stream element when it's
consumed from the resulting stream.
|
DoubleStreamEx |
DoubleStreamEx.peekLast(DoubleConsumer action) |
Returns a stream consisting of the elements of this stream, additionally
performing the provided action on the last stream element when it's
consumed from the resulting stream.
|
DoubleStreamEx |
DoubleStreamEx.prefix(DoubleBinaryOperator op) |
Returns a stream containing cumulative results of applying the
accumulation function going left to right.
|
DoubleStreamEx |
DoubleStreamEx.prepend(double... values) |
Returns a new DoubleStreamEx which is a concatenation of the
stream containing supplied values and this stream
|
DoubleStreamEx |
DoubleStreamEx.prepend(DoubleStream other) |
Creates a lazily concatenated stream whose elements are all the elements
of the other stream followed by all the elements of this stream.
|
static DoubleStreamEx |
DoubleStreamEx.produce(Predicate<DoubleConsumer> producer) |
Return an ordered stream produced by consecutive calls of the supplied
producer until it returns false.
|
DoubleStreamEx |
DoubleStreamEx.remove(DoublePredicate predicate) |
Returns a stream consisting of the elements of this stream that don't
match the given predicate.
|
DoubleStreamEx |
DoubleStreamEx.reverseSorted() |
Returns a stream consisting of the elements of this stream in reverse
sorted order.
|
DoubleStreamEx |
DoubleStreamEx.sequential() |
|
DoubleStreamEx |
DoubleStreamEx.skip(long n) |
|
DoubleStreamEx |
DoubleStreamEx.sorted() |
|
DoubleStreamEx |
DoubleStreamEx.sorted(Comparator<Double> comparator) |
Returns a stream consisting of the elements of this stream sorted
according to the given comparator.
|
<V extends Comparable<? super V>> DoubleStreamEx |
DoubleStreamEx.sortedBy(DoubleFunction<V> keyExtractor) |
Returns a stream consisting of the elements of this stream, sorted
according to the natural order of the keys extracted by provided
function.
|
DoubleStreamEx |
DoubleStreamEx.sortedByDouble(DoubleUnaryOperator keyExtractor) |
Returns a stream consisting of the elements of this stream, sorted
according to the double values extracted by provided function.
|
DoubleStreamEx |
DoubleStreamEx.sortedByInt(DoubleToIntFunction keyExtractor) |
Returns a stream consisting of the elements of this stream, sorted
according to the int values extracted by provided function.
|
DoubleStreamEx |
DoubleStreamEx.sortedByLong(DoubleToLongFunction keyExtractor) |
Returns a stream consisting of the elements of this stream, sorted
according to the long values extracted by provided function.
|
default DoubleStreamEx |
DoubleStreamEx.DoubleEmitter.stream() |
Returns the stream which covers all the elements emitted by this
emitter.
|
DoubleStreamEx |
DoubleStreamEx.takeWhile(DoublePredicate predicate) |
Returns a stream consisting of all elements from this stream until the
first element which does not match the given predicate is found.
|
DoubleStreamEx |
DoubleStreamEx.takeWhileInclusive(DoublePredicate predicate) |
Returns a stream consisting of all elements from this stream until the
first element which does not match the given predicate is found
(including the first mismatching element).
|
DoubleStreamEx |
DoubleStreamEx.unordered() |
|
static DoubleStreamEx |
DoubleStreamEx.zip(double[] first,
double[] second,
DoubleBinaryOperator mapper) |
Returns a sequential DoubleStreamEx containing the results of
applying the given function to the corresponding pairs of values in given
two arrays.
|


Sign Up
Name :
Email
Password
Gender
Male
Female
Others
Voter ID :
Aadhar number :
Address
Date of Birth :
Phone Number :
Sign up


Arhmat Services (Pty) Ltd is a 100% black owned private entity founded in 2016 to provide dynamic and empowered consultancy services to Public Entities, Private Entities and Non-Profit Organizations. The company is formed of individuals with professional experience of over 12 years in sectors such as:
Arhmat Services utilizes a unique and flexible approach to consulting, by analysing the individual clients’ needs and working in tandem with the clients to develop actionable strategic solutions.
Our approach is built on fundamental values of passion, efficiency, accuracy, trustworthiness and integrity. We take pride in the quality of our work and continuously seek to improve our delivery capacity and quality. We customize our approach and content of engagement to best respond to the needs of each client.
The five strategic pillars of our consulting service include accounting/book, payroll, taxation, broad-based economic empowerment, new enterprise creation/business registration and business development.
Detailed Testimonial
Detailed Testimonial
Detailed Testimonial


Still Under Development
Android 10
The first beta of Android 10 was released on 13th March 2019 preliminary named Android Q. This beta program was firstly released in Pixel devices. Later on 7th May 2019 Beta 3 was released to other parterned devices. (DSU) Dynamic System Updates, finalized APIs and SDK(API level 29) was released on 5th June 2019 with Beta 4. It was announced on 22nd August 2019 that Android Q would be branded solely as Android 10 with no codename.
Android 10 was officially released on 3rd September 2019. It became the second most popular Android version.
Smart Replay in Notification
Gesture Navigation
Full screen gesture mode that eliminates the navigation bar and allows your applications to use the full screen, which enhances the user experience.
Dedicated dark mode for low light and battery saving.
User Privacy
As the privacy of the user is main concern, Android 10 brings some major restriction for the appications using user's location data, device camera, mike etc.Wifi and QR codes
Android 10 introduces you to wifi QR codes. Connecting to a wifi network by scanning QR code or create your QR code for wifi networksGoogle play service System will now fix your security and privacy bugs as your application updates.
Undo the app removal
App removed from the home screen, don't worry here what Android 10 provides. You can undo the app accidentally removed from home.
Live Captions
To make more user friendly interface Android 10 comes with Live Caption. This feature allows the user to turn in caption for any video, audio, podcasts etc. The ML(Machine Learning) Speech mode completely run in the device.
Media
Native MIDI API
Android 10 brings Native MIDI (Musical Instrument Digital Interface) to communicate with the MIDI devices through NDK (Native Development Kit).Capturing Audio Playback
Capturing audio now made available to any application. Application can catch the audio stream over any other apps using a new audio playback capture API.Vulkan 1.1
This is a base requirement of Vulkan on device with Android 10 and higher.Vulkan is nothing but a API for high-performance, 3D Graphics. High-quality, realtime graphics in application.


Sensi-pot
Environment Controller
Timezone
-12
-11
-10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
1
2
3
4
5
6
7
8
9
10
11
12
Log every: 1 hour
1 minute
5 minutes
10 minutes
20 minutes
1 hour
2 hours
3 hours
6 hours
12 hours
24 hours
Settings
Alarm is ON
Erase Memory
Memory Status
Pause Logging
Temperature
Humidity
Set Alarms
High temperature
Low temperature
High humidity
Low humidity
Save Settings
Timers
Device 5 Timer
On
Off
Device 6 Timer
On
Off
Device 7 Timer
On
Off
Save Settings
Device On/Off
Device 1 is ON
Device 2 is ON
Device 3 is ON
Device 4 is ON
Device 5 is ON
Device 6 is ON
Device 7 is ON
Device 8 is ON
This is a info alert check it out!
Air Temperature
°
Air Humidity
%
Light
%


Indyme
CLX
Configuration
Version 0.5
Restart
Application
This command restarts the CLX application. The application will start in less than 10 seconds.
Reboot
System
This command reboots the system. Please wait 30 to 40 seconds for system to reset.
System
Configuration
Displays various system configuration information.
Diagnostic
Tools
Performs system tests on alarms, inputs and output devices.
System
Status
Displays current system status.
Log
Displays
Displays system level log files.
System
Setup
Chain Name
Store Number
Time Zone
System Alarms
Network
Setup
Sets up network configuration.
Store Hours
Setup
Sets up store hours.
Input
Setup
Sets up inputs.
Output Device
Setup
Sets up output devices.
Routing
Setup
Sets up routes.
Alarm
Setup
Sets up alarms.
Promos
Setup
Sets up promo messages.
TOD
Setup
Sets up time-of-day alarms.
Answer Sets
Setup
Sets up AA answer sets.
Audio
Configuration
Allows playing of audio files and uploading of audio files.
Canned Message
Setup
Sets up canned messages.
Help
FAQ
Help and FAQ information.


Gasoline prices up, diesel down on November 19
Oil companies will implement slightly varying adjustments. Check out which ones are implementing higher or lower rates here.
by Ralf RivasSubscribe
Email Address
Newsletters
- Glenda Gloria's Take this Tuesday
- Huddle by Miriam Grace Go
- The Newsbreak Agenda by Chay Hofileña
- Sometimes, all you need is video by Lilibeth Frondoso


Selected:
Score:
Choose from one!
1
2
3
4
5
6
The timer runs out in: _ s
Let's see if it's right or wrong


Platform of Trust API Documentation
What is Platform of Trust?
Communally built Platform of Trust provides a trustworthy and easy-to-use surrounding where you can utilize a vast data pool and develop everyday services for your customers with the help from the developer community and without a need for pricey and time-consuming integrations.
Platform of Trust has Finnish origins, but it’s built to expand globally through the network of built environment innovation hubs.
Developer Portal
Our Developer Portal is your one-stop-shop. From there you'll find getting started guides, API descriptions, use case descriptions and link to API documentation.
End-to-end developer experience
APIs play crucial role in our end-end-end developer experience from integrating data to creating valuable applications. API -first experience and consistent APIs are important to us and thus we have created (work in progress) API Design Guide to offer guidance for our distributes API development teams.
Market place
Market place is the bazaar to find more data products to use in application development. Visa versa, it is also the service where your data products are added during the integration process. You can list data products in the market place with Product API.
Getting started
Some instructions and tips to make your life easier (and less support requests to us):
Create an account in sandbox environment from https://world-sandbox.oftrust.net/
Endpoints related code examples are constructed against SANDBOX environment
https://api-sandbox.oftrust.net/
.In PRODUCTION use, change domain in api endpoints to
https://api.oftrust.net/
To test APIs you need to get needed Bearer Token See Authentication section
If you found a bug or missing information in the documentation, contact us at<EMAIL_ADDRESS>or create an issue in Github.
First create an account in sandbox version of World app. If you have an account in production environment, that does not work in the sandbox environment.
You should get familiar with Authentication process regardless of are you integration data sources or building applications.
Related to authentication is the Bearer Token which is needed in some of the API calls. Check out the How to get Bearer token?
Some of the API endpoints are CORS enabled and they are marked in the description.
Another thing to understand is the harmonised data models. We recommend that you get familiar with core ontologies especially if you are integrating data sources to the Platform of Trust.
Standards used
Dates: we use a subset of ISO-8601 - RFC 3339. Example 2008-09-15T15:53:00+05:00
Core Ontology: The Platform Of Trust core ontology can be found as a JSON-LD ontology file under ontologies/pot.jsonld.
Each identity type has their own context which
describes the attributes the identity has. The context file name gives a notion
of whether the context is for an identity
or a link
.
The identity describes the real world identities, such as apartments,
buildings, rooms etc. The links are the relations between identities.
As an example, the Tenant
-link can be applied between
a user identity and an apartment identity, meaning that the user is a tenant
in the apartment.
If only a link between identities is needed, without any kind
of role, the generic link-link.jsonld
can be used
contexts/link-link.jsonld.
Read more from Github
Broker API
Get Broker API related resources:
The Broker API provides means to connect a service to a translator that will return desired data from different sources. The data broker does not mangle the data in any way, it only functions as a proxy between services and translators.
Version: v1
/broker/v1/fetch-data-product
post
Description: Request data from an external service defined by the data product, and product code. The data broker will validate the signature of the payload and when verified, relay the request to the translator connected to the data product. The translator will translate the information fetched from an external source into a standardized format that will be returned to the requester.
http request
Example for: POST /broker/v1/fetch-data-product
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/broker/v1/fetch-data-product \
-H "Content-Type: application/json" \
-H "X-Pot-Signature: Ioma1gqOVFUBrXiziWSCLqBG4vFozG3YgzPzillNip0=" \
-H "X-Pot-App: 379780e4-b511-4fa9-aef8-bda9bd58ab89" \
-H "X-Pot-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzY29w...DVs5aaf" \
-d '{
"timestamp": "2019-02-27T14:38:00+02:00",
"productCode": "business-identity-test",
"parameters": {
"businessId": "1234567-8"
}
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/prh-data-product.jsonld",
"data": {
"@context": "https://standards.oftrust.net/contexts/prh-data-product-parameters.jsonld",
"@type": "BusinessIdentity",
"totalResults": 1,
"offset": 0,
"items": [
{
"name": "Example Company Oy",
"businessId": "1234567-8",
"companyForm": "OY",
"registrationDate": "2015-02-05"
}
]
},
"signature": {
"type": "RsaSignature2018",
"created": "2019-03-14T10:33:31+00:00",
"creator": "https://example.com/example.pub",
"signatureValue": "MJWJxS3rh0hylgGyIILROiF4t+/w+gH...iTuKR8KhPMe4XVQ1I="
}
}
POST /broker/v1/fetch-data-product
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| version | path | Yes | string | |
| X-Pot-Signature | header | A HMAC-SHA256 signature in base64 encoded format. The signature is created by taking the request payload, e.g. a Python dict, and converting it to a string. Python example: body_string = json.dumps( The keys MUST be sorted, without indentation and separators comma (,) and colon (:) specified. Get the digest by passing the app access token (generated when creating a new app) and the body string to hmac : digest = Return the digest in base64 encoded format: X-Pot-Signature = base64.b64encode(digest).decode() |
Yes | string |
| X-Pot-App | header | The requesting application's client ID. | Yes | string |
| X-Pot-Token | header | The currently logged in user's OAuth access token. | No | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 200 | |
| 422 |
Calendar API
Get Calendar API related resources:
The calendar API provides means to create calendar entries to identities.
You can e.g. create an event for a housing company identity, a reservation
to a room identity, or just a regular calendar entry to any identity you want.
The calendar entry requires a "to"
-identity, the ID of the identity to which
the calendar entry applies to. Specify a type for the entry, e.g.
Event
, Reservation
, CalendarEntry
. Give the calendar entry a title, e.g.
"Housewarming party", a start date, when the entry starts, and an end date
when the entry ends. The dates are in RFC3339 format, and will be saved in UTC
time.
You can specify if an entry repeats, as defined in ISO 8601 repeating
intervals. A location can be added as well, if needed, as a string, e.g.
"Living room".
The cc
is a list of user IDs to whom the calendar entry can be CC'd to.
A notification about the entry will be sent to these users.
Version: v1
/calendars/v1
post
Description: Create a new calendar entry
http request
Example for: POST /calendars/v1
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/calendars/v1/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"type": "Event",
"title": "Autumn feast 2",
"startDate": "2019-08-10T17:00:00+02:00",
"endDate": "2019-08-10T20:00:00+02:00",
"repeats": null,
"content": "Autumn feast",
"location": "Courtyard",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
]
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 201 Created
{
"@context": "https://standards.oftrust.net/contexts/calendar.jsonld",
"@type": "Event",
"@id": "67fa7be3-0c7d-4318-a09a-585181d1e6f3",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"title": "Autumn feast 2",
"startDate": "2019-08-10T15:00:00+00:00",
"endDate": "2019-08-10T18:00:00+00:00",
"repeats": null,
"content": "Autumn feast",
"location": "Courtyard",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": null,
"createdAt": "2019-03-14T14:02:29+00:00",
"updatedAt": "2019-03-14T14:02:29+00:00"
}
POST /calendars/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 201 | |
| 422 |
/calendars/v1/{id}
get
Description: Read one calendar by id
http request
Example for: GET /calendars/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/calendars/v1/67fa7be3-0c7d-4318-a09a-585181d1e6f3 \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/calendar.jsonld",
"@type": "Event",
"@id": "67fa7be3-0c7d-4318-a09a-585181d1e6f3",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"title": "Autumn feast 2",
"startDate": "2019-08-10T15:00:00+00:00",
"endDate": "2019-08-10T18:00:00+00:00",
"repeats": null,
"content": "Autumn feast",
"location": "Courtyard",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": null,
"createdAt": "2019-03-14T14:02:29+00:00",
"updatedAt": "2019-03-14T14:02:29+00:00"
}
GET /calendars/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the calendar | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
put
Description: Update a calendar by id
http request
Example for: PUT /calendars/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X PUT https://api-sandbox.oftrust.net/calendars/v1/67fa7be3-0c7d-4318-a09a-585181d1e6f3 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"title": "Autumn feast 3",
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 201 Created
{
"@context": "https://standards.oftrust.net/contexts/calendar.jsonld",
"@type": "Event",
"@id": "67fa7be3-0c7d-4318-a09a-585181d1e6f3",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"title": "Autumn feast 2",
"startDate": "2019-08-10T15:00:00+00:00",
"endDate": "2019-08-10T18:00:00+00:00",
"repeats": null,
"content": "Autumn feast",
"location": "Courtyard",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": null,
"createdAt": "2019-03-14T14:02:29+00:00",
"updatedAt": "2019-03-14T14:02:29+00:00"
}
PUT /calendars/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the calendar | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 | |
| 422 |
delete
Description: Delete a calendar by id
http request
Example for: DELETE /calendars/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X DELETE https://api-sandbox.oftrust.net/calendars/v1/67fa7be3-0c7d-4318-a09a-585181d1e6f3 \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return header structured like this:
HTTP/1.0 204 No Content
DELETE /calendars/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the calendar | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 204 | |
| 404 |
/calendars/v1/{toidentity}/list
get
Description: List calendars created for "to"-identity.
http request
Example for: GET /calendars/v1/{toIdentity}/list
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/calendars/v1/34fe0b13-e031-4ef2-822e-17eabad63259/list \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://schema.org/",
"@type": "collection",
"ItemList": [
{
"@context": "https://standards.oftrust.net/contexts/calendar.jsonld",
"@type": "Event",
"@id": "67fa7be3-0c7d-4318-a09a-585181d1e6f3",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"title": "Autumn feast",
"startDate": "2019-08-10T14:00:00+00:00",
"endDate": "2019-08-10T18:00:00+00:00",
"repeats": null,
"content": "Autumn feast stuff to do",
"location": "Courtyard",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"createdAt": "2019-03-14T14:02:29+00:00",
"updatedAt": "2019-03-14T14:02:29+00:00"
}
]
}
GET /calendars/v1/{toIdentity}/list
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| toIdentity | path | The identity to which the calendar belongs to. | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 |
Context API
Get Context API related resources:
The Context API provides means to list available JSON-LD contexts in the PlatformOfTrust/standards repository in GitHub.
The contexts defines the semantic meaning of the keys in the responses from the APIs. When creating a new identity, choose which type of identity to create by choosing the correct context. The context will then define the attributes the identity can have.
Version: v1
/contexts/v1
get
Description: Returns a list of all defined contexts
http request
Example for: GET /contexts/v1
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/contexts/v1/
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://schema.org/",
"@type": "collection",
"ItemList": [
{
"type": "Identity",
"name": "Apartment",
"url": "https://standards.oftrust.net/contexts/identity-apartment.jsonld"
},
...
{
"type": "Link",
"name": "Owner",
"url": "https://standards.oftrust.net/contexts/link-owner.jsonld"
}
]
}
GET /contexts/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| version | path | Yes | string |
Responses
| Code | Description |
|---|---|
| 200 |
Identity API
Get Identity API related resources:
The Identity API provides means to create, update and delete digital twins (identities) and manage links between them. The links provides the direction and type (sometimes called role) of the link.
Version: v1
/identities/v1
get
Description: List all identities created by currently logged in user
http request
Example for: GET /identities/v1
import requests
import json
import sys
endpoint = 'https://api-sandbox.oftrust.net/identities/v1/'
api_token= 'REPLACE_WITH_YOUR_TOKEN'
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer {0}'.format(api_token)}
# Get the indentities
try:
json_response = (requests.get(endpoint, headers=headers).json())
print(json.dumps(json_response, indent=4, sort_keys=True))
except:
print("Oops!",sys.exc_info()[0],"occured.")
curl https://api-sandbox.oftrust.net/identities/v1/ \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://schema.org/",
"@type": "collection",
"ItemList": [
{
"@context": "http://platformoftrust.github.io/standards/contexts/identity-person.jsonld",
"@type": "Person",
"@id": "fbd106c5-c594-4416-a87e-f61e578fe829",
"name": "John Doe",
"data": {
"firstName": "John",
"lastName": "Doe",
"gender": "Male"
},
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"createdAt": "2019-03-14T10:50:51+00:00",
"updatedAt": "2019-03-14T11:17:35+00:00",
"status": 0,
"inLinks": [],
"outLinks": []
},
...
]
}}
GET /identities/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| type | query | If given to GET /identities/v1?type=App , will list only the identities of @type: "App" |
No | string |
Responses
| Code | Description |
|---|---|
| 200 |
post
Description: Create a new identity
http request
Example for: POST /identities/v1
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/identities/v1/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"context": "http://platformoftrust.github.io/standards/contexts/identity-person.jsonld",
"type": "Person",
"name": "John Doe",
"data": {
"firstName": "John",
"lastName": "Doe"
}
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 201 Created
{
"@context": "http://platformoftrust.github.io/standards/contexts/identity-person.jsonld",
"@type": "Person",
"@id": "fbd106c5-c594-4416-a87e-f61e578fe829",
"name": "John Doe",
"data": {
"firstName": "John",
"lastName": "Doe"
},
"createdBy": "4c276e02-719c-4415-abba-a7afc4edc0c0",
"updatedBy": null,
"createdAt": "2019-03-14T10:50:51+00:00",
"updatedAt": "2019-03-14T10:50:51+00:00",
"status": 0,
"inLinks": [],
"outLinks": []
}
POST /identities/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 201 | |
| 422 |
/identities/v1/{id}
get
Description: Read one identity by id
http request
Example for: GET /identities/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/identities/v1/fbd106c5-c594-4416-a87e-f61e578fe829 \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "http://platformoftrust.github.io/standards/contexts/identity-person.jsonld",
"@type": "Person",
"@id": "fbd106c5-c594-4416-a87e-f61e578fe829",
"name": "John Doe",
"data": {
"firstName": "John",
"lastName": "Doe"
},
"createdBy": "4c276e02-719c-4415-abba-a7afc4edc0c0",
"updatedBy": null,
"createdAt": "2019-03-14T10:50:51+00:00",
"updatedAt": "2019-03-14T10:50:51+00:00",
"status": 0,
"inLinks": [],
"outLinks": []
}
GET /identities/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the Identity | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
put
Description: Update an identity by id
http request
Example for: PUT /identities/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X PUT https://api-sandbox.oftrust.net/identities/v1/fbd106c5-c594-4416-a87e-f61e578fe829 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"context": "http://platformoftrust.github.io/standards/contexts/identity-person.jsonld",
"type": "Person",
"name": "John Doe",
"data": {
"firstName": "John",
"lastName": "Doe",
"gender": "Male"
}
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "http://platformoftrust.github.io/standards/contexts/identity-person.jsonld",
"@type": "Person",
"@id": "fbd106c5-c594-4416-a87e-f61e578fe829",
"name": "John Doe",
"data": {
"firstName": "John",
"lastName": "Doe",
"gender": "Male"
},
"createdBy": "4c276e02-719c-4415-abba-a7afc4edc0c0",
"updatedBy": "4c276e02-719c-4415-abba-a7afc4edc0c0",
"createdAt": "2019-03-14T10:50:51+00:00",
"updatedAt": "2019-03-14T11:17:35+00:00",
"status": 0,
"inLinks": [],
"outLinks": []
}
PUT /identities/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the Identity | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 | |
| 422 |
delete
Description: Delete an identity by id
http request
Example for: DELETE /identities/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X DELETE https://api-sandbox.oftrust.net/identities/v1/fbd106c5-c594-4416-a87e-f61e578fe829 \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 204 No Content
DELETE /identities/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the Identity | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 204 | |
| 404 |
/identities/v1/{from_identity}/link/{to_identity}
post
Description: Creates a new link between two identities
http request
Example for: POST /identities/v1/{from_identity}/link/{to_identity}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/identities/v1/fbd106c5-c594-4416-a87e-f61e578fe829/link/86201e7d-6784-454b-9839-f7a6286f1791 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"context": "https://standards.oftrust.net/contexts/link-link.jsonld",
"type": "Link",
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 201 Created
{
"@context": "https://standards.oftrust.net/contexts/link-link.jsonld",
"@type": "Link",
"@id": "6ca1e7fb-48a7-4e2c-bb4f-98e2b934aa80",
"from": "fbd106c5-c594-4416-a87e-f61e578fe829",
"to": "86201e7d-6784-454b-9839-f7a6286f1791",
"createdBy": "93767688-4017-4952-b2d9-89286adca0c5",
"updatedBy": "93767688-4017-4952-b2d9-89286adca0c5",
"createdAt": "2019-04-10T08:27:00+00:00",
"updatedAt": "2019-04-10T08:27:00+00:00"
}
POST /identities/v1/{from_identity}/link/{to_identity}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| from_identity | path | The starting identity ID of the link | Yes | string |
| to_identity | path | The ending identity ID of the link | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 201 | |
| 404 | |
| 422 |
/identities/v1/{from_identity}/link/{to_identity}/{type}
get
Description: Read a link by type
http request
GET /identities/v1/{from_identity}/link/{to_identity}/{type}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| type | path | The @type of the link, for example Link , Tenant or Owner |
Yes | string |
| from_identity | path | The starting identity ID of the link | Yes | string |
| to_identity | path | The ending identity ID of the link | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
put
Description: Update a link
http request
Example for: PUT /identities/v1/{from_identity}/link/{to_identity}/{type}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X PUT https://api-sandbox.oftrust.net/identities/v1/fbd106c5-c594-4416-a87e-f61e578fe829/link/86201e7d-6784-454b-9839-f7a6286f1791/Link \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"context": "https://standards.oftrust.net/contexts/link-owner.jsonld",
"type": "Owner",
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/link-owner.jsonld",
"@type": "Owner",
"@id": "6ca1e7fb-48a7-4e2c-bb4f-98e2b934aa80",
"from": "fbd106c5-c594-4416-a87e-f61e578fe829",
"to": "86201e7d-6784-454b-9839-f7a6286f1791",
"createdBy": "93767688-4017-4952-b2d9-89286adca0c5",
"updatedBy": "93767688-4017-4952-b2d9-89286adca0c5",
"createdAt": "2019-04-10T08:27:00+00:00",
"updatedAt": "2019-05-10T08:27:00+00:00"
}
PUT /identities/v1/{from_identity}/link/{to_identity}/{type}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| type | path | The @type of the link, for example Link , Tenant or Owner |
Yes | string |
| from_identity | path | The starting identity ID of the link | Yes | string |
| to_identity | path | The ending identity ID of the link | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 201 | |
| 404 | |
| 422 |
delete
Description: Delete a link by type
http request
Example for: DELETE /identities/v1/{from_identity}/link/{to_identity}/{type}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X DELETE https://api-sandbox.oftrust.net/identities/v1/fbd106c5-c594-4416-a87e-f61e578fe829/link/86201e7d-6784-454b-9839-f7a6286f1791/Link \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 204 No Content
DELETE /identities/v1/{from_identity}/link/{to_identity}/{type}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| type | path | The @type of the link, for example Link , Tenant or Owner |
Yes | string |
| from_identity | path | The starting identity ID of the link | Yes | string |
| to_identity | path | The ending identity ID of the link | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 204 | |
| 404 | |
| 422 |
/identities/v1/{id}/links
get
Description: List all links for a given identity
http request
Example for: GET /identities/v1/{id}/links
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/identities/v1/35ee9e31-acee-42b4-ac7b-675790cc2721/links?type=Link \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://schema.org/",
"@type": "collection",
"ItemList": [
{
"@context": "https://standards.oftrust.net/contexts/link-link.jsonld",
"@type": "Link",
"@id": "10fab397-db00-424c-8281-8115b1985d23",
"from": "86201e7d-6784-454b-9839-f7a6286f1791",
"to": "35ee9e31-acee-42b4-ac7b-675790cc2721",
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": null,
"createdAt": "2019-03-14T13:46:15+00:00",
"updatedAt": "2019-03-14T13:46:15+00:00"
}
]
}
GET /identities/v1/{id}/links
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the identity | Yes | string |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| type | query | If given to GET /identities/v1/{id}/links?type=Owner , will list only the links of @type: "Owner" |
No | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
Message API
Get Message API related resources:
The message API provides means to create/send messages to identities. You can send a message to any identity, e.g. a housing company, where all users who has access to the housing company identity and its messages can read the message.
The message requires a "to"
-identity, the ID of the identity to which
the message applies to.
A message subject
and its content
should be added as well.
The cc
is a list of user IDs to whom the message can be CC'd to.
A notification about the message will be sent to these users.
Version: v1
/messages/v1
post
Description: Create a new message
http request
Example for: POST /messages/v1
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/messages/v1/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"subject": "Test message nr 1",
"content": "Testing the message api",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
]
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 201 Created
{
"@context": "https://standards.oftrust.net/contexts/message.jsonld",
"@type": "Message",
"@id": "3a9e31ff-b654-4069-8361-6b446dc04c95",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"subject": "Test message nr 1",
"content": "Testing the message api",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"readBy": [],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": null,
"createdAt": "2019-03-14T13:55:12+00:00",
"updatedAt": "2019-03-14T13:55:12+00:00"
}
POST /messages/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 201 | |
| 422 |
/messages/v1/{id}
get
Description: Read one message by id
http request
Example for: GET /messages/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/messages/v1/3a9e31ff-b654-4069-8361-6b446dc04c95 \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/message.jsonld",
"@type": "Message",
"@id": "3a9e31ff-b654-4069-8361-6b446dc04c95",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"subject": "Test message nr 1",
"content": "Testing the message api",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"readBy": [],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": null,
"createdAt": "2019-03-14T13:55:12+00:00",
"updatedAt": "2019-03-14T13:55:12+00:00"
}
GET /messages/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the message | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
put
Description: Update a message by id
http request
Example for: PUT /messages/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X PUT https://api-sandbox.oftrust.net/messages/v1/3a9e...04c95 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"subject": "Updated Test message",
"content": "Testing the message api"
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/message.jsonld",
"@type": "Message",
"@id": "3a9e31ff-b654-4069-8361-6b446dc04c95",
"toIdentity": "34fe0b13-e031-4ef2-822e-17eabad63259",
"subject": "Updated Test message",
"content": "Testing the message api",
"cc": [
"34fe0b13-e031-4ef2-822e-17eabad63259"
],
"readBy": [],
"createdBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"updatedBy": "34fe0b13-e031-4ef2-822e-17eabad63259",
"createdAt": "2019-03-14T13:55:12+00:00",
"updatedAt": "2019-03-14T13:58:13+00:00"
}
PUT /messages/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the message | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 | |
| 422 |
delete
Description: Delete a message by id
http request
Example for: DELETE /messages/v1/{id}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X DELETE https://api-sandbox.oftrust.net/messages/v1/3a9e31ff-b654-4069-8361-6b446dc04c95 \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return header structured like this:
HTTP/1.0 204 No Content
DELETE /messages/v1/{id}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the message | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 204 | |
| 404 |
/messages/v1/{id}/read
post
Description: Marks a message read by the currently logged in user.
http request
Example for: POST /messages/v1/{id}/read
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/messages/v1/3a9e31ff-b654-4069-8361-6b446dc04c95/read
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
POST /messages/v1/{id}/read
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| id | path | The ID of the message | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 403 |
/messages/v1/{toidentity}/list
get
Description: List messages sent to "to"-identity.
http request
GET /messages/v1/{toIdentity}/list
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| toIdentity | path | The identity to which the message belongs to. | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 200 |
Product API
Get Product API related resources:
The Product API provides means to manage products provided by PoT core. The product defines the URL to the translator, as well as a product code to use when requesting data from the translator.
Version: v1
/products/v1
post
Description: Create a new product
http request
Example for: POST /products/v1
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/products/v1/ \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dataContext": "https://standards.oftrust.net/contexts/product-data.jsonld",
"parameterContext": "https://standards.oftrust.net/contexts/product-parameters.jsonld",
"productCode": "business-identity-test",
"name": "Business identity",
"translatorUrl": "http://translator-test-backend-app/business-identity",
"organizationPublicKeys": [
{
"url": "https://example.com/example.pub",
"type": "RsaSignature2018"
}
],
"description": "Test translator business information"
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 201 Created
{
"@context": "https://standards.oftrust.net/contexts/product.jsonld",
"@type": "Product",
"@id": "https://api-sandbox.oftrust.net/product/v1/products/business-identity-test",
"productCode": "business-identity-test",
"dataContext": "https://standards.oftrust.net/contexts/product-data.jsonld",
"parameterContext": "https://standards.oftrust.net/contexts/product-parameters.jsonld",
"translatorUrl": "http://translator-test-backend-app/business-identity",
"name": "Business identity",
"organizationPublicKeys": [
{
"url": "https://example.com/example.pub",
"type": "RsaSignature2018"
}
],
"description": "Test translator business information",
"imageUrl": null
}
POST /products/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 201 | |
| 422 |
get
Description: Lists all available products. NOTE: This is a CORS enabled endpoint. Supports pagination.
http request
Example for: GET /products/v1
import http.client
try:
conn = http.client.HTTPSConnection('api-sandbox.oftrust.net')
conn.request("GET", "/products/v1/")
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
curl https://api-sandbox.oftrust.net/products/v1/
<!doctype html>
<html lang="en">
<head>
<script src="http://code.jquery.com/jquery-3.3.1.min.js"></script>
</head>
<body>
<script>
$( document ).ready(function() {
var potAPI = "https://api-sandbox.oftrust.net/products/v1/";
$.getJSON( potAPI, function( data ) {
alert(JSON.stringify(data));
});
});
</script>
</body>
</html>
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://schema.org/",
"@type": "collection",
"ItemList": [
{
"@context": "https://standards.oftrust.net/contexts/product.jsonld",
"@type": "Product",
"@id": "https://api-sandbox.oftrust.net/product/v1/products/prh-business-identity-data-product",
"productCode": "prh-business-identity-data-product",
"dataContext": null,
"parameterContext": "https://standards.oftrust.net/contexts/product-parameters.jsonld",
"translatorUrl": "http://translator-test-backend-app/business-identity",
"name": "PRH Business Identity",
"organizationPublicKeys": null,
"description": "Returns business information from the PRH Open Data API",
"imageUrl": null
},
...
]
}
GET /products/v1
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| version | path | Yes | string | |
| offset | query | Offset of a query | No | integer |
| limit | query | Limit the result of a query | No | integer |
Responses
| Code | Description |
|---|---|
| 200 |
/products/v1/{product_code}
get
Description: Reads a single product by product code. NOTE: This is a CORS enabled endpoint.
http request
Example for: GET /products/v1/{product_code}
import http.client
try:
conn = http.client.HTTPSConnection('api-sandbox.oftrust.net')
conn.request("GET", "/products/v1/business-identity-test")
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
curl https://api-sandbox.oftrust.net/products/v1/business-identity-test
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/product.jsonld",
"@type": "Product",
"@id": "https://api-sandbox.oftrust.net/product/v1/products/business-identity-test",
"productCode": "business-identity-test",
"dataContext": "https://standards.oftrust.net/contexts/product-data.jsonld",
"parameterContext": "https://standards.oftrust.net/contexts/product-parameters.jsonld",
"translatorUrl": "http://translator-test-backend-app/business-identity",
"name": "Business identity",
"organizationPublicKeys": [
{
"url": "https://example.com/example.pub",
"type": "RsaSignature2018"
}
],
"description": "Test translator business information",
"imageUrl": null
}
GET /products/v1/{product_code}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| product_code | path | The product code of the product. | Yes | string |
| version | path | Yes | string |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 |
put
Description: Update a product by product code
http request
Example for: PUT /products/v1/{product_code}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X PUT https://api-sandbox.oftrust.net/products/v1/business-identity-test \
-H "Content-Type: application/json" \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN" \
-d '{
"dataContext": "https://standards.oftrust.net/contexts/product-data.jsonld",
"parameterContext": "https://standards.oftrust.net/contexts/product-parameters.jsonld",
"name": "Testing business identity",
"translatorUrl": "http://translator-test-backend-app/business-identity",
"organizationPublicKeys": [
{
"url": "https://example.com/example.pub",
"type": "RsaSignature2018"
}
],
"description": "Test translator business information",
"imageUrl": "http://example.com/image.png"
}'
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 200 OK
{
"@context": "https://standards.oftrust.net/contexts/product.jsonld",
"@type": "Product",
"@id": "https://api-sandbox.oftrust.net/product/v1/products/business-identity-test",
"productCode": "business-identity-test",
"dataContext": "https://standards.oftrust.net/contexts/product-data.jsonld",
"parameterContext": "https://standards.oftrust.net/contexts/product-parameters.jsonld",
"translatorUrl": "http://translator-test-backend-app/business-identity",
"name": "Testing business identity",
"organizationPublicKeys": [
{
"url": "https://example.com/example.pub",
"type": "RsaSignature2018"
}
],
"description": "Test translator business information",
"imageUrl": "http://example.com/image.png"
}
PUT /products/v1/{product_code}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| product_code | path | The product code of the product. | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
| body | body | Yes |
Responses
| Code | Description |
|---|---|
| 200 | |
| 404 | |
| 422 |
delete
Description: Delete a product by product code
http request
Example for: DELETE /products/v1/{product_code}
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X DELETE https://api-sandbox.oftrust.net/products/v1/business-identity-test \
-H "Authorization: Bearer REPLACE_WITH_YOUR_TOKEN"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
The above example should return
JSON
structured like this:
HTTP/1.0 204 No Content
DELETE /products/v1/{product_code}
Parameters
| Name | Located in | Description | Required | Type |
|---|---|---|---|---|
| product_code | path | The product code of the product. | Yes | string |
| version | path | Yes | string | |
| Authorization | header | The Authorization header, MUST be Bearer {{access_token}} |
Yes | string |
Responses
| Code | Description |
|---|---|
| 204 | |
| 404 |
Authentication
Platform of Trust authentication is OAuth2 based. It's typically a good idea to explain the whole authentication process, because even to this day not everyone is familiar with how they work. In a nutshell this is what we use
You can read practical authentication example from Developer Portal App development guide
You also take a look at sample app from Github if you prefer code driven learning.
Example how Bearer is expected to be used in headers.
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl https://api-sandbox.oftrust.net/messages/v1/3a9e31ff-b654-4069-8361-6b446dc04c95 \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzY29w...DVs5aaf"
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
Use Bearer token and how to get it?
You have two options how to obtain Bearer token depending of your needs.
To learn and get familiar with APIS:
- Login to Sandbox environment World application (https://world-sandbox.oftrust.net)
- Get the
Authorization
cookie value from your browser. Cookie contains yourBearer
token. Cookie is valid for several hours, enough for testing.
Here's an example from Chrome Browser DevTools
For production:
- To get Bearer token, you need to set up your application with OAuth logic.
- Sample app contains information about the Bearer token as well.
Most of the APIs require bearer token in header ("Authorization: Bearer"). Exceptions to the rule are CORS enabled endpoints and Broker API.
Exception 1: CORS enabled APIs
APIs with CORS enabled endpoints which do not require any tokens:
Example how Broker API headers are expected to be given.
import sys
sys.stdout.write("Python example missing. Why not contribute one for us?")
curl -X POST https://api-sandbox.oftrust.net/broker/v1/fetch-data-product \
-H "Content-Type: application/json" \
-H "X-Pot-Signature: Ioma1gqOVFUBrXiziWSCLqBG4vFozG3YgzPzillNip0=" \
-H "X-Pot-App: 379780e4-b511-4fa9-aef8-bda9bd58ab89" \
-H "X-Pot-Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzY29w...DVs5aaf" \
console.error("Javascript example missing. Why not contribute one for us?");
System.out.println("Java example missing. Why not contribute one for us?");
Exception 2: Broker API
Second exception is the Broker API is a bit more complex and requires header parameters:
- X-Pot-Signature (HMAC-SHA256 signature in base64 encoded format),
- X-Pot-App and (The requesting application's client ID)
- X-Pot-Token (The currently logged in user's OAuth access token) as well.
Read more from Broker API.
Get client credentials
Before jumping into development you might want to get the client credentials. Getting those now let's you jump into code level testing right away without detours.
For each application you develop, you need to obtain new client credentials. These include a client identifier and a client shared-secret.
Recommended next step is to register new app:
- Login to World app and initiate new application registration.
- Fill in the required information and submit.
- Upon successful application registration, you will be shown client credentials.
Authentication code example
Now you have client credentials and you can start fiddling code and run you app in our sandbox environment. Code speaks for it self! Thus we have open source (MIT license) React sample app which contains authentication implementation among other things. You can clone the sample app from Github.
Errors
The Platform of Trust APIs all use the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- The item requested is hidden for administrators only. |
| 404 | Not Found -- The specified item could not be found. |
| 405 | Method Not Allowed -- You tried to access item with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't json. |
| 410 | Gone -- The requested item has been removed from our servers. |
| 422 | Unprocessable -- Entity is missing |
| 429 | Too Many Requests -- You're requesting too many times! Slow down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Feedback
If you found a bug or missing information in the documentation, contact us at<EMAIL_ADDRESS>or create an issue in Github.


This test attempts to change the src of an IMG tag to all black listed ports to confirm that WebKit returns the correct error for them - blocked instead of cannot find. It also tries the FTP ports for exemptions. Due to the nature of this test, the results can only be processed automatically via DumpRenderTree


| PWG New York City Meeting Details |
Live View from Lindy's in Times Square |
1394 Printing: May 15
PWG Hosted uPnP Meeting: May 16
PWG Plenary Session: May 17, 8:30 - 10:30 AM
IPP: May 17 (10:30AM - 5:30PM)
IPP: May 18
Universal Printer Driver Format (UPDF): May 19
| Meeting Location: Southgate
Tower, A Manhattan East Suite Hotel |
The hotel rate is $214/night for a studio suite -
single or double occupancy.
One-bedroom suites are also available at $239.00/night. Ask for the PWG rate.
Deadline for hotel reservations is April 28, 2000
There will be a meeting charge in the range of $80; participants are responsible for their own lunch.
YOU MUST REGISTER AT: http://www.fapo.com/ieee1284.htm
Please contact Cindy Tiritilli, IEEE-ISTO PWG Program Administrator at
+1-732-981-3434 or<EMAIL_ADDRESS>if you have any questions.


Cardinals Banking
My Dashboard
Logout
Edit System Manager Profile
Username
First Name
Last Name
E-mail
Phone Number
Address Line 1
City
State
Zipcode
Role
Employee
System Manager
Submit
Reset