forked from Scifabric/pybossa
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
309 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Delete a project by project id | ||
--- | ||
tags: | ||
- name: project | ||
parameters: | ||
- name: oid | ||
in: path | ||
type: number | ||
required: true | ||
description: the project id | ||
responses: | ||
204: | ||
description: successfully deleted project | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
Get project information by project id | ||
--- | ||
tags: | ||
- name: project | ||
definitions: | ||
Project: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
created: | ||
type: string | ||
updated: | ||
type: string | ||
name: | ||
type: string | ||
short_name: | ||
type: string | ||
description: | ||
type: string | ||
long_description: | ||
type: string | ||
webhook: | ||
type: null | ||
allow_anonymous_contributors: | ||
type: boolean | ||
published: | ||
type: boolean | ||
hidden: | ||
type: boolean | ||
featured: | ||
type: boolean | ||
secret_key: | ||
type: string | ||
zip_download: | ||
type: boolean | ||
contacted: | ||
type: boolean | ||
owner_id: | ||
type: integer | ||
category_id: | ||
type: integer | ||
info: | ||
type: object | ||
properties: | ||
kpi: | ||
type: integer | ||
sync: | ||
type: object | ||
properties: | ||
enabled: | ||
type: boolean | ||
sched: | ||
type: string | ||
product: | ||
type: string | ||
timeout: | ||
type: integer | ||
subproduct: | ||
type: string | ||
data_access: | ||
type: array | ||
items: | ||
type: string | ||
passwd_hash: | ||
type: string | ||
reserve_tasks: | ||
type: object | ||
properties: | ||
category: | ||
type: array | ||
items: | ||
type: string | ||
task_presenter: | ||
type: string | ||
task_guidelines: | ||
type: string | ||
tasklist_columns: | ||
type: array | ||
items: | ||
type: string | ||
default_n_answers: | ||
type: integer | ||
progress_reminder: | ||
type: object | ||
properties: | ||
sent: | ||
type: boolean | ||
webhook: | ||
type: null | ||
target_remaining: | ||
type: null | ||
allow_taskrun_edit: | ||
type: boolean | ||
data_classification: | ||
type: object | ||
properties: | ||
input_data: | ||
type: string | ||
output_data: | ||
type: string | ||
sched_rand_within_priority: | ||
type: boolean | ||
sched_gold_task_probability: | ||
type: number | ||
allow_anonymous_contributors: | ||
type: boolean | ||
email_notif: | ||
type: boolean | ||
owners_ids: | ||
type: array | ||
items: | ||
type: integer | ||
links: | ||
type: array | ||
items: | ||
type: string | ||
link: | ||
type: string | ||
parameters: | ||
- name: oid | ||
in: path | ||
type: number | ||
required: true | ||
description: the project id | ||
responses: | ||
200: | ||
description: project info | ||
schema: | ||
$ref: '#definitions/Project' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
Create project with json data payload | ||
--- | ||
tags: | ||
- name: project | ||
parameters: | ||
- name: project | ||
required: true | ||
description: the project to create | ||
in: body | ||
schema: | ||
type: object | ||
required: | ||
- project_id | ||
info | ||
properties: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
short_name: | ||
type: string | ||
description: | ||
type: string | ||
password: | ||
type: string | ||
info: | ||
type: object | ||
properties: | ||
subproduct: | ||
type: string | ||
product: | ||
type: string | ||
kpi: | ||
type: integer | ||
data_classification: | ||
type: object | ||
properties: | ||
input_data: | ||
type: string | ||
output_data: | ||
type: string | ||
responses: | ||
200: | ||
description: created project info | ||
schema: | ||
$ref: '#definitions/Project' | ||
examples: | ||
{ | ||
"id": 13, | ||
"created": "2023-06-14T19:54:34.839245", | ||
"updated": "2023-09-12T16:33:28.384714", | ||
"name": "user pref test 2", | ||
"short_name": "userpreftest2", | ||
"description": "user pref test", | ||
"long_description": "user pref test", | ||
"webhook": null, | ||
"allow_anonymous_contributors": true, | ||
"published": true, | ||
"hidden": false, | ||
"featured": false, | ||
"secret_key": "c57cca94-29d7-471c-8eee-4bcbbc7a9cb5", | ||
"zip_download": true, | ||
"contacted": false, | ||
"owner_id": 1, | ||
"category_id": 1, | ||
"info": { | ||
"kpi": 3, | ||
"sync": { | ||
"enabled": false | ||
}, | ||
"sched": "user_pref_scheduler", | ||
"product": "Companies", | ||
"timeout": 3600, | ||
"subproduct": "Entity Management", | ||
"data_access": [ | ||
"L4" | ||
], | ||
"passwd_hash": "pbkdf2:sha256:260000$6TmmSmlNFEjKRZrT$85ea2bb992c8baf68933616c4de78d021d45f817acf92dae899e74c852006a9d", | ||
"reserve_tasks": { | ||
"category": [] | ||
}, | ||
"task_presenter": "<div id=\"task-app\"><\\div>", | ||
"task_guidelines": "<p>do the task.</p>", | ||
"tasklist_columns": [], | ||
"default_n_answers": 1, | ||
"progress_reminder": { | ||
"sent": false, | ||
"webhook": null, | ||
"target_remaining": null | ||
}, | ||
"allow_taskrun_edit": false, | ||
"data_classification": { | ||
"input_data": "L4 - Public Third-Party Data", | ||
"output_data": "L4 - Public Third-Party Data" | ||
}, | ||
"sched_rand_within_priority": false, | ||
"sched_gold_task_probability": 0.1, | ||
"allow_anonymous_contributors": false | ||
}, | ||
"email_notif": false, | ||
"owners_ids": [ | ||
1 | ||
], | ||
"links": [ | ||
"<link rel='category' title='category' href='http://localhost:5000/api/category?oid=1'/>" | ||
], | ||
"link": "<link rel='self' title='project' href='http://localhost:5000/api/project?oid=13'/>" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Update a project by project id | ||
--- | ||
tags: | ||
- name: project | ||
parameters: | ||
- name: oid | ||
in: path | ||
type: number | ||
required: true | ||
description: the project id | ||
- name: project_info | ||
in: body | ||
type: ojbect | ||
properties: | ||
name: | ||
type: string | ||
short_name: | ||
type: string | ||
description: | ||
type: string | ||
long_description: | ||
type: string | ||
published: | ||
type: boolean | ||
task_presenter: | ||
type: string | ||
required: true | ||
description: the new project info | ||
|
||
responses: | ||
200: | ||
description: new project info | ||
schema: | ||
$ref: '#definitions/Project' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,14 @@ | ||
Delete a task | ||
--- | ||
tags: | ||
- name: task | ||
parameters: | ||
- name: oid | ||
in: path | ||
type: number | ||
required: true | ||
description: the task id | ||
responses: | ||
200: | ||
description: deleted task info | ||
schema: | ||
$ref: '#definitions/Task' | ||
examples: | ||
{ | ||
"info": { | ||
"company": "Bloomberg", | ||
"task": "2", | ||
"set_id": "2" | ||
}, | ||
"fav_user_ids": null, | ||
"user_pref": { | ||
}, | ||
"n_answers": 1, | ||
"quorum": 0, | ||
"links": [ | ||
"<link rel='parent' title='project' href='https://qa.gigwork.net/api/project/2454'/>" | ||
], | ||
"calibration": 0, | ||
"expiration": null, | ||
"created": "2021-04-30T21:56:30.632483", | ||
"worker_filter": null, | ||
"state": "completed", | ||
"gold_answers": null, | ||
"link": "<link rel='self' title='task' href='https://qa.gigwork.net/api/task/7225337'/>", | ||
"exported": true, | ||
"project_id": 2454, | ||
"worker_pref": null, | ||
"id": 7225337, | ||
"priority_0": 0.99 | ||
} | ||
204: | ||
description: successfully deleted task | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
Get task information by task id | ||
--- | ||
tags: | ||
- name: task | ||
definitions: | ||
Task: | ||
type: object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.