Skip to content

API session trace with explanations

Chris LP Jones edited this page Oct 7, 2024 · 20 revisions

TL;DR

This trace is taken from an actual session of logging into SureDrop, creating a group, creating a folder, then uploading a file.

Some duplicate API calls have been removed for clarity.

The order of these calls is as the original session that was recorded.

Common params

prefix = Company name and is generally mandatory
username = username of the account
token = Session token Can also be passed in as an Authorization header

Authorization token

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

This is standard basic auth using the token returned from the /session call in the password field and leaving the username field blank.

API Calls

GET /company

Case 1

Used to configure the UX expectations before logging in. Things such as the logo, the company name, whether 2FA is mandatory etc.

:method: GET
:path: /rest/company?prefix=Winter+Is+Coming


:status: 200
Response-Body:
{
  "init": "true",
  "company_name": "Winter Is Coming",
  "storage_tokan": "SureDrop",
  "brandedcompany": "Winter Is Coming",
  "version": "2.11.0",
  "app_version": "2.11.0",
  "www_portal": "https://portal.suredrop.dev",
  "brandedlogo": "https://suredrop-downloads.s3-ap-southeast-2.amazonaws.com/winter-is-coming.png",
  "brandedmessage": "Terms and Conditions of Use: \nBy using SureDrop you agree that data transmitted and/or stored by SureDrop are covered by governing laws and data may be required to be provided to a lawful third party. Where applicable, export-controlled information transmitted to a foreign jurisdiction may require a Data and Services Export Authorization approval. \n\nFor more information on SureDrop user terms and conditions email info@senetas.com.",
  "opt_2fa": "False",
  "rest_endpoints": "https://portal.suredrop.dev",
  "azure_application_id": "d8335fd2-fa2f-498a-be4b-3c539e386738",
  "azure_tenant_id": "09ff7a38-0498-4f9b-94e5-3d487e8cdd17",
  "opt_azure": "False",
  "maintenance": "",
  "optSta": "True",
  "opt_my_documents": "3",
  "staOptions": "{\"ClientId\":\"b9d047d9-1b3f-4e8c-b53d-03d63eb59f08\",\"AuthEndpoint\":\"https://idp.eu.safenetid.com/auth/realms/IZ29RN7ZI9-STA/protocol/openid-connect/auth\"}",
  "feature_toggles": ""
}

POST /session

Case 2

Used to obtain a session token (log into Suredrop)


:method: POST
:path: /rest/session?prefix=Winter+Is+Coming&username=administrator


Request-Body:
{"password":"<PASSWORD>","timeout":15,"token":""}

:status: 200
Response-Body:
{"token":"UR3_ZIzoS15WVpZIBS8D7LMMS2VkSbnRgDvcPivqdZo"}

GET /user/data

Case 3

Get generic information on a user for UX purposes


:method: GET
:path: /rest/user/data?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200
Response-Body:
  "navbarPinned": true,
  "username": "administrator",
  "FailedLoginAttempt": {
    "failed": 0,
    "maxRetries": 5
  },
  "shadow": "",
  "navbarCollapsed": false
}

GET /pinga

Case 4

Do a authorised ping on the api.


:method: GET
:path: /rest/pinga?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=


:status: 200
Response-Body:
{"pinga":"ponga"}

GET /user

Case 5

Get information on the user

:method: GET
:path: /rest/user?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200
Response-Body:
{
  "level": "3",
  "roles": {
    "Restricted": true,
    "Standard": true,
    "Power": true,
    "Admin": true,
    "Forensic": true
  },
  "has_password": "true",
  "two_factor": "none",
  "source": "local",
  "timestamp": "1627959777526",
  "first_name": "admin",
  "last_name": "admin",
  "email": "admin@suredrop.com.au",
  "mobile": "+",
  "plan": "",
  "paid": "",
  "group_name": "_users",
  "unique_id": "0000000000000000",
  "status": "ACTIVATED",
  "username": "administrator"
}

POST /rest/user/data

Case 6

Save configuration data for a user


:method: POST
:path: /rest/user/data?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=


Request-Body:
{"navbarPinned":true,"username":"administrator","FailedLoginAttempt":{"failed":0,"maxRetries":5},"shadow":"","navbarCollapsed":false}

:status: 200
Response-Body:
{"error":"noerror"}

GET /mesh

Case 7

Get a storage mesh. This is an expensive operation, so it is done once and passed back in when uploading a file. However this is an optional parameter when uploading a file, if it is missing the file upload will generate a mesh automatically for evey upload.


