Streamlit
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
PATCH | |
DELETE | |
POST | |
GET | |
POST | |
POST | |
GET | |
POST | |
POST | |
GET |
List all streamlit apps
Required API key scopes
streamlit_app:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /streamlit_appsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/streamlit_apps/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"count": 123,"next": "http://api.example.org/accounts/?offset=400&limit=100","previous": "http://api.example.org/accounts/?offset=200&limit=100","results": [{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}]}
Create streamlit apps
Required API key scopes
streamlit_app:writeRequest parameters
- namestring
- descriptionstring
- cpu_coresnumber
- memory_gbnumber
Response
Example request
POST /api /projects /:project_id /streamlit_appsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/\-d name="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/streamlit_apps/".format(project_id=project_id),headers={"Authorization": "Bearer {}".format(api_key)},data={"name": "string"}).json()
Example response
Status 201
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Retrieve streamlit apps
Required API key scopes
streamlit_app:readPath parameters
- short_idstring
Response
Example request
GET /api /projects /:project_id /streamlit_apps /:short_idexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Update streamlit apps
Required API key scopes
streamlit_app:writePath parameters
- short_idstring
Request parameters
- namestring
- descriptionstring
- cpu_coresnumber
- memory_gbnumber
Response
Example request
PATCH /api /projects /:project_id /streamlit_apps /:short_idexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X PATCH \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/\-d name="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.patch("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"name": "string"}).json()
Example response
Status 200
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Delete streamlit apps
Required API key scopes
streamlit_app:writePath parameters
- short_idstring
Example request
DELETE /api /projects /:project_id /streamlit_apps /:short_idexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl -X DELETE \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.delete("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},)
Example response
Status 204 No response body
Create streamlit apps activate version
Path parameters
- short_idstring
Request parameters
- version_numberinteger
Response
Example request
POST /api /projects /:project_id /streamlit_apps /:short_id /activate_versionexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/activate_version/\-d version_number="integer"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/activate_version/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"version_number": "integer"}).json()
Example response
Status 200
RESPONSE
{"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"}}
Retrieve streamlit apps connect info
Path parameters
- short_idstring
Response
Example request
GET /api /projects /:project_id /streamlit_apps /:short_id /connect_infoexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/connect_info/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/connect_info/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"iframe_url": "string","expires_in": 0}
Create streamlit apps restart
Path parameters
- short_idstring
Response
Example request
POST /api /projects /:project_id /streamlit_apps /:short_id /restartexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/restart/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/restart/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 202
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Create streamlit apps start
Path parameters
- short_idstring
Response
Example request
POST /api /projects /:project_id /streamlit_apps /:short_id /startexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/start/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/start/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Status 202
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Retrieve streamlit apps status
Path parameters
- short_idstring
Response
Example request
GET /api /projects /:project_id /streamlit_apps /:short_id /statusexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/status/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/status/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0}
Create streamlit apps stop
Path parameters
- short_idstring
Response
Example request
POST /api /projects /:project_id /streamlit_apps /:short_id /stopexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/stop/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/stop/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"active_version": {"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"},"sandbox": {"status": "string","restart_count": 0,"last_error": "string","started_at": "2019-08-24T14:15:22Z","last_activity_at": "2019-08-24T14:15:22Z","version_number": 0},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","short_id": "string","name": "string","description": "string","cpu_cores": 0.1,"memory_gb": 0.1,"status": "string","created_at": "2019-08-24T14:15:22Z","updated_at": "2019-08-24T14:15:22Z"}
Create streamlit apps upload version
Path parameters
- short_idstring
Request parameters
- filestring
Response
Example request
POST /api /projects /:project_id /streamlit_apps /:short_id /upload_versionexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl-H 'Content-Type: application/json'\-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/upload_version/\-d file="string"
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.post("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/upload_version/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},data={"file": "string"}).json()
Example response
Status 201
RESPONSE
{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"}
Retrieve streamlit apps versions
Path parameters
- short_idstring
Response
Example request
GET /api /projects /:project_id /streamlit_apps /:short_id /versionsexport POSTHOG_PERSONAL_API_KEY=[your personal api key]curl \-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \<ph_app_host>/api/projects/:project_id/streamlit_apps/:short_id/versions/
api_key = "[your personal api key]"project_id = "[your project id]"response = requests.get("<ph_app_host>/api/projects/{project_id}/streamlit_apps/{short_id}/versions/".format(project_id=project_id,short_id="<the short id>"),headers={"Authorization": "Bearer {}".format(api_key)},).json()
Example response
Status 200
RESPONSE
{"results": [{"created_by": {"id": 0,"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f","distinct_id": "string","first_name": "string","last_name": "string","email": "string","is_email_verified": true,"hedgehog_config": {},"role_at_organization": "string"},"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08","version_number": 0,"zip_hash": "string","snapshot_id": "string","created_at": "2019-08-24T14:15:22Z"}]}