API Update Memory
Quick example
curl -X PUT -H "MMT-ApiKey:<my_api_key>" https://api.modernmt.eu/memories/5 \
-d "name=newName" \
-d "description=newDescription" \
| python -mjson.tool
{
"status": 200,
"data": {
"id": 5,
"key": "mk_f4932hg205vh7h20h05g72",
"name": "newName",
"description": "newDescription",
"externalId": null,
"creationDate": "2017-10-13T13:32:34+00:00"
}
}
Description
This method updates the name and description of a specific Memory that is already connected to the owner of the MMT-ApiKey header used in the HTTP Request.
If the MMT-ApiKey header is missing or invalid, this API returns an HTTP ERROR 401:
{
"status":401,
"error": {
"type":"AuthException",
"message":"Missing or invalid authentication header"
}
}
If the Memory was not already connected to the User, this API returns an HTTP ERROR 404:
{
"error": {
"message": "Requested resource not found",
"type": "NotFoundException"
},
"status": 404
}
Resource URL
https://api.modernmt.eu/memories/:id
Request Fields
name | The new name to use in the connection between this Memory and this User.
Example: newName |
key | The new description to use in the connection between this Memory and this User.
Example: newDescription |
Note: The Memory identifier must be specified in the URL. It can be:
- the id of the MMT Memory that this ServiceApi Memory refers to (example: 5);
- the MMT Memory Key (example: mk_f4932hg205vh7h20h05g72);
Response Fields
id | The MMT Memory id for the newly created Memory.
Example: 5 |
key | The MMT Memory key for this Memory.
Example: mk_f4932hg205vh7h20h05g72 |
externalId | Private parameter for internal use only |
name | The new name with which the User is linked to the Memory.
Example: BeautifulMemory |
description | The new description with which the User is linked to the Memory.
Example: My most precious memories |
creationDate | A timestamp marking the instant that the Memory was created. It refers to the creation of the actual Memory, and not to the moment when the User was connected to the Memory.
Example: 2017-10-13T13:32:34+00:00 |