:method: GET
:path: /rest/mesh?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200
Response-Body:
[
  {
    "id": "876560df-1d5d-463c-bd0f-b08040daeaec",
    "name": "Backup",
    "status": "Online - Writable",
    "ip_address": "http://storage-server-backup",
    "public_ip_address": ""
  },
  {
    "id": "32577efe-e4d2-4ee8-a821-e430938cc65b",
    "name": "Primary",
    "status": "Online - Writable",
    "ip_address": "http://storage-server",
    "public_ip_address": ""
  }
]

GET /groups

Case 8

Get a list of groups

:method: GET
:path: /rest/groups?prefix=Winter+Is+Coming&role=Forensic&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200
Response-Body:
[
  {
    "group": "57897d5a-2d5d-4638-abbb-7e08d92094e3",
    "status": "ACTIVATED",
    "admin": "auto.admin",
    "description": "Automation test",
    "unique_id": "Auto",
    "templates": "Office 365"
  },
  {
    "group": "ed3a4a49-7cfc-4ca0-b8ef-ff9dbd5b6fc4",
    "status": "ACTIVATED",
    "admin": "auto.admin",
    "description": "Automation test",
    "unique_id": "Auto Admin",
    "templates": ""
  }
]

GET /group/[group]

Case 9

Get the details of a group

:method: GET
:path: /rest/group/57897d5a-2d5d-4638-abbb-7e08d92094e3?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200
Response-Body:
{
  "admin": "auto.admin",
  "copies": "2",
  "secure": "no",
  "group_status": "ACTIVATED",
  "lifetime": "NEVER",
  "unique_id": "Auto",
  "description": "Automation test"
}

GET /members/[group]/users

Case 10

Get a list of the group members

:method: GET
:path: /rest/members/57897d5a-2d5d-4638-abbb-7e08d92094e3/users?prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "username": "adrian",
    "first_name": "Adrian",
    "last_name": "Tankard",
    "initials": "AT",
    "email": "adrian.tankard@senetas.com",
    "mobile": "+"
  },
  {
    "username": "adrian.tankard@suredrop.com.au",
    "first_name": "Adrian",
    "last_name": "Tankard",
    "initials": "AT",
    "email": "adrian.tankard@suredrop.com.au",
    "mobile": "+"
  }
]

GET /folders/[group]

Case 11

Get a list of the folders in a group

:method: GET
:path: /rest/folders/57897d5a-2d5d-4638-abbb-7e08d92094e3?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200
Response-Body:
[
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/Votiro/Import Folder 4",
    "deleted": "no",
    "created_date": "1624919768427",
    "modified_date": "1624926475128",
    "metadata": null
  },
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/Votiro/Import Folder 4/Chess",
    "deleted": "no",
    "created_date": "1624919759339",
    "modified_date": "1624919776800",
    "metadata": null
  },
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/Votiro",
    "deleted": "no",
    "created_date": "1624925196536",
    "modified_date": "1625009529541",
    "metadata": null
  },
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3",
    "deleted": "no",
    "created_date": "1622162034388",
    "modified_date": "1625014271518",
    "metadata": null
  },
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/Votiro/From Votiro",
    "deleted": "no",
    "created_date": "1624920317867",
    "modified_date": "1624920342563",
    "metadata": null
  },
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/Office test",
    "deleted": "no",
    "created_date": "1625014271518",
    "modified_date": "1625014271518",
    "metadata": null
  },
  {
    "folder": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/Votiro/2021-06-30",
    "deleted": "no",
    "created_date": "1625009529541",
    "modified_date": "1625009529541",
    "metadata": null
  }
]

GET /templates/[group]/1

Case 12

Get a list of templates that have been applied to the group


:method: GET
:path: /rest/templates/57897d5a-2d5d-4638-abbb-7e08d92094e3/1?prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "name": "Office 365",
    "type": "POLICY"
  }
]

GET /storage/[group]

Case 13

Get the storage servers associated with a group

:method: GET
:path: /rest/storage/57897d5a-2d5d-4638-abbb-7e08d92094e3?prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "id": "32577efe-e4d2-4ee8-a821-e430938cc65b",
    "name": "Primary"
  },
  {
    "id": "876560df-1d5d-463c-bd0f-b08040daeaec",
    "name": "Backup"
  }
]

GET /templates

Case 14

Get a list of all of the available templates


