- 2 minutes to read
- Print
- DarkLight
- PDF
PUT | Update note
- 2 minutes to read
- Print
- DarkLight
- PDF
Update a note in MySafe.
Requirements
- Permission to edit the note in MySafe.
Request
PUT
api/mysafe/note/update[identifier]
Request parameters
Send the parameter below in the path of the URL.
identifier
- int - required - Unique identification of the note.Send the parameters you want to update in the request body.
name
- string - Name assigned to the note.
note
- string - The content of the note, limited to 900 characters.
Notes whose content exceeds 900 characters will result in error.
tags
- string - Keywords associated with the note.
users_allowed
- array of objects - Data of users allowed to access the note.
username
- string - Name of the user allowed to access the note.can_edit
- boolean - Edit permission.Users with can_edit
= true
permission can deactivate the note.
groups_allowed
- array of objects - Data of groups allowed to access the note.
name
- string - Name of the group allowed to access the note.can_edit
- boolean - Edit permission.Group members with can_edit
= true
permission can deactivate the note.
Example request
PUT
{{url}}api/mysafe/note/update/2
{
"users_allowed": [
{
"username" : "pduarte",
"can_edit" : false
}
]
}
Response
HTTP/1.1 200 OK
{
"code": 200,
"response": {
"status": 200,
"message": "Note successfully update",
"error": false,
"error_code": 0,
"detail": "",
"mensagem": "Note successfully update",
"erro": false,
"cod_erro": 0
},
"note_entity": {
"identifier": "2",
"name": "Secret note",
"tags": "secret",
"users_allowed": [
{
"username": "pduarte",
"can_edit": false
}
],
"groups_allowed": [],
"shared_error": []
}
}
Errors
400 - Bad Request
Message: "1001: Parameter note limited to 900 characters"
Possible cause: the content sent in note
exceeded the limit of 900 characters.
500 - Internal Server Error
Message: "Unexpected error."
Possible cause: the error is on the senhasegura server.
Solution: contact the support team for more information.
No route matched with those values.
Message: "No route matched with those values."
Possible causes: failure in your application's authentication with the senhasegura server or incorrect URL.
Solution: check the authentication parameters such as Access Token URL
, Client ID
, and Client Secret
and request a new access token or check and correct the URL.
An invalid response was received from the upstream server.
Message: "An invalid response was received from the upstream server."
Possible cause: the upstream server may be taking too long to respond, leading to a timeout error interpreted as an invalid response by the proxy/gateway server.
Solution: check the connectivity between the request origin and the senhasegura server.
The upstream server is timing out.
Message: "The upstream server is timing out."
Possible cause: the request timed out.
Solution: check the connectivity between the request origin and the senhasegura server.