Create A Property Of An Entity
To add property to an existing entity, we need to make the following HTTP request
post
/api/v1/{entity-type}/{id}/{entity-property}
Create a property in already existing entity
Parameters
Path
entity-type*
Type of entity to update
id*
id of the entity to update
entity-property*
entity Property which to be added in already existing entity
Header
authorization
Set to
Bearer {access-token}
if roles in Schema is not anonymous. Else token can be emptycontent-type*
Set to
application/json
Body
...*
Object
Property to be updated
Responses
200: OK
curl --location \
--request 'POST' \
--header 'content-type: application/json' \
--header 'authorization: bearer {access-token}' \
--data-raw '{
"city": "Ahmedabad"
}' \
'{registry-url}/api/v1/{entity-type}/{id}/{entity-property}'
printf '{
"city": "Ahmedabad"
}' | http POST \
'{registry-url}/api/v1/{entity-type}/{id}/{entity-property}' \
'content-type: application/json' \
'authorization: Bearer {access-token}'
{registry-url}
is usually http://localhost:{port}. The port can be found under theregistry
section in thedocker-compose.yml
file and is usually8081
.
Last modified 5mo ago