Add an Entity
You can add a new entity using the POST method on the entities endpoint. You need a token with write privileges, otherwise a 401 or 403 will be sent back.
Entity Format
The only mandatory information for a new entity is its EID, which is a string of the form "http://scheme-url/ entity-id".
POST http://host.28.io/v1/_queries/public/api/entities?token=c3049752-4d35-43da-82a2-f89f1b06f7a4
{
"EID" : "http://www.example.com 001"
}
If the entity is known under several EIDs in different archives, then use an array with the EIDs field.
POST http://host.28.io/v1/_queries/public/api/entities?token=c3049752-4d35-43da-82a2-f89f1b06f7a4
{
"EIDs" : [
"http://www.example.com 001",
"http://www.example.com/other-scheme 001"
]
}
Finally, you can include profile-specific information inside a Profiles field, like so:
POST http://host.28.io/v1/_queries/public/api/entities?token=c3049752-4d35-43da-82a2-f89f1b06f7a4
{
"EID" : "http://www.sec.gov/CIK 0000021344",
"Profiles" : {
"SEC" : {
"Name" : "SEC",
"CompanyName" : "COCA COLA CO",
"CompanyType" : "Corporation",
"CIK" : "0000021344",
"IsTrust" : false,
"SIC" : "2080",
"SICDescription" : "BEVERAGES",
"SICGroup" : 9,
"Taxonomy" : "ci",
"Sector" : "Food/Kindred Products",
"Tickers" : [ "ko" ],
"Tags" : [ "FORTUNE100", "DOW30", "RUSSELL1000", "SP500" ],
"EntityName" : "COCA COLA CO",
"EntityRegistrantName" : "COCA COLA CO"
}
}
}
In general, any object output by a GET on the entities endpoint will be accepted in a POST.
You can post several entities at a time by sending them concatenated, with no comma separator.
In case of success, the response body contains a copy of the entity objects as they have been stored, after post-processing.
Further reference
The reference for the REST API including the JSound schema for the input is documented here