With the 3decision API, you can edit the metadata of your previously registered structures.
Structure Metadata are accessible from the user interface in the "GENERAL" section of the Information Browser.
These are not to be confused with Structure Annotations which are a different type of information.
This section describes how to use the appropriate endpoints for editing structure metadata:
PUT /structures/{structure_id}/metadata
PUT /structures/metadata
To edit the structure metadata, you first need to access and activate the API (instructions in the Access page of this documentation).
For editing metadata of a single structure, you should use the PUT /structures/{structure_id}/metadata
, for which you would require:
structureID
: the internal identifier of the structure you want to edit (to retrieve the structureID, use GET /structures/code/{external_code}
endpoint. See the dedicated section below for a step-by-step guide)Experimental Method
: the experimental method used to determine the atomic structure. The list of all allowed values can be found with the GET /experimental-methods
endpoint.Resolution
: resolution obtained during structure determination, in case of 'SOLUTION NMR' or 'MODEL' experimental methods, you should use 0 as resolution.Title
: structure title.Label
: structure label.For editing metadata of a batch of structures, you should use the PUT /structures/metadata
, for which you would require payloads for each structure you want to edit, with the same information for the single structure edit.
The structureID is the unique identifier (in the format of a number) generated upon registration of any structure in the 3decision database. The external code is a 6-digit code that identifies a structure registered by a User in the user interface.
To retrieve the structureID from the external code, you can use the GET /structures/code/{external_code}
endpoint.
GET /structures/code/{external_code}
endpointcurl -X 'GET' \
'https://3decision-<customer>-api.discngine.cloud/structures/code/pjhzap' \
-H 'accept: application/json' \
-H 'X-API-VERSION: 1' \
-H 'Authorization: Bearer eyJh********I6Y'
{
"structures": [
{
"structure_id": 823681,
"external_code": "myawr9"
}
]
}
The structureID is returned in the response body, and this is the value to use in the "structureID" field of the Metadata endpoints.
PUT /structures/{structure_id}/metadata
endpoint{
"title": "My test title",
"label": "My test label"
}
curl -X 'PUT' \
'https://3decision-api.discngine.cloud/structures/823681/metadata' \
-H 'accept: application/json' \
-H 'X-API-VERSION: 1' \
-H 'Authorization: Bearer eyJhxxxxpz8Vzgdo8' \
-H 'Content-Type: application/json' \
-d '{
"title": "My test title",
"label": "My test label"
}'
[
{
"structure_id": 823681,
"experimentalMethodId": 104,
"resolution": 2.166,
"title": "My test title",
"label": "My test label"
}
]
In the "GENERAL" section of the Information panel of your structure now you will find the updated title and label
PUT /structures/metadata
endpoint[
{
"title": "My new test title",
"label": "My new test label",
"structure_id": 823681
},
{
"title": "My test title",
"label": "My test label",
"structure_id": 821398
}
]
curl -X 'PUT' \
'https://3decision-api.discngine.cloud/structures/metadata' \
-H 'accept: application/json' \
-H 'X-API-VERSION: 1' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzA2NywidXNlcm5hbWUiOiJlbGlzYS5tYXJ0aW5vX19fZGlzY25naW5lLmNvbSIsImVtYWlsIjoiZWxpc2EubWFydGlub0BkaXNjbmdpbmUuY29tIiwiam9iIjpudWxsLCJkZXNjcmlwdGlvbiI6bnVsbCwic3RhdHVzIjoiYWN0aXZlIiwiY29ubmVjdGVkIjoiTiIsInByb2ZpbGUiOnsiaWQiOjIsImxhYmVsIjoiQ3J5c3RhbGxvZ3JhcGhlciIsImRlc2NyaXB0aW9uIjoiQ3J5c3RhbGxvZ3JhcGhlciBwcm9maWxlIn0sIm9yZ2FuaXphdGlvbl9pZCI6MSwiZGlzcGxheV9uYW1lIjoiRWxpc2EgTWFydGlubyIsImV4cCI6MTcyMzE2ODk0NiwiaWF0IjoxNzIzMTAwNTQ2LCJpc3MiOiIzREVDSVNJT04ifQ.k5lAJaW7P-io9yZe-WkdXq1rYLBUnJIXgwpz8Vzgdo8' \
-H 'Content-Type: application/json' \
-d '[
{
"title": "My new test title",
"label": "My new test label",
"structure_id": 823681
},
{
"title": "My test title",
"label": "My test label",
"structure_id": 821398
}
]'
[
{
"structure_id": 823681,
"experimentalMethodId": 104,
"resolution": 2.166,
"title": "My new test title",
"label": "My new test label"
},
{
"structure_id": 821398,
"experimentalMethodId": 104,
"resolution": 1.8800000000000001,
"title": "My test title",
"label": "My test label"
}
]