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.