:method: GET
:path: /rest/templates?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "name": "Automatically Deflate Files",
    "type": "POLICY",
    "data": "DEFLATE:YES"
  },
  {
    "name": "Disable Sharing",
    "type": "POLICY",
    "data": "SHARING:NO"
  },
  {
    "name": "Expire Group",
    "type": "POLICY",
    "data": "EXPIRE:YYYY:MM:DD{:HH:MM}"
  },
  {
    "name": "ICAP Example",
    "type": "POLICY",
    "data": "{\"endpoint_address\":\"http://endpoint\",\"endpoint_port\":1234,\"service\":\"service\"}"
  },
  {
    "name": "Office 365",
    "type": "POLICY",
    "data": "O365:YES"
  },
  {
    "name": "Read Only",
    "type": "POLICY",
    "data": "READONLY_GROUP:YES"
  },
  {
    "name": "Admin User",
    "type": "SECURITY",
    "data": "USERS:R,\r\nUSERS:RW,\r\nGROUPS:R,\r\nGROUPS:RW,\r\nSTORAGE:R,\r\nSTORAGE:RW,\r\nTEMPLATES:R,\r\nTEMPLATES:RW,\r\nDEVICES:R,\r\nDEVICES:RW,ADMIN:YES"
  },
  {
    "name": "Forensic User",
    "type": "SECURITY",
    "data": "USERS:R,\r\nUSERS:RW,\r\nGROUPS:R,\r\nGROUPS:RW,\r\nSTORAGE:R,\r\nSTORAGE:RW,\r\nTEMPLATES:R,\r\nTEMPLATES:RW,\r\nDEVICES:R,\r\nDEVICES:RW,FORENSIC:YES"
  },
  {
    "name": "Power User",
    "type": "SECURITY",
    "data": "USERS:R,\r\nUSERS:RW,\r\nGROUPS:R,\r\nGROUPS:RW,\r\nSTORAGE:R,\r\nSTORAGE:RW,\r\nTEMPLATES:R,\r\nTEMPLATES:RW,\r\nDEVICES:R,\r\nDEVICES:RW,POWER:YES"
  },
  {
    "name": "Restricted User",
    "type": "SECURITY",
    "data": "USERS:R,\r\nUSERS:RW,\r\nGROUPS:R,\r\nGROUPS:RW,\r\nSTORAGE:R,\r\nSTORAGE:RW,\r\nTEMPLATES:R,\r\nTEMPLATES:RW,\r\nDEVICES:R,\r\nDEVICES:RW,RESTRICTED:YES"
  },
  {
    "name": "Standard User",
    "type": "SECURITY",
    "data": "USERS:R,\r\nUSERS:RW,\r\nGROUPS:R,\r\nGROUPS:RW,\r\nSTORAGE:R,\r\nSTORAGE:RW,\r\nTEMPLATES:R,\r\nTEMPLATES:RW,\r\nDEVICES:R,\r\nDEVICES:RW,STANDARD:YES"
  }
]

GET /storage

Case 15

Calculate a storage mesh and cache it in suredrop


:method: GET
:path: /rest/storage?format=cache&prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
{"mesh":"f6f8c71d-da57-4d0e-902e-7be4d9586461"}

GET /template/[template name]

Case 16

Get the content of a specific template

:path: /rest/template/Office%20365?prefix=Winter+Is+Coming&username=administrator
:authority: portal.suredrop.dev


:status: 200

Response-Body:
{
  "type": "POLICY",
  "data": "O365:YES"
}

GET /users

Case 17

Get a list of the users

:method: GET
:path: /rest/users?prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "username": "administrator",
    "first_name": "admin",
    "last_name": "admin",
    "initials": "AA",
    "email": "admin@suredrop.com.au",
    "mobile": "+",
    "status": "ACTIVATED",
    "source": "local",
    "two_factor": "none",
    "roles": {
      "Restricted": true,
      "Standard": true,
      "Power": true,
      "Admin": true,
      "Forensic": true
    }
  },
  {
    "username": "adrian",
    "first_name": "Adrian",
    "last_name": "Tankard",
    "initials": "AT",
    "email": "adrian.tankard@senetas.com",
    "mobile": "+",
    "status": "ACTIVATED",
    "source": "STA",
    "two_factor": "none",
    "roles": {
      "Restricted": true,
      "Standard": true
    }
  },
  {
    "username": "adrian.tankard",
    "first_name": "Adrian",
    "last_name": "Tankard",
    "initials": "AT",
    "email": "adrian.tankard@senetas.com",
    "mobile": "+",
    "status": "ACTIVATED",
    "source": "STA",
    "two_factor": "none",
    "roles": {
      "Restricted": true,
      "Standard": true
    }
  }
]

GET /documents/[group]/path

Case 18

Get a list of the documents


