Raise An Attestation

post
/api/v1/send
Making a Claim
Parameters
Header
content-type*
Set to application/json
authorization
Set to Bearer {access-token} if roles in schema of which attestation is to raised does not contain anonymous else token can be empty
Body
...*
Object
The value of the claim
Responses
200: OK
Success Response of attestation sent
Sample Request Body
{
"entityName": "Teacher",
"entityId": "{id}",
"name": "schoolAffiliation" // attestation name
"propertiesOSID": { // OSIDs of properties to be attested
}
}
If you retrieve the entity by the Retrieve Entity API Endpoint, you can see the id field in osid

Usage

cURL

curl --location --request POST '{registry-url}/api/v1/send' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "entityName": "Teacher",
  "entityId": "{id}",
  "name": "schoolAffiliation"
}'

HTTPie

printf '{
  "entityName": "Teacher",
  "entityId": "{id}",
  "name": "schoolAffiliation"
}'| http POST '{registry-url}/api/v1/send' \
Authorization:'Bearer {access-token}' \
Content-Type:'application/json' \
{registry-url} is usually http://localhost:{port}. The port can be found under the registry section in the docker-compose.yml file and is usually 8081