Skip to content

Commit b5ba78a

Browse files
authored
More Shuffle Doc fixes
1 parent 6fabbd4 commit b5ba78a

File tree

1 file changed

+45
-39
lines changed

1 file changed

+45
-39
lines changed

docs/API.md

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ curl -XPUT https://shuffler.io/api/v1/workflows/WORKFLOW_ID -H "Authorization: B
163163
```
164164

165165
**Success response**
166-
```
166+
```json
167167
{"success": true}
168168
```
169169

@@ -185,12 +185,15 @@ curl -XDELETE https://shuffler.io/api/v1/workflows/apcb3cc6-f343-4511-827f-b6055
185185

186186

187187
### Execute workflow
188-
Executes a given workflow with optional arguments "execution_argument" and "start". Start is the node to execute from.
188+
Executes a given workflow with optional arguments "execution_argument" and "start". Start is an optional node to start from. [See Additional Optional Arguments](https://github.com/Shuffle/shuffle-shared/blob/57b211816d87b47acde1481084b187fda13d05ba/structs.go#L126).
189189

190190
Methods: POST, GET
191191

192192
```bash
193-
curl -XPOST https://shuffler.io/api/v1/workflows/{workflow_id}/execute -H "Authorization: Bearer APIKEY" -d '{"execution_argument": "DATA TO EXECUTE WITH", "start": ""}'
193+
curl -XPOST https://shuffler.io/api/v1/workflows/{workflow_id}/execute -H "Authorization: Bearer APIKEY" -d '{
194+
"execution_argument": "DATA TO EXECUTE WITH",
195+
"start": ""
196+
}'
194197
```
195198

196199
Additional info:
@@ -211,7 +214,10 @@ Gets an execution based on results from [Execute workflow](/docs/api#execute_wor
211214
Methods: POST
212215

213216
```bash
214-
curl -XPOST https://shuffler.io/api/v1/streams/results -d '{"execution_id": "ad9baac7-dc30-42da-bb1f-18b84309cfb7", "authorization": "62b3de56-9de0-4983-ad72-e63c42d123f8"}'
217+
curl -XPOST https://shuffler.io/api/v1/streams/results -d '{
218+
"execution_id": "ad9baac7-dc30-42da-bb1f-18b84309cfb7",
219+
"authorization": "62b3de56-9de0-4983-ad72-e63c42d123f8"
220+
}'
215221
```
216222

217223
**Success response**
@@ -291,7 +297,7 @@ Methods: POST
291297
curl https://shuffler.io/api/v1/apps/upload -H "Authorization: Bearer APIKEY" -F 'shuffle_file=@./your_file/file_path/app.zip'
292298
```
293299
**Success response**
294-
```
300+
```json
295301
{"success": true, "id": "798f1234c4fb8b4a6300da3c546af45a"}
296302
```
297303

@@ -376,7 +382,7 @@ curl https://shuffler.io/api/v1/orgs/{ORG_ID}/stats -H "Authorization: Bearer A
376382
```
377383

378384
**Success response**
379-
```
385+
```json
380386
{"success": true, "reason": "Cache incremented by 6"}
381387
```
382388

@@ -403,7 +409,7 @@ curl https://shuffler.io/api/v1/apps/authentication -H "Authorization: Bearer AP
403409
```
404410

405411
**Success response**
406-
```
412+
```json
407413
{"success": true, "data": []}
408414
```
409415

@@ -418,7 +424,7 @@ curl -XPOST https://shuffler.io/api/v1/apps/authentication/{authentication_id}/c
418424
```
419425

420426
**Success response**
421-
```
427+
```json
422428
{"success": true}
423429
```
424430

@@ -433,7 +439,7 @@ curl -XPOST https://shuffler.io/api/v1/apps/authentication/{authentication_id}/c
433439
```
434440

435441
**Success response**
436-
```
442+
```json
437443
{"success": true}
438444
```
439445

@@ -447,7 +453,7 @@ curl https://shuffler.io/api/v1/apps/authentication/{authentication_id} -H "Auth
447453
```
448454

449455
**Success response**
450-
```
456+
```json
451457
{"success": true}
452458
```
453459

@@ -480,7 +486,7 @@ curl -XPUT https://shuffler.io/api/v1/apps/authentication -H "Authorization: Bea
480486
```
481487

482488
**Success response**
483-
```
489+
```json
484490
{"success": true, "id": "app_id"}
485491
```
486492

@@ -496,7 +502,7 @@ curl https://shuffler.io/api/v1/apps/search -H "Authorization: Bearer APIKEY" -d
496502
```
497503

498504
**Success response**
499-
```
505+
```json
500506
{"success": true, "reason": [{apps here}]}
501507
```
502508

@@ -530,7 +536,7 @@ curl https://shuffler.io/api/v1/users/register -H "Authorization: Bearer APIKEY"
530536

531537

532538
**Success response**
533-
```
539+
```json
534540
{"success": true}
535541
```
536542

@@ -549,7 +555,7 @@ curl https://shuffler.io/api/v1/users/updateuser -H "Authorization: Bearer APIKE
549555

550556

551557
**Success response**
552-
```
558+
```json
553559
{"success": true}
554560
```
555561

@@ -564,7 +570,7 @@ curl -XDELETE https://shuffler.io/api/v1/users/{userid} -H "Authorization: Beare
564570

565571

566572
**Success response**
567-
```
573+
```json
568574
{"success": true}
569575
```
570576

@@ -579,7 +585,7 @@ curl https://shuffler.io/api/v1/users/generateapikey -H "Authorization: Bearer A
579585

580586

581587
**Success response**
582-
```
588+
```json
583589
{"success": true, "username": "username", "verified": false, "apikey": "new apikey"}
584590
```
585591

@@ -599,7 +605,7 @@ curl https://shuffler.io/api/v1/orgs/{org_id}/set_cache -H "Authorization: Beare
599605

600606

601607
**Success response**
602-
```
608+
```json
603609
{"success": true}
604610
```
605611

@@ -616,7 +622,7 @@ curl https://shuffler.io/api/v1/orgs/{org_id}/get_cache -H "Authorization: Beare
616622

617623

618624
**Success response**
619-
```
625+
```json
620626
{"success":false,"workflow_id":"99951014-f0b1-473d-a474-4dc9afecaa75","execution_id":"f0b2b4e9-90ca-4835-bdd4-2889ef5f926f","org_id":"2e7b6a08-b63b-4fc2-bd70-718091509db1","key":"hi","value":"1234"}
621627
```
622628

@@ -639,7 +645,7 @@ curl https://shuffler.io/api/v1/orgs/{org_id}/list_cache -H "Authorization: Bear
639645

640646

641647
**Success response**
642-
```
648+
```json
643649
{"success":true,"keys":[{"success":false,"workflow_id":"99951014-f0b1-473d-a474-4dc9afecaa75","execution_id":"f0b2b4e9-90ca-4835-bdd4-2889ef5f926f","org_id":"2e7b6a08-b63b-4fc2-bd70-718091509db1","key":"hi","value":"1234"}]}
644650
```
645651

@@ -656,7 +662,7 @@ curl https://shuffler.io/api/v1/orgs/{org_id}/delete_cache -H "Authorization: B
656662

657663

658664
**Success response**
659-
```
665+
```json
660666
{"success": true}
661667
```
662668

@@ -674,7 +680,7 @@ curl https://shuffler.io/api/v1/files/create -H "Authorization: Bearer APIKEY" -
674680

675681

676682
**Success response**
677-
```
683+
```json
678684
{"success": true, "id": "e19cffe4-e2da-47e9-809e-904f5cb03687"}
679685
```
680686

@@ -689,7 +695,7 @@ curl https://shuffler.io/api/v1/files/{file}/upload -H "Authorization: Bearer AP
689695

690696

691697
**Success response**
692-
```
698+
```json
693699
{"success": true, "id": "e19cffe4-e2da-47e9-809e-904f5cb03687"}
694700
```
695701

@@ -749,7 +755,7 @@ curl -XDELETE https://shuffler.io/api/v1/files/{id} -H "Authorization: Bearer AP
749755

750756

751757
**Success response**
752-
```
758+
```json
753759
{"success": true}
754760
```
755761

@@ -764,7 +770,7 @@ curl -XPUT https://shuffler.io/api/v1/files/{id}/edit -H "Authorization: Bearer
764770

765771

766772
**Success response**
767-
```
773+
```json
768774
{"success": true}
769775
```
770776

@@ -778,7 +784,7 @@ curl https://shuffler.io/api/v1/files/namespaces/{category} -H "Authorization: B
778784
```
779785

780786
**?id=true**
781-
```
787+
```json
782788
{"success": True, "list": [{
783789
"name": "Filename",
784790
"id": "file_uuid",
@@ -809,7 +815,7 @@ curl https://shuffler.io/api/v1/workflows/schedules -H "Authorization: Bearer AP
809815

810816

811817
**Success response**
812-
```
818+
```json
813819
[{"id":"cabaaffc-db53-4e19-ad8b-4f5fc0dc49c9","start_node":"","seconds":0,"workflow_id":"7b8ffd74-5e67-4700-bf79-751d1ac7e5e4","argument":"{\"start\":\"\",\"execution_source\":\"schedule\",\"execution_argument\":\"{\\\"example\\\": {\\\"json\\\": \\\"is cool\\\"}}\"}","wrapped_argument":"{\"start\":\"\",\"execution_source\":\"schedule\",\"execution_argument\":\"{\\\"example\\\": {\\\"json\\\": \\\"is cool\\\"}}\"}","appinfo":{"sourceapp":{"foldername":"","name":"","id":"","description":"","action":""},"destinationapp":{"foldername":"","name":"","id":"","description":"","action":""}},"finished":false,"base_app_location":"","org":"37217426-f794-429c-a0f9-548f7055af45","createdby":"","availability":"","creationtime":1641573762,"lastmodificationtime":1641573762,"lastruntime":1641573762,"frequency":"*/15 * * * *","environment":""}]
814820
```
815821

@@ -830,7 +836,7 @@ curl -XPOST https://shuffler.io/api/v1/workflows/{workflow_id}/schedule -H "Auth
830836

831837

832838
**Success response**
833-
```
839+
```json
834840
{"success":true}
835841
```
836842

@@ -845,7 +851,7 @@ curl -XDELETE https://shuffler.io/api/v1/workflows/{workflow_id}/schedule/{sched
845851

846852

847853
**Success response**
848-
```
854+
```json
849855
{"success":true}
850856
```
851857

@@ -864,7 +870,7 @@ curl -XPOST https://shuffler.io/api/v1/hooks -H "Authorization: Bearer APIKEY" -
864870

865871

866872
**Success response**
867-
```
873+
```json
868874
{"success":true}
869875
```
870876

@@ -879,7 +885,7 @@ curl -XDELETE https://shuffler.io/api/v1/hooks/{webhook_id} -H "Authorization: B
879885

880886

881887
**Success response**
882-
```
888+
```json
883889
{"success":true, "reason": "Stopped webhook"}
884890
```
885891

@@ -903,7 +909,7 @@ curl -XPOST https://shuffler.io/api/v1/notifications -H "Authorization: Bearer A
903909

904910

905911
**Success response**
906-
```
912+
```json
907913
{"success":true}
908914
```
909915

@@ -919,7 +925,7 @@ curl https://shuffler.io/api/v1/notifications -H "Authorization: Bearer APIKEY"
919925

920926

921927
**Success response**
922-
```
928+
```json
923929
{"success":true,"notifications":[{"image":"","created_at":1638898114,"updated_at":1638898114,"title":"Error in Workflow \"Shuffle Workflow helloooo\"","description":"Node shuffle_tools_1 in Workflow Shuffle Workflow Winner announcement was found to have an error. Click to investigate","org_id":"","user_id":"","tags":null,"amount":1,"id":"057bf2b5-d29d-4bb4-bf2f-d8a6ee882dfe","reference_url":"/workflows/1693bf4a-b0f4-46dd-8257-448cbc6b0e9b?execution_id=74adf061-f949-4392-9e2d-1fd5e3381037\u0026view=executions\u0026node=ef683a39-4c2b-4c83-ad2d-d28a922e44b4","org_notification_id":"60a22356-1028-4226-b755-51804e3a25a2","dismissable":true,"personal":true,"read":false}]}
924930
```
925931

@@ -934,7 +940,7 @@ curl https://shuffler.io/api/v1/notifications/clear -H "Authorization: Bearer AP
934940

935941

936942
**Success response**
937-
```
943+
```json
938944
{"success":true}
939945
```
940946

@@ -949,7 +955,7 @@ curl https://shuffler.io/api/v1/notifications/{notificationId}/markasread -H "Au
949955

950956

951957
**Success response**
952-
```
958+
```json
953959
{"success":true}
954960
```
955961

@@ -967,7 +973,7 @@ curl https://shuffler.io/api/v1/orgs/{org_id} -H "Authorization: Bearer APIKEY"
967973

968974

969975
**Success response**
970-
```
976+
```json
971977
{"name":"Testing","description":"Description","company_type":"","image": "base64 image", "id":"583816e5-40ab-4212-8c7a-e54c8edd6b51","org":"new suborg","users":[],"role":"","roles":["admin","user"],"active_apps":["eb6b633ebbb77575ad17789eecf36cdf"],"cloud_sync":false,"cloud_sync_active":true,"sync_config":{"interval":0,"api_key":"","source":""},"sync_features": {}, "invites":null,"child_orgs":[],"manager_orgs":null,"creator_org":"PARENT_ORG_ID","disabled":false,"partner_info":{"reseller":false,"reseller_level":""},"sso_config":{"sso_entrypoint":"","sso_certificate":"","client_id":"","client_secret":"","openid_authorization":"","openid_token":""},"main_priority":"","region":"","region_url":"","tutorials":[]}
972978
```
973979

@@ -981,7 +987,7 @@ curl -XPOST https://shuffler.io/api/v1/orgs/{org_id}/create_sub_org -H "Authoriz
981987
```
982988

983989
**Success response**
984-
```
990+
```json
985991
{"success": true, "id": "<new org uuid>", "reason": "Successfully created new sub-org"}
986992
```
987993

@@ -995,7 +1001,7 @@ curl -XPOST https://shuffler.io/api/v1/orgs/{CURRENT_ORG_ID}/change -H "Authoriz
9951001
```
9961002

9971003
**Success response**
998-
```
1004+
```json
9991005
{"success": true, "reason": "Changed Organization", "region_url": "New API endpoint IF applicable"}
10001006
```
10011007

@@ -1009,7 +1015,7 @@ curl -XPOST https://shuffler.io/api/v1/orgs/{org_id} -H "Authorization: Bearer A
10091015
```
10101016

10111017
**Success response**
1012-
```
1018+
```json
10131019
{"success": true, "reason": "Changed Organization", "region_url": "New API endpoint IF applicable"}
10141020
```
10151021

@@ -1039,7 +1045,7 @@ curl -XDELETE https://shuffler.io/api/v1/orgs/{org_id} -H "Authorization: Bearer
10391045
```
10401046

10411047
**Success response**
1042-
```
1048+
```json
10431049
{"success": true}
10441050
```
10451051

0 commit comments

Comments
 (0)