:method: GET
:path: /rest/documents/57897d5a-2d5d-4638-abbb-7e08d92094e3?deleted=false&prefix=Winter+Is+Coming&role=Forensic&
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "url": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/20210808_130543.jpg",
    "timestamp": "1628501256914",
    "filesize": "3661871",
    "document_id": "04d829da-34c5-43a7-98c9-0c6d5b627c94",
    "number_of_blocks": "0",
    "number_of_blocks_uploaded": 0,
    "deleted": "no",
    "created_date": "1628501256835",
    "last_modified_date": "1628501256857",
    "hash": "A76FFB54A307A11E7AD587B8B0CFC28651CFB7C7E44F74181B7EB8E1EB50283B84C021F8BBB725C169B4FE3BADDB9719",
    "name": "20210808_130543.jpg",
    "metadata": null,
    "version": 1,
    "username": "auto.standard"
  },
  {
    "url": "/57897d5a-2d5d-4638-abbb-7e08d92094e3/20210808_130735.jpg",
    "timestamp": "1628501254698",
    "filesize": "3195990",
    "document_id": "87490d9a-050a-483b-8906-5bb241e6c21e",
    "number_of_blocks": "0",
    "number_of_blocks_uploaded": 0,
    "deleted": "no",
    "created_date": "1628501254641",
    "last_modified_date": "1628501254654",
    "hash": "9D624F0FD16E03B74AD06965BABB5E9C7D7BA93042AD67EA442AF6E59E3F61657AAA263F8B4E0F9DE3E8A19EA9370361",
    "name": "20210808_130735.jpg",
    "metadata": null,
    "version": 1,
    "username": "auto.standard"
  }
]

GET /settings

Case 19

Get the settings

:method: GET
:path: /rest/settings?prefix=Winter+Is+Coming&username=administrator
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
{
  "admin_email": "admin@suredrop.com.au",
  "company_email": "admin@suredrop.com.au",
  "admin_mobile": "",
  "activation_token": "",
  "storage_tokan": "SureDrop",
  "brandedcompany": "Winter Is Coming",
  "soap_endpoints": "",
  "rest_endpoints": "https://portal.suredrop.dev",
  "version": "2.11.0",
  "opt_access_stats": "true",
  "opt_ad_integration": "true",
  "opt_auditing": "true",
  "opt_device_access": "true",
  "opt_group_access": "true",
  "opt_max_devices_per_user": "999999",
  "opt_max_storage_in_gb": "9999999",
  "opt_max_users": "9999999",
  "opt_storage_access": "true",
  "opt_template_access": "true",
  "opt_user_access": "true",
  "opt_version_history": "true",
  "opt_version_history_days": "365",
  "opt_price_per_user_in_dollars": "0",
  "opt_min_number_of_users": "0",
  "opt_on_premise_allowed": "true",
  "www_portal": "https://portal.suredrop.dev",
  "download_endpoint": "",
  "opt_2fa": "False",
  "brandedlogo": "https://suredrop-downloads.s3-ap-southeast-2.amazonaws.com/winter-is-coming.png",
  "azure_application_id": "d8335fd2-fa2f-498a-be4b-3c539e386738",
  "azure_tenant_id": "09ff7a38-0498-4f9b-94e5-3d487e8cdd17",
  "azure_access_key": "9q86ud8GSduA7UTRr76ZTG4sCGehGwNugjLjXVHOjEI=",
  "opt_azure": "False",
  "kms_type": "",
  "kms_location": "",
  "opt_kms": "",
  "kms_username": "",
  "kms_password": "",
  "kms_id": "",
  "kms_name": "",
  "opt_scan": "False",
  "scan_policy": "{\"PolicyName\":\"SureDrop Alpha\",\"Token\":\"\"}",
  "scan_endpoint": "",
  "azure_options": "{\"GroupId\":\"\",\"SupportDetails\":\"**REPLACE-ME**\"}",
  "company_name": "Winter Is Coming",
  "sql_connection_string": "[hidden]",
  "maintenance": "",
  "brandedmessage": "Terms and Conditions of Use: \nBy using SureDrop you agree that data transmitted and/or stored by SureDrop are covered by governing laws and data may be required to be provided to a lawful third party. Where applicable, export-controlled information transmitted to a foreign jurisdiction may require a Data and Services Export Authorization approval. \n\nFor more information on SureDrop user terms and conditions email info@senetas.com.",
  "optSta": "True",
  "staOptions": "{\"ClientId\":\"\",\"ClientSecret\":\"\",\"AuthEndpoint\":\"https://idp.eu.safenetid.com/auth/realms/IZ29RN7ZI9-STA/protocol/openid-connect/auth\",\"TokenEndpoint\":\"https://idp.eu.safenetid.com/auth/realms/IZ29RN7ZI9-STA/protocol/openid-connect/token\",\"UserInfoEndpoint\":\"https://idp.eu.safenetid.com/auth/realms/IZ29RN7ZI9-STA/protocol/openid-connect/userinfo\",\"ConfigEndpoint\":\"https://idp.eu.safenetid.com/auth/realms/IZ29RN7ZI9-STA/.well-known/openid-configuration\",\"RestApiDetails\":{\"Endpoint\":\"https://api.eu.safenetid.com/api/v1/tenants/IZ29RN7ZI9/\",\"Key\":\"\",\"PageSize\":10},\"SupportDetails\":\"Support Admin for SureDrop Alpha - Adrian.Tankard@senetas.com\"}",
  "optLdap": "False",
  "newPurgeDays": "0",
  "opt_my_documents": "3",
  "timestamp": "1628554051434",
  "init": "true",
  "app_version": "2.11.0"
}

