question

Upvotes
Accepted
75 1 3 5

POST Single Attribute to a SubjectURi

HI

TO post a single triple attribute to a SubjectURI through the API, what is the endpoint to do so through?

Eg:

<http://d.opencalais.com/dochash-1/1409bb1e-d9a7-3f0b-ac24-a0cbbb28f03d>; <http://ont.tr.com/HasRelevanceTo>; "CoXYZ"

Thank you

post
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
1.2k 6 10 8
POST /context/{id}/rdf/file

or

POST /entity

The triples can potentially be stored in a separate context as Data Fusion will integrate the information using subjectURI or a custom context for the authenticating user is created if no contextId is provided.

At a minimum, the RDF requires an rdf:type and the label predicates defined as the system will reject the RDF otherwise. No explicit stitching is required if the subjectURI matches the subjectURI in another context that you would like to annotate. It is important that the entity type mappings are the same across contexts.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
63 2 0 1

Eric,

Did you check the REST API documentation (see here - http://docs.datafusion.thomsonreuters.com/restapi)?

Most information regarding API queries, including your instance's endpoint, can be found there along with sample queries.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

HI Jeff, yes i did. I remembered Tomasz told me it was removed, and use another replacement endpoint. But the other endpoint was also removed. Kindly assist. Thanks

Upvotes
75 1 3 5

Dear Tomasz,

POST /context/{id}/rdf/file

This requires a file.

For the other, an error returns. As this is not a new entity.

  "error": "Unable to create the entity with the newEntityUri, preferredLabelPredicate, and rdf parameters supplied. Please check the parameters and try again."
}
POST/ entity 
Sending, curl -X POST --header 'Content-Type: text/plain' --header 'Accept: application/json' --header 'Authorization: Bearer vvj8o71dfgtda46ic7d4tnvnrllr010i' -d '<http://rdf.entagen.com/ns/document/be0e516244f18db78f54997a6e6b60e5> <http://ont.tr.com/ppty/hasSentiment>  "0.5" .' 'https://dds-test.thomsonreuters.com/datafusion/api/entity?entityTypeId=3&newEntityUri=http%3A%2F%2Frdf.entagen.com%2Fns%2Fdocument%2Fbe0e516244f18db78f54997a6e6b60e5&preferredLabelPredicate=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23label'
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

See my updated answer, you need to add rdf:type and label predicates to the body of your POST. More examples in https://community.developers.refinitiv.com/questions/7184/endpoints-to-use-and-the-metadata-to-post-to-creat.html

Dear Tomasz, i am not creating a new entity but tagging new attributes to an existing entity. Is it necessary to add on label predicates? Thanks

Yes, that's how the API call is constructed but if the parameters match the existing mappings there will be no change as they will be simply overwritten.

Click below to post an Idea Post Idea