### Example GET Request Source: https://docs.senhasegura.io/docs/api-get-list-a-credential Example of the GET request format using the credential identifier. ```http GET {{url}}api/pam/credential_5@destktop-91.com ``` -------------------------------- ### Request and Response Example Source: https://docs.senhasegura.io/docs/api-get-list-a-remote-session Example of the GET request format and the corresponding JSON response body containing session details. ```http GET {{url}}/api/session/remotesessions/{id} ``` ```json { "code": 200, "response": { "status": 200, "message": "", "error": false, "error_code": 0, "detail": "", "mensagem": "", "erro": false, "cod_erro": 0 }, "tenant": "Segura", "remote_session": [ { "id": "30", "user": "MFASenhaSegura", "origin_ip": "172.16.20.158", "credential": "usrsudonopass", "device": "10.66.33.17:22", "protocol": "ssh", "proxy": "Web Proxy", "session_id": "df06257a1eb71ddf9e584d57a83a7eee9104dc43", "start": "2024-05-15 17:37:53", "end": "2024-05-15 17:38:00", "time": "00:00:07", "prevent_purge": "No", "request": null, "ITSM": null } ] } ``` -------------------------------- ### Private Key Example Source: https://docs.senhasegura.io/docs/api-post-update-ssh-key Example format for the private_key parameter. ```text -----BEGIN OPENSSH PRIVATE KEY----- cTA9Vb5aA0kXaK2HEjGUWgeCBG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW QyNTUxOQAAACCLABE9/nb3BlbnNzaC1rZXktdjEAAAAAxtPOCkR2sGccAAAAKi5DXJnuQ1y ZwAAAAtzc2gtZWQyNTUxOQAAACCLABE9/cTA9VTGVpdGVGZXJyZWlyYUBIUjFTUkb5aA0kXaK2HEjGUWgeCxtPOCkR2sGccA DgaNiGsvbkkkXhepU2NQi3iZ4sAET39xMD1VvloDSRdorYc SMZRaB4LG084KRHawZxwAAAAI0F6dXJlQUQrRGVib3JhAAAECc20zsB7FuSJQAqhLxe gzAQI= -----END OPENSSH PRIVATE KEY----- ``` -------------------------------- ### Request Example Source: https://docs.senhasegura.io/docs/api-get-list-a-password-by-identifier Example of the GET request structure using a specific password identifier. ```http GET {{url}}api/mysafe/password/5 ``` -------------------------------- ### Public Key Example Source: https://docs.senhasegura.io/docs/api-post-update-ssh-key Example format for the public_key parameter. ```text ssh-ed25519 C1lZDI1NTE5AAawZxwAAAAAAC3NzaIIsAET39xdorYcSMZRaB4LG084MD1VvloDSRKRH AzureAD+DeboraLeiteFerreira@HR1SRH3 ``` -------------------------------- ### Request Example Source: https://docs.senhasegura.io/docs/api-del-terminate-remote-session Example of the full request URL format. ```http DELETE {{url}}/api/session/drop/{{session_id}} ``` -------------------------------- ### Field Examples Source: https://docs.senhasegura.io/docs/api-get-list-an-ssh-key Example values for specific fields within the SSH key object. ```text -----BEGIN OPENSSH PRIVATE KEY-----\rcTA9Vb5aA0kXaK2HEjGUWgeCBG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\rQyNTUxOQAAACCLABE9/nb3BlbnNzaC1rZXktdjEAAAAAxtPOCkR2sGccAAAAKi5DXJnuQ1y\r\nZwAAAAtzc2gtZWQyNTUxOQAAACCLABE9/cTA9VTGVpdGVGZXJyZWlyYUBIUjFTUkb5aA0kXaK2HEjGUWgeCxtPOCkR2sGccA\rDgaNiGsvbkkkXhepU2NQi3iZ4sAET39xMD1VvloDSRdorYc\rSMZRaB4LG084KRHawZxwAAAAI0F6dXJlQUQrRGVib3JhAAAECc20zsB7FuSJQAqhLxe\rgzAQI=\r-----END OPENSSH PRIVATE KEY----- ``` ```text ssh-ed25519 C1lZDI1NTE5AAawZxwAAAAAAC3NzaIIsAET39xdorYcSMZRaB4LG084MD1VvloDSRKRH AzureAD+DeboraLeiteFerreira@HR1SRH3 ``` ```text 2024-06-04T12:20:19 ``` -------------------------------- ### API Request Examples Source: https://docs.senhasegura.io/docs/api-get-list-all-api-secrets Examples of GET requests to list API secrets, including optional query parameters for filtering. ```http GET {{url}}api/mysafe/secretapi ``` ```http GET {{url}}api/mysafe/secretapi?tag=cloud ``` ```http GET {{url}}api/mysafe/password?identifier_code=12534 ``` -------------------------------- ### cURL request example Source: https://docs.senhasegura.io/docs/post-criar-agent Example command to create an agent using cURL, requiring an authorization token. ```bash curl -X POST "https://{URL}/api/system/nc/agent" \ -H "Authorization: Bearer {TOKEN}" \ -H "Content-Type: application/json" \ -d '{"name": "agent-example"}' ``` -------------------------------- ### Example request for device retrieval Source: https://docs.senhasegura.io/docs/api-get-list-a-device The request uses the GET method with the device ID appended to the URL path. ```http GET {{url}}/api/pam/device/14 ``` -------------------------------- ### Create Credential API Request Example Source: https://docs.senhasegura.io/docs/api-post-create-credential Example JSON payload for creating a credential with JIT settings enabled. ```json { "username": "API_CREDENTIAL_3", "hostname": "API_DEVICE_1", "ip": "localhost", "jit_settings": { "jit": true, "enable_disable_credential": true, "use_own_credential_to_connect": true, "authentication_credential": "API_CREDENTIAL_1", "authentication_hostname": "API_DEVICE_1", "authentication_ip": "localhost", "credential_enable_plugin": "LDAP", "credential_enable_template": "AD - Activate User", "credential_disable_plugin": "LDAP", "credential_disable_template": "AD - Deactivate User" } } ``` -------------------------------- ### Response Example Source: https://docs.senhasegura.io/docs/api-get-list-a-password-by-identifier Example of the HTTP response status and the JSON body containing password details. ```http HTTP/1.1 200 OK ``` ```json { "code": 200, "response": { "status": 200, "message": "Success", "error": false, "error_code": 0, "detail": "", "Message": "Success", "erro": false, "cod_erro": 0 }, "password_entity": { "identifier": "5", "name": "gmail corporate", "url": "www.gmail.com", "username": "corporateuser@gmail.com", "password": "7yha&thisismycorporatepassword78%h", "secret_key": null, "token": null, "notes": "my gmail password", "tags": "gmail", "users_allowed": [], "groups_allowed": [] } } ``` -------------------------------- ### Retrieve Credential Details Source: https://docs.senhasegura.io/docs/api-v2-get-list-a-credential Examples of GET requests to fetch credential information, demonstrating both full responses and field-specific projections. ```http GET {{url}}/api/v2/pam/credentials/101 ``` ```http GET {{url}}/api/v2/pam/credentials/101?fields=credential.username,device,execution.automatic_change_enabled,jit.credential_enabled ``` -------------------------------- ### Create Credential Request Example Source: https://docs.senhasegura.io/docs/api-post-create-credential Example JSON payload for creating a credential with enabled session protocols and specific authentication settings. ```json { "username": "usernametest", "hostname": "API-Testing", "ip": "128.0.0.1", "session_settings": { "SSH": true, "Telnet": true, "MySQL": true, "SQL Server": true, "HTTP": true, "HTTPS": true, "RDP": true, "X11 Forward": true, "VNC": true, "restrict_access_to_remote_application": true, "macros": [ { "remote_app": "MySQL", "connectivity": "SSH" }, { "remote_app": "Kaspersky", "connectivity": "RDP" } ], "use_own_credential_to_connect": false, "authentication_credential": "cred2", "authentication_hostname": "gmail", "authentication_ip": "https://www.gmail.com" } } ``` -------------------------------- ### Create note request example Source: https://docs.senhasegura.io/docs/api-post-create-note A JSON payload example for creating a note with a name, content, tags, and group access permissions. ```json { "name": "Staff meeting", "note": "Staff meetings are essential for maintaining clear communication and ensuring everyone is on the same page. These gatherings provide a platform to discuss ongoing projects, address any issues, and brainstorm new ideas. By fostering a collaborative environment, staff meetings encourage team members to share their insights and contribute to the organization's overall goals. Regularly scheduled meetings also help in building team morale and strengthening workplace relationships.", "tags": "meeting", "groups_allowed": [ { "name": "TC team" } ] } ``` -------------------------------- ### Example Request for Related User Source: https://docs.senhasegura.io/docs/api-get-list-a-related-user Perform a GET request to retrieve details for a related user with ID 2. ```http GET {{url}}/api/user/related/2 ``` -------------------------------- ### Example Response Body Source: https://docs.senhasegura.io/docs/api-v2-get-list-all-credentials A JSON object containing the list of credentials and pagination metadata. ```json { "data": [ { "id": "101", "credential": { "username": "svc-payments", "active": true, "tags": ["prod"], "criticality": "high", "user_credential_owner": { "name": "John Doe" } }, "device": { "id": 123, "name": "db-prod-01", "domain_name": "CORP" }, "secret": { "has_secret": true, "type": "password" }, "execution": { "automatic_change_enabled": true }, "reconciliation": { "credential_enabled": true }, "jit": { "credential_enabled": false } }, { "id": "102", "credential": { "username": "db-monitor", "active": false, "tags": [], "criticality": null, "user_credential_owner": null }, "device": { "id": 124, "name": "db-dev-01", "domain_name": null }, "secret": { "has_secret": false, "type": "password" }, "execution": { "automatic_change_enabled": false }, "reconciliation": { "credential_enabled": false }, "jit": { "credential_enabled": false } } ], "meta": { "pagination": { "page": 1, "limit": 50, "total_items": 1320, "total_pages": 27, "count": 50 }, "links": { "self": "/api/v2/pam/credentials?page=1&limit=50", "first": "/api/v2/pam/credentials?page=1&limit=50", "prev": null, "next": "/api/v2/pam/credentials?page=2&limit=50", "last": "/api/v2/pam/credentials?page=27&limit=50" } } } ``` -------------------------------- ### Response example Source: https://docs.senhasegura.io/docs/post-criar-agent The JSON response object containing the created agent's details. ```json { "response": { "status": 200, "error": false, "error_code": 0, "message": "Agents fetched" }, "agent": { "id": "1", "name": "Default", "port": "30000", "fingerprint": "Zk9YalVUVDRaeWh2b0FKb29uWmhESk44VVdqcEZkSE1qSUZKMkREUjlOdz06Um1kSlUyWlRSbkYwVEZCb2ExUjNRenAzUkhkellXMVJhMWQyWldad1NXSnI=" } } ``` -------------------------------- ### 404 error response example Source: https://docs.senhasegura.io/docs/get-consultar-agents Response returned when the requested agent is not found. ```json { "code": 404, "message": "Agent not found", "error": true, "error_code": 1001 } ``` -------------------------------- ### Update note request example Source: https://docs.senhasegura.io/docs/api-put-update-note Example of a PUT request to update a note's user access permissions. ```json { "users_allowed": [ { "username" : "pduarte", "can_edit" : false } ] } ``` -------------------------------- ### Enable device request Source: https://docs.senhasegura.io/docs/api-put-enable-device Example of the PUT request to enable a device with ID 5. ```http PUT {{url}}/api/pam/device/5 ``` -------------------------------- ### Example Request Source: https://docs.senhasegura.io/docs/api-get-list-a-note The request requires the note's unique identifier as a path parameter. ```http GET {{url}}api/mysafe/note/2 ``` -------------------------------- ### GET | List all devices request Source: https://docs.senhasegura.io/docs/api-get-list-all-devices The request endpoint for retrieving all devices. ```http GET {{url}}/api/pam/device ``` -------------------------------- ### Successful response example Source: https://docs.senhasegura.io/docs/get-consultar-agents A successful response containing the list of registered agents. ```json { "code": 200, "response": { "status": 200, "message": "1 agent found", "error": false, "error_code": 0, "detail": "", "mensagem": "1 agent found", "erro": false, "cod_erro": 0 }, "agent": [ { "id": "1", "name": "Default", "port": "30000", "fingerprint": "Zk9YalVUVDRaeWh2b0FKb29uWmhESk44VVdqcEZkSE1qSUZKMkREUjlOdz06Um1kSlUyWlRSbkYwVEZCb2ExUjNRenAzUkhkellXMVJhMWQyWldad1NXSnI=" } ] } ``` -------------------------------- ### PFX Format Response Source: https://docs.senhasegura.io/docs/api-clm-download-certificates Example JSON response for a certificate download in PFX format. ```json { "certificate": "MIID6TCCAtGgAwIBAgIBADA...", "format": "pfx" } ``` -------------------------------- ### PEM Format Response Source: https://docs.senhasegura.io/docs/api-clm-download-certificates Example JSON response for a certificate download in PEM format. ```json { "certificate": "MIID6TCCAtGgAwIBAgIBADA...", "format": "pem" } ``` -------------------------------- ### API Secret Request Example Source: https://docs.senhasegura.io/docs/api-get-list-an-api-secret Example of the GET request structure using a specific identifier. ```http GET {{url}}api/mysafe/secretapi/3 ``` -------------------------------- ### SFTP connection formats Source: https://docs.senhasegura.io/docs/segura-saas-transfer-files-terminal-proxy Use these commands to establish an SFTP connection to the target device via the SaaS environment. ```bash sftp -P 4022 segura_user%tenant_saas[credential@target_device{ssh.22}]@segura_instance ``` ```bash sftp -P 4022 segura_user%tenant_saas[credential@target_device{ssh.22}]mfa_token@segura_instance ``` -------------------------------- ### Retrieve Users SCIM Response Source: https://docs.senhasegura.io/docs/get-users Example JSON response returned when querying the GET /iso/scim/v2/Users endpoint. ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 2, "itemsPerPage": 25, "startIndex": 1, "Resources": [ { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" ], "id": "2", "externalId": "SCIM1", "userName": "Jane Doe", "meta": { "resourceType": "User", "created": "2018-04-17T09:03:39-05:00", "lastModified": "2018-04-17T09:03:39-05:00", "location": "https://vault.Segura.com/iso/scim/v2/Users/2" }, "name": { "familyName": "Doe", "givenName": "Jane", "honorificPrefix": "Mrs", "honorificSuffix": "MD", "formatted": "Mrs Jane Doe MD" }, "displayName": "Jane Doe", "nickName": "Nick Jane", "profileUrl": "http://skimmer.com/jane", "title": "First Class Skimmer", "...": "..." }, { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" ], "id": "1", "externalId": "SCIM2", "userName": "Card Skimmer", "meta": { "resourceType": "User", "created": "2018-04-17T09:03:12-05:00", "lastModified": "2018-04-17T09:03:12-05:00", "location": "https://.4me.com/scim/v2/Users/1" }, "name": { "familyName": "Skimmer", "givenName": "Card", "honorificPrefix": "Sir", "honorificSuffix": "MD", "formatted": "Sir Card Skimmer MD" }, "displayName": "Card Skimmer", "nickName": "Nicked Name", "...": "..." } ] } ``` -------------------------------- ### Retrieve SCIM Schemas Response Source: https://docs.senhasegura.io/docs/get-schemas Example JSON response structure returned by the GET /iso/scim/v2/Schemas endpoint. ```json { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 3, "itemsPerPage": 3, "startIndex": 1, "Resources": [ { "id": "urn:ietf:params:scim:schemas:core:2.0:User", "name": "User", "description": "User Schema", "attributes": [ "..." ], "meta": { "resourceType": "Schema", "location": "https://vault.Segura.com/iso/scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User" } } ] } ``` -------------------------------- ### POST /device Source: https://docs.senhasegura.io/docs/api-post-create-device Creates a new device in the system. Requires parameters such as hostname, ip, site, model, vendor, and type. ```APIDOC ## POST /device ### Description Creates a new device in the system. ### Request Body - **hostname** (string) - Required - The hostname of the device. - **ip** (string) - Required - The IP address of the device. - **site** (string) - Required - The site location of the device. - **model** (string) - Required - The model of the device. - **vendor** (string) - Required - The vendor of the device. - **type** (string) - Required - The type of the device. - **device_domain** (string) - Optional - The domain of the device. ### Response #### Success Response (200) - **id** (string) - The ID of the created device. - **hostname** (string) - The hostname of the device. - **ip** (string) - The IP address of the device. #### Response Example { "code": 200, "response": { "status": 200, "message": "Device [device_id]", "error": false }, "device": { "id": "17", "hostname": "API device test", "ip": "10.66.33.120", "model": "Gmail", "type": "Desktop", "vendor": "Linux", "site": "AWS" } } ``` -------------------------------- ### Retrieve User Schema Response Source: https://docs.senhasegura.io/docs/get-user-schema Example JSON response body returned by the GET /iso/scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User endpoint. ```json { "id": "urn:ietf:params:scim:schemas:core:2.0:User", "name": "User", "description": "User Schema", "attributes": [ { "name": "userName", "type": "string", "multiValued": false, "required": true, "caseExact": false, "mutability": "readWrite", "returned": "default", "uniqueness": "server", "description": "Unique identifier for the User, typically used by the user to directly authenticate to the service provider. Each User MUST include a non-empty userName value. This identifier MUST be unique across the service provider's entire set of Users." }, { "name": "name", "type": "complex", "multiValued": false, "required": false, "mutability": "readWrite", "returned": "default", "uniqueness": "none", "description": "The components of the user's real name. Providers MAY return just the full name as a single string in the formatted sub-attribute, or they MAY return just the individual component attributes using the other sub-attributes, or they MAY return both. If both variants are returned, they SHOULD be describing the same name, with the formatted name indicating how the component attributes should be combined.", "subAttributes": [ { "name": "formatted", "type": "string", "multiValued": false, "required": false, "caseExact": false, "mutability": "readWrite", "returned": "default", "uniqueness": "none", "description": "The full name, including all middle names, titles, and suffixes as appropriate, formatted for display (e.g., 'Ms. Barbara J Jensen, III')." }, { "name": "familyName", "type": "string", "multiValued": false, "required": false, "caseExact": false, "mutability": "readWrite", "returned": "default", "uniqueness": "none", "description": "The family name of the User, or last name in most Western languages (e.g., 'Jensen' given the full name 'Ms. Barbara J Jensen, III')." } . . . } ], "meta": { "resourceType": "Schema", "location": "https://wdc.test.host/scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User" } } ``` -------------------------------- ### GET | List all devices response Source: https://docs.senhasegura.io/docs/api-get-list-all-devices The successful response returns a 200 OK status and an array of device objects. ```http HTTP/1.1 200 OK ``` ```json { "code": 200, "response": { "status": 200, "message": "2 devices found", "error": false, "error_code": 0, "detail": "", "mensagem": "2 devices found", "erro": false, "cod_erro": 0 }, "devices": [ { "id": "1", "hostname": "mydevicehostname", "ip": "172.10.20.30", "model": "Windows Server 2012", "type": "Server", "vendor": "Microsoft", "site": "LAX" "tags": "tag001" }, { "id": "6", "hostname": "myseconddevice", "ip": "41.41.208.182", "model": "CentOS 7", "type": "Server", "vendor": "CentOS", "site": "AWS" "tags": "" } ] } ``` -------------------------------- ### Sample User Resource Type Response Source: https://docs.senhasegura.io/docs/get-user-resource-type Example JSON response containing the schema and metadata for the User resource type. ```json { "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:ResourceType" ], "id": "User", "name": "User", "endpoint": "/Users", "description": "https://tools.ietf.org/html/rfc7643#section-8.7.1", "schema": "urn:ietf:params:scim:schemas:core:2.0:User", "schemaExtensions": [ { "schema": "urn:ietf:params:scim:schemas:core:2.0:User", "required": false } ], "meta": { "location": "https://vault.Segura.com/iso/scim/v2/ResourceTypes/User", "resourceType": "ResourceType" } } ``` -------------------------------- ### Provision Response Example Source: https://docs.senhasegura.io/docs/post-provision A successful response containing the secret details, including ID, version, and data fields. ```json { "code": 200, "response": { "status": 200, "message": "Secret provisions done.", "error": false, "error_code": 0, "detail": "", "mensagem": "Secret provisions done.", "erro": false, "cod_erro": 0 }, "tenant": "Segura", "secret": { "secret_id": "213", "secret_name": "secret-postman", "identity": "secret-postman", "version": "7", "description": "secret created by postman", "expiration_date": "", "engine": "Generic", "renew_cloud_time": false, "renew_credential_time": false, "renew_ephemeral_credential_time": false, "data": [ { "hostname": "masked_hostname_1", "username": "masked_username_1" }, { "hostname": "masked_hostname_2", "username": "masked_username_2", "password": "masked_password", "additional_information": null, "ip": "masked_ip" } ] } } ``` -------------------------------- ### API Secret Response Example Source: https://docs.senhasegura.io/docs/api-get-list-an-api-secret Example of the HTTP response status and the JSON body containing the API secret entity details. ```http HTTP/1.1 200 OK ``` ```json { "code": 200, "response": { "status": 200, "message": "Success", "error": false, "error_code": 0, "detail": "", "Message": "Success", "erro": false, "cod_erro": 0 }, "api_secret_entity": { "identifier": "3", "name": "GCP1", "url": "https://gcp1.com", "client_secret": "hy7464g5v8ghy4d858jk7fds57t4tr", "client_id": "hb455f7g8fg9dfg8yt845bxxku", "identifier_code": "12534", "method": "get", "tags": "Cloud1", "notes": "Access details for this API secret", "users_allowed": [ { "name": "alices", "can_edit": true } ], "groups_allowed": [] } } ``` -------------------------------- ### API Error Response Example Source: https://docs.senhasegura.io/docs/how-to-authenticate-an-application-in-a2a Example of a JSON error response returned when a device is not found, including status codes and exception details. ```json { "code": 400, "response": { "status": 400, "message": "1011: Device not found", "error": true, "error_code": 1, "detail": "", "mensagem": "1011: Device not found", "erro": true, "cod_erro": 1 }, "exception": { "code": 1011, "message": "1011: Device not found", "detail": null } } ``` -------------------------------- ### Update API secret request example Source: https://docs.senhasegura.io/docs/api-post-update-api-secret Example of a PUT request body used to update an API secret's details, including associated users and groups. ```json { "name": "GCP1", "url": "https://gcp1.com", "client_id": "hb455f7g8fg9dfg8yt845bxxku", "client_secret": "hy746**********t4tr", "identifier_code": "gcp7852", "tags": "Cloud1", "notes": "Access details for this API secret", "users_allowed": [ { "username" : "alices", "can_edit" : true } ], "groups_allowed": [] } ``` -------------------------------- ### GET /iso/scim/v2/Users Source: https://docs.senhasegura.io/docs/get-users Retrieves a list of users from the system. ```APIDOC ## GET /iso/scim/v2/Users ### Description Retrieves the list of users. ### Method GET ### Endpoint /iso/scim/v2/Users ### Response #### Success Response (200) - **schemas** (array) - List of schema URNs - **totalResults** (integer) - Total number of users - **itemsPerPage** (integer) - Number of items per page - **startIndex** (integer) - Starting index of the results - **Resources** (array) - List of user objects #### Response Example { "schemas": [ "urn:ietf:params:scim:api:messages:2.0:ListResponse" ], "totalResults": 2, "itemsPerPage": 25, "startIndex": 1, "Resources": [ { "id": "2", "userName": "Jane Doe", "displayName": "Jane Doe" }, { "id": "1", "userName": "Card Skimmer", "displayName": "Card Skimmer" } ] } ``` -------------------------------- ### Create Credential with Execution Settings Source: https://docs.senhasegura.io/docs/api-post-create-credential Example JSON payload for the POST /api/pam/credential endpoint, demonstrating the structure of the execution_settings object. ```json { "username": "usernametest", "hostname": "API-Testing", "ip": "128.0.0.1", "execution_settings": { "parent_credential": "cred2", "parent_hostname": "gmail", "parent_ip": "https://www.gmail.com", "automatic_change": true, "change_plugin": "SSH", "change_template": "3COM", "use_own_credential_to_connect": false, "authentication_credential": "cred2", "authentication_hostname": "gmail", "authentication_ip": "https://www.gmail.com", "status": true, "reconciliation_credential": "cred2", "reconciliation_hostname": "gmail", "reconciliation_ip": "https://www.gmail.com", "reconciliation_plugin": "SSH", "reconciliation_template": "3COM" } } ``` -------------------------------- ### GET /iso/dash/credentials/expired Source: https://docs.senhasegura.io/docs/api-dashboards Retrieves the count of expired credentials. ```APIDOC ## GET /iso/dash/credentials/expired ### Description Returns the count of credentials that have expired. ### Method GET ### Endpoint /iso/dash/credentials/expired ### Response #### Success Response (200) - **credenciais** (object) - Contains the count of expired credentials. #### Response Example { "response": { "status": 200, "mensagem": "Credenciais", "erro": false, "message": "Credenciais", "error": false }, "credenciais": { "expiradas": "1" } } ``` -------------------------------- ### Update device request example Source: https://docs.senhasegura.io/docs/api-post-update-device JSON body structure for the POST request to update or create a device. ```json { "ip": "10.66.33.20", "hostname": "API device test1", "model": "Gmail", "type": "Desktop", "vendor": "Linux", "site": "AWS", "device_domain": "" } ``` -------------------------------- ### GET /iso/coe/dapp/provision Source: https://docs.senhasegura.io/docs/post-provision Allows you to create a new secret for a credential. ```APIDOC ## GET /iso/coe/dapp/provision ### Description Allows you to create a new secret for a credential. ### Method GET ### Endpoint https://vault_url/iso/coe/dapp/provision ### Parameters #### Request Body - **identity** (String) - Required - The identity name for the secret. - **pod_name** (String) - Optional - Capsule’s name that will use the credential. - **deploy** (String) - Optional - Deploy name that will use the credential. - **namespace** (String) - Optional - Container's namespace that will use the credential. ### Request Example { "identity": "secret-postman" } ### Response #### Success Response (200) - **code** (Integer) - HTTP status code. - **response** (Object) - Contains status, message, and error details. - **tenant** (String) - Tenant name. - **secret** (Object) - Details of the created secret including secret_id, secret_name, version, and data. #### Response Example { "code": 200, "response": { "status": 200, "message": "Secret provisions done.", "error": false, "error_code": 0, "detail": "", "mensagem": "Secret provisions done.", "erro": false, "cod_erro": 0 }, "tenant": "Segura", "secret": { "secret_id": "213", "secret_name": "secret-postman", "identity": "secret-postman", "version": "7", "description": "secret created by postman", "expiration_date": "", "engine": "Generic", "renew_cloud_time": false, "renew_credential_time": false, "renew_ephemeral_credential_time": false, "data": [ { "hostname": "masked_hostname_1", "username": "masked_username_1" }, { "hostname": "masked_hostname_2", "username": "masked_username_2", "password": "masked_password", "additional_information": null, "ip": "masked_ip" } ] } } ``` -------------------------------- ### POST /api/pam/device Source: https://docs.senhasegura.io/docs/api-post-create-device Creates a new device in PAM Core or updates an existing one if the provided hostname already exists. ```APIDOC ## POST /api/pam/device ### Description Create a device in PAM Core. If the hostname provided is associated with a previously created device, this request will update the existing device; otherwise, a new device will be created. ### Method POST ### Endpoint /api/pam/device ### Parameters #### Request Body - **ip** (string) - Required - IP address of the device. - **hostname** (string) - Required - Hostname of the device. - **model** (string) - Required - Device model. - **type** (string) - Required - Device type. - **vendor** (string) - Required - Device vendor. - **site** (string) - Required - Device location. - **device_domain** (string) - Optional - Name or short name of the domain. - **device_tags** (string) - Optional - Keywords associated with the device. - **connectivities** (string) - Optional - Device connectivity. - **session_remote_config** (string) - Optional - Login expression. ### Request Example { "ip": "10.66.33.20", "hostname": "API device test", "model": "Gmail", "type": "Desktop", "vendor": "Linux", "site": "AWS", "device_domain": "" } ``` -------------------------------- ### POST /iso/scim/v2/Users Source: https://docs.senhasegura.io/docs/post-users Creates a new user in the system by providing the required user details. ```APIDOC ## POST /iso/scim/v2/Users ### Description Creates a new user record in the system. ### Method POST ### Endpoint /iso/scim/v2/Users ### Parameters #### Request Body - **userName** (String) - Required - The unique login identifier for the user. - **externalId** (String) - Required - An external identifier for the user. - **name.formatted** (String) - Required - The full name of the user. - **name.familyName** (String) - Optional - The family name or last name of the user. - **name.givenName** (String) - Optional - The given name or first name of the user. - **phoneNumbers.value** (String) - Optional - The user's phone number. - **emails.value** (String) - Required - The user's email address. - **emails.type** (String) - Optional - The category of the email address. - **emails.primary** (Boolean) - Optional - Indicates whether the email address is the user's primary email. - **entitlements.value** (String) - Optional - The user's role in the system. ### Response #### Success Response (201) - **schemas** (Array) - The SCIM schema URI. - **id** (String) - The unique identifier of the created user. - **externalId** (String) - The external identifier provided. - **meta** (Object) - Metadata about the resource creation. - **name** (Object) - The user's name details. - **userName** (String) - The user's login identifier. #### Response Example { "schemas":["urn:ietf:params:scim:schemas:core:2.0:User"], "id":"2819c223-7f76-453a-919d-413861904646", "externalId":"dschrute", "meta":{ "resourceType":"User", "created":"2011-08-01T21:32:44.882Z", "lastModified":"2011-08-01T21:32:44.882Z", "location": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646", "version":"W/\"e180ee84f0671b1\"" }, "name":{ "familyName":"Schrute", "givenName":"Dwight" }, "userName":"dschrute" } ``` -------------------------------- ### GET /iso/dash/credentials/using Source: https://docs.senhasegura.io/docs/api-dashboards Retrieves the count of credentials currently in use. ```APIDOC ## GET /iso/dash/credentials/using ### Description Returns the count of credentials currently in use. ### Method GET ### Endpoint /iso/dash/credentials/using ``` -------------------------------- ### GET /iso/coge/risco/access Source: https://docs.senhasegura.io/docs/api-dashboards Retrieves a list of all suspicious access sessions. ```APIDOC ## GET /iso/coge/risco/access ### Description Retrieves a list of all suspicious access sessions recorded in the system. ### Method GET ### Endpoint /iso/coge/risco/access ### Response #### Success Response (200) - **response** (object) - Status information - **maior_risco** (object) - Contains the list of 'acessos' (accesses) #### Response Example { "response": { "status": 200, "mensagem": "MaiorRisco", "erro": false, "message": "MaiorRisco", "error": false }, "maior_risco": { "acessos": [ { "Cod_Sessao": "1", "Host": "10.20.10.18", "Porta": "3389", "Protocolo": "rdp", "Credencial": "usrdomlmtd", "Risco": "0", "Data_Inicio": "2020-11-20 16:07:30", "Data_Fim": "2020-11-20 16:08:09", "Duracao": "00:00:39", "Cod_Usuario": "102", "Nome_Usuario": "Peter Robinson Greenr" } ] } } ``` -------------------------------- ### Create protected information success response Source: https://docs.senhasegura.io/docs/a2a-pam-core-create-protected-information Example of a successful 200 OK response containing the created information details. ```json { "response": { "status": 201, "mensagem": "Information successfully registered!", "erro": false, "message": "Information successfully registered!", "error": false }, "info": { "name": "saas_vault1", "type": "access credential", "service": "saas_client", "url": "10.10.10.2", "content": "login: mt4adm, password: mt4admp4ss", "users_allowed": "admin, account_manager, mscharra", "identifier": "INFOSAASVAULT1" } } ``` -------------------------------- ### GET /iso/coge/risco/queries Source: https://docs.senhasegura.io/docs/api-dashboards Retrieves a list of all suspicious credential queries. ```APIDOC ## GET /iso/coge/risco/queries ### Description Retrieves a list of all suspicious credential queries performed in the system. ### Method GET ### Endpoint /iso/coge/risco/queries ### Response #### Success Response (200) - **response** (object) - Status information - **maior_risco** (object) - Contains the list of 'consultas' (queries) #### Response Example { "response": { "status": 200, "mensagem": "MaiorRisco", "erro": false, "message": "MaiorRisco", "error": false }, "maior_risco": { "consultas": [ { "Cod_Consulta": "1", "Risco": "0", "Data_Consulta": "2021-01-11 10:18:32", "Cod_Usuario": "102", "Nome_Usuario": "Peter Robinson Green", "Cod_Credencial": "5", "Credencial": "fakermainframeuser", "Info_Adicional": null, "Dispositivo": "fakeserver (10.20.10.15)" } ] } } ``` -------------------------------- ### Create Credential JSON Request Source: https://docs.senhasegura.io/docs/api-post-create-credential Example payload for the POST /api/pam/credential endpoint, demonstrating the structure of the jit_settings object. ```json { "username": "API_CREDENTIAL_3", "hostname": "API_DEVICE_1", "ip": "localhost", "jit_settings": { "jit": true, "credential_creation_and_deletion": true, "enable_disable_credential": false, "use_own_credential_to_connect": false, "authentication_credential": "API_CREDENTIAL_1", "authentication_hostname": "API_DEVICE_1", "authentication_ip": "localhost", "credential_creation_plugin": "SSH", "credential_creation_template": "Linux - Create User", "credential_deletion_plugin": "SSH", "credential_deletion_template": "Linux - Remove User" } } ``` -------------------------------- ### Create password request example Source: https://docs.senhasegura.io/docs/api-post-create-password A JSON payload demonstrating the structure for creating a new password entry, including optional URL, secret key, and access permissions. ```json { "name": "senseg account", "username": "npass", "password": "8jhfy@3789", "url": "www.segura.com", "secret_key": "JBSWY3DPEHPK3PXP", "notes": "Access details", "tags": "tag1, tag2", "users_allowed": [ { "username" : "pduarte" } ], "groups_allowed": [ { "name" : "Test group", "can_edit" : false } ] } ``` -------------------------------- ### Retrieve all automations Source: https://docs.senhasegura.io/docs/get-automation Use this GET request to fetch the complete list of automations configured in the system. ```http GET /iso/sctm/automations ```