GET /get_summary_stats

Case 20

Gets the summary stats for the user

:method: GET
:path: /rest/get_summary_stats?prefix=Winter+Is+Coming&target_username=administrator&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "sort": "1",
    "name": "Group Memberships",
    "value": "4",
    "display": "1"
  },
  {
    "sort": "2",
    "name": "Groups Owned",
    "value": "4",
    "display": "1"
  },
  {
    "sort": "3",
    "name": "Storage Used",
    "value": "8945975415",
    "display": "1"
  },
  {
    "sort": "4",
    "name": "Documents Uploaded",
    "value": "28",
    "display": "1"
  },
  {
    "sort": "5",
    "name": "Total Filesize",
    "value": "64554179078",
    "display": "1"
  },
  {
    "sort": "6",
    "name": "Active Users",
    "value": "11",
    "display": "1"
  }
]

GET /activation

Case 21

Gets the activation details


:method: GET
:path: /rest/activation?prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
{
  "distributer": "SUREDROP",
  "users": "1000",
  "storage": "0",
  "start_date": "15apr2021",
  "end_date": "15apr2022",
  "type": "P",
  "num": "01",
  "signature": "Valid"
}

POST /group

Case 22

Adds a group


:method: POST
:path: /rest/group?prefix=Winter+Is+Coming&username=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Request-Body:
{"name":"This is a new group","storage":["Backup","Primary"],"description":""}

Response-Body:
{
  "error": "noerror",
  "groupId": "3d529494-2048-4923-8f01-e5a7179f82e4"
}

GET /user/data

Case 23

Gets details on a user


:method: GET
:path: /rest/user/data?prefix=Winter+Is+Coming&username=administrator&target=administrator

authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
{
  "level": "3",
  "roles": {
    "Restricted": true,
    "Standard": true,
    "Power": true,
    "Admin": true,
    "Forensic": true
  },
  "has_password": "true",
  "two_factor": "none",
  "source": "local",
  "timestamp": "1627959777526",
  "first_name": "admin",
  "last_name": "admin",
  "email": "admin@suredrop.com.au",
  "mobile": "+",
  "plan": "",
  "paid": "",
  "group_name": "_users",
  "unique_id": "0000000000000000",
  "status": "ACTIVATED",
  "username": "administrator"
}

GET /notifications/[group]

Case 24

Gets all of the notifications that have happened in a group in the last 32 seconds


:method: GET
:path: /rest/notifications/3d529494-2048-4923-8f01-e5a7179f82e4?prefix=Winter+Is+Coming&seconds=32&
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Response-Body:
[
  {
    "query_timestamp": "1628554079231"
  }
]

POST /folder/[group]/[folder name]

Case 25

Create a folder


:method: POST
:path: /rest/folder/3d529494-2048-4923-8f01-e5a7179f82e4/This%20is%20a%20new%20folder?prefix=Winter+Is+Coming&
authorization: Basic OlVSM19aSXpvUzE1V1ZwWklCUzhEN0xNTVMyVmtTYm5SZ0R2Y1BpdnFkWm8=

:status: 200

Request-Body:
{}

Response-Body:
{"error":"noerror"}

POST /document/[group]/[path and filename]

Case 26

Upload a simple file to suredrop


:method: POST
:path: /rest/document/3d529494-2048-4923-8f01-e5a7179f82e4/This%20is%20a%20new%20folder/IMG_0487.HEIC?prefix=Winter%20Is%20Coming&username=administrator&token=UR3_ZIzoS15WVpZIBS8D7LMMS2VkSbnRgDvcPivqdZo&mesh=d86d5575-92a2-4d48-adf5-96bae33b6121&raw=raw

:status: 200

Request-Body:<RAW FILE CONTENTS>

Clone this wiki locally