Back to top
Vastuu Group

Create & Manage Digital Twins

Version: 1.0
Last updated: Feb. 18, 2021
|
Reading time: 9 min

Overview


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.

Capabilities:

  • Allows to read an identity by its id, provided READ permission is granted.
  • Allows to list all the links from and to an identity and paginate through them
  • Allows to create a new identity in the identity network
  • Allows to update an identity by its id, provided WRITE permission is granted
  • Allows to delete an identity, provided MANAGE permission is granted
  • Allows creating links between identities in the identity network
  • Allows reading a link by its type
  • Allows updating a link
  • Allows deleting a link
  • Allows listing all inbounds and outbounds links for an identity in the identity network
  • Allows discovering identities in the identity network
  • Allows discovering data products in the identity network


You need to be logged in into Platform of Trust Sandbox and get your bearer token to execute the following cURL requests.

POST an identity of type "Building"

curl -i --request POST \
  --url https://api-sandbox.oftrust.net/identities/v1 \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf' \
  --header 'content-type: application/json' \
  --data '{
    "context": "https://standards.oftrust.net/v2/Context/Identity/Structure/Building/",
    "type": "Building",
    "data": {
        "name": "Glass House"
    }
}'

GET details of an identity with its {identityId}

curl -i --request GET \
  --url https://api-sandbox.oftrust.net/identities/v1/{identityId} \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf'

POST a link between two identities

curl -i --request POST \
  --url https://api-sandbox.oftrust.net/identities/v1/{fromIdentityId}/link/{toIdentityId} \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf' \
  --header 'content-type: application/json' \
  --data '{
  "context": "https://standards.oftrust.net/v2/Context/Link/BelongsTo/",
  "type": "BelongsTo"
}'

GET details on only links of an identity

curl -i --request GET \
  --url https://api-sandbox.oftrust.net/identities/v1/{identityId}/links \
  --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9eyJzY29w...DVs5aaf'

NOTE: checkout doc.oftrust.net to see more requests to the Identity API and code samples in Java, Python and JavaScript.

NOTE: You can read more about different identities, link types and link contexts from our Ontology Viewer


API Specification

Download Open API Specification (OAS) for Identity here

Download RESTful API Modeling Language (RAML) specifications for Identity here

API Documentation

Check API endpoint, HTTP calls and associated parameters in details at docs.oftrust.net

Developer Guides

Read on how to get your Bearer Token to start accessing and using Platform of Trust APIs in this Guide

Read more about Identities and permissions on them in our Identities and Links guide

Read Identity and Data Discovery guide to learn discovering data products in an identity network.

Profiles in Other Platforms

ProgrammableWeb

Questions and Feedback

Have a question on Identity API? Shoot it in Platform of Trust Stack Overflow community page.

Did Identity API miss some feature? Make a Wish in GitHub.

Did we miss something? Make a Wish!

Tell us in Github

See all APIs