- 9 minutes to read
- Print
- DarkLight
- PDF
My Safe API
- 9 minutes to read
- Print
- DarkLight
- PDF
Authorization of MySafe APIs is performed directly in the module. To learn more, see the MySafe Integrations article.
Get a password
Method: Get
GET /iso/mysafe/password/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Success",
"erro": false,
"cod_erro": 0,
"message": "Success",
"error": false,
"error_code": 0
},
"password_entity": {
"identifier": "1",
"name_or_url": "instagram.com\/matheus",
"username": "matheus",
"password": "%#BRasil123",
"notes": "",
"tags": ""
}
}
Expected response in case of error - user has no access, or the secret doesn't exist
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Password not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Password not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Password not found",
"detail": ""
}
}
Expected response in case of error - inactive information
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Password not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Password not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Password not found",
"detail": ""
}
}
Get a note
Method: Get
GET /iso/mysafe/note/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Success",
"erro": false,
"cod_erro": 0,
"message": "Success",
"error": false,
"error_code": 0
},
"note_entity": {
"identifier": "1",
"name": "instagram.com\/matheus",
"note": "matheus",
"tags": ""
}
}
Expected response in case of error - user has no access, or the secret doesn't exist
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Note not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Note not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Note not found",
"detail": ""
}
}
Expected response in case of error - inactive information
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1009: Inactive note",
"erro": true,
"cod_erro": 0,
"message": "1009: Inactive note",
"error": true,
"error_code": 0
},
"exception": {
"code": 1009,
"message": "1009: Inactive note",
"detail": ""
}
}
Get all the passwords
Method: Get
GET /iso/mysafe/password?tag={tag}
Parameters
Field | Description | Required? |
---|---|---|
tag | Search for a specific tag | No |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "",
"erro": false,
"cod_erro": 0,
"message": "",
"error": false,
"error_code": 0
},
"password_on_list": [
{
"identifier": "1",
"name": "instagram.com\/matheus",
"username": "matheus",
"tags": "",
"need_justify": "0",
"need_approval": "0"
},
{
"identifier": "12",
"name": "https:\/\/instagram.com",
"username": "shinobu",
"tags": "",
"need_justify": "0",
"need_approval": "0"
}
],
"notes_on_list": [
{
"identifier": "1",
"name": "marketing plan",
"note": "update it before Jan/2023",
"tags": "",
"need_justify": "0",
"need_approval": "0"
}
]
}
Get all the notes
Method: Get
GET /iso/mysafe/note?tag={tag}
Parameters
Field | Description | Required? |
---|---|---|
tag | Search for a particular tag | No |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "",
"erro": false,
"cod_erro": 0,
"message": "",
"error": false,
"error_code": 0
},
"notes_on_list": [
{
"identifier": "1",
"name": "marketing plan",
"tags": "",
"need_justify": "0",
"need_approval": "0"
}
]
}
Create a password
At the time of creation, the information is automatically associated with the creator of the authorization as its owner.
Method: Post
POST /iso/mysafe/password
Parameters
Field | Description | Required? |
---|---|---|
name | Yes | |
username | Yes | |
password | Yes | |
tags | No | |
users_allowed | Username of the users who will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
groups_allowed | Name of the groups that will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
Example request
{
"name": "novainfo",
"username": "teste",
"password": "123456",
"tags": "tag1, tag2",
"users_allowed": [
{
"username" : "Admin"
"can_edit" : true
},
{
"username" : "malu",
"can_edit" : true
}
],
"groups_allowed": [
{
"name" : "grupo1",
"can_edit" : true
},
{
"name" : "grupo2",
"can_edit" : true
},
{
"name" : "grupo3",
"can_edit" : true
}
]
}
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 201,
"mensagem": "Password successfully registered!",
"erro": false,
"cod_erro": 0,
"message": "Password successfully registered!",
"error": false,
"error_code": 0
},
"password_entity": {
"identifier": "176",
"name_or_url": "novainfo",
"username": "teste",
"note": "",
"tags": "tag1, tag2"
}
}
Expected response in case of error - to inform which fields were filled in incorrectly
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1001: Parameter 'username' was not informed!",
"erro": true,
"cod_erro": 0,
"message": "1001: Parameter 'username' was not informed!",
"error": true,
"error_code": 0
},
"exception": {
"code": 1001,
"message": "1001: Parameter 'username' was not informed!",
"detail": ""
}
}
Create a note
At the time of creation, the information is automatically associated with the creator of the authorization as its owner.
Method: Post
POST /iso/mysafe/note
Parameters
Field | Description | Required? |
---|---|---|
name | Yes | |
note | Yes | |
tags | No | |
users_allowed | Username of the users who will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
groups_allowed | Name of the groups that will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
Example request
{
"name": "nota",
"note": "umanota",
"users_allowed": [
{
"username" : "Admin",
"can_edit" : true
},
{
"username" : "malu",
"can_edit" : true
}
],
"groups_allowed": [
{
"name" : "grupo1",
"can_edit" : true
},
{
"name" : "grupo2",
"can_edit" : true
}
]
}
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 201,
"mensagem": "Note successfully registered!",
"erro": false,
"cod_erro": 0,
"message": "Note successfully registered!",
"error": false,
"error_code": 0
},
"note_entity": {
"identifier": "32",
"name": "nota",
"tags": ""
}
}
Expected response in case of error - to inform which fields were filled in incorrectly
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1001: Parameter 'note' was not informed!",
"erro": true,
"cod_erro": 0,
"message": "1001: Parameter 'note' was not informed!",
"error": true,
"error_code": 0
},
"exception": {
"code": 1001,
"message": "1001: Parameter 'note' was not informed!",
"detail": ""
}
}
Deactivate a password
Method: Post
POST /iso/mysafe/password/inactive/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Password successfully deactivated",
"erro": false,
"cod_erro": 0,
"message": "Password successfully deactivated",
"error": false,
"error_code": 0
}
}
Expected response in case of error - permission denied
HTTP/1.1 403 Forbidden
{
"response": {
"status": 400,
"mensagem": "1006: User does not have access",
"erro": true,
"cod_erro": 0,
"message": "1006: User does not have access",
"error": true,
"error_code": 0
},
"exception": {
"code": 1006,
"message": "1006: User does not have access",
"detail": ""
}
}
Expected response in case of error - information not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Password not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Password not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Password not found",
"detail": ""
}
}
Deactivate a note
Method: Post
POST /iso/mysafe/note/inactive/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Note successfully deactivated",
"erro": false,
"cod_erro": 0,
"message": "Note successfully deactivated",
"error": false,
"error_code": 0
}
}
Expected response in case of error - permission denied
HTTP/1.1 403 Forbidden
{
"response": {
"status": 400,
"mensagem": "1006: User does not have access",
"erro": true,
"cod_erro": 0,
"message": "1006: User does not have access",
"error": true,
"error_code": 0
},
"exception": {
"code": 1006,
"message": "1006: User does not have access",
"detail": ""
}
}
Expected response in case of error - information not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Note not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Note not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Note not found",
"detail": ""
}
}
Reactivate a password
Method: Post
POST /iso/mysafe/password/active/{id}
Parameters
Field | Description | Required? |
---|---|---|
Id | Secret identification code | Yes |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Password successfully activated",
"erro": false,
"cod_erro": 0,
"message": "Password successfully activated",
"error": false,
"error_code": 0
}
}
Expected response in case of error - permission denied
HTTP/1.1 403 Forbidden
{
"response": {
"status": 400,
"mensagem": "1006: User does not have access",
"erro": true,
"cod_erro": 0,
"message": "1006: User does not have access",
"error": true,
"error_code": 0
},
"exception": {
"code": 1006,
"message": "1006: User does not have access",
"detail": ""
}
}
Expected response in case of error - secret not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Password not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Password not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Password not found",
"detail": ""
}
}
Reactivate a note
Method: Post
POST /iso/mysafe/password/active/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Note successfully activated",
"erro": false,
"cod_erro": 0,
"message": "Note successfully activated",
"error": false,
"error_code": 0
}
}
Expected response in case of error - permission denied
HTTP/1.1 403 Forbidden
{
"response": {
"status": 400,
"mensagem": "1006: User does not have access",
"erro": true,
"cod_erro": 0,
"message": "1006: User does not have access",
"error": true,
"error_code": 0
},
"exception": {
"code": 1006,
"message": "1006: User does not have access",
"detail": ""
}
}
Expected response in case of error - secret not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Note not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Note not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Note not found",
"detail": ""
}
}
Update a password
Method: Put
PUT /iso/mysafe/password/update/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
name | No | |
username | No | |
password | No | |
tags | No | |
users_allowed | Username of the users who will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
groups_allowed | Name of the groups that will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Password successfully updated",
"erro": false,
"cod_erro": 0,
"message": "Password successfully updated",
"error": false,
"error_code": 0
}
}
Expected response in case of error - permission denied
HTTP/1.1 403 Forbidden
{
"response": {
"status": 400,
"mensagem": "1006: User does not have access",
"erro": true,
"cod_erro": 0,
"message": "1006: User does not have access",
"error": true,
"error_code": 0
},
"exception": {
"code": 1006,
"message": "1006: User does not have access",
"detail": ""
}
}
Expected response in case of error - secret not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Password not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Password not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Password not found",
"detail": ""
}
}
Update a note
Method: Put
PUT /iso/mysafe/note/update/{id}
Parameters
Field | Description | Required? |
---|---|---|
id | Secret identification code | Yes |
name | No | |
note | No | |
password | No | |
tags | No | |
users_allowed | Username of the users who will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
groups_allowed | Name of the groups that will access the information and their permissions. The permission field will not be mandatory. If it is blank, the permission will only be "view." | No |
Expected response on success
HTTP/1.1 200 OK
{
"response": {
"status": 200,
"mensagem": "Note successfully updated",
"erro": false,
"cod_erro": 0,
"message": "Note successfully updated",
"error": false,
"error_code": 0
}
}
Expected response in case of error - permission denied
HTTP/1.1 403 Forbidden
{
"response": {
"status": 400,
"mensagem": "1006: User does not have access",
"erro": true,
"cod_erro": 0,
"message": "1006: User does not have access",
"error": true,
"error_code": 0
},
"exception": {
"code": 1006,
"message": "1006: User does not have access",
"detail": ""
Expected response in case of error - secret not found
HTTP/1.1 400 Bad Request
{
"response": {
"status": 400,
"mensagem": "1005: Note not found",
"erro": true,
"cod_erro": 0,
"message": "1005: Note not found",
"error": true,
"error_code": 0
},
"exception": {
"code": 1005,
"message": "1005: Note not found",
"detail": ""
}
}