Improve project api procedures
This commit is contained in:
@@ -93,17 +93,72 @@ Procedures
|
||||
### createProject
|
||||
|
||||
- Purpose: **Create a new project**
|
||||
- Parameters: **name** (string)
|
||||
- Parameters:
|
||||
- **name** (string, required)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "createProject",
|
||||
"id": 1797076613,
|
||||
"params": {
|
||||
"name": "PHP client"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1797076613,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
### getProjectById
|
||||
|
||||
- Purpose: **Get project information**
|
||||
- Parameters: **project_id** (integer)
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- Result on success: **project properties**
|
||||
- Result on failure: **null**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
|
||||
"jsonrpc": "2.0",
|
||||
"method": "getProjectById",
|
||||
"id": 226760253,
|
||||
"params": {
|
||||
"project_id": 1
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 226760253,
|
||||
"result": {
|
||||
"id": "1",
|
||||
"name": "API test",
|
||||
"is_active": "1",
|
||||
"token": "",
|
||||
"last_modified": "1410263246",
|
||||
"is_public": "0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### getProjectByName
|
||||
|
||||
- Purpose: **Get project information**
|
||||
@@ -111,6 +166,36 @@ Procedures
|
||||
- Result on success: **project properties**
|
||||
- Result on failure: **null**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "getProjectByName",
|
||||
"id": 1620253806,
|
||||
"params": {
|
||||
"name": "Test"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1620253806,
|
||||
"result": {
|
||||
"id": "1",
|
||||
"name": "Test",
|
||||
"is_active": "1",
|
||||
"token": "",
|
||||
"last_modified": "0",
|
||||
"is_public": "0"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### getAllProjects
|
||||
|
||||
- Purpose: **Get all available projects**
|
||||
@@ -118,20 +203,233 @@ Procedures
|
||||
- Result on success: **List of projects**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "getAllProjects",
|
||||
"id": 134982303
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 134982303,
|
||||
"result": [
|
||||
{
|
||||
"id": "2",
|
||||
"name": "PHP client",
|
||||
"is_active": "1",
|
||||
"token": "",
|
||||
"last_modified": "0",
|
||||
"is_public": "0"
|
||||
},
|
||||
{
|
||||
"id": "1",
|
||||
"name": "Test",
|
||||
"is_active": "1",
|
||||
"token": "",
|
||||
"last_modified": "0",
|
||||
"is_public": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### updateProject
|
||||
|
||||
- Purpose: **Update a project**
|
||||
- Parameters: Key/value pair composed of the **id** (integer), **name** (string), **is_active** (integer, optional)
|
||||
- Parameters:
|
||||
- **id** (integer, required)
|
||||
- **name** (string, required)
|
||||
- **is_active** (integer, optional)
|
||||
- **token** (string, optional)
|
||||
- **is_public** (integer, optional)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "updateProject",
|
||||
"id": 1853996288,
|
||||
"params": {
|
||||
"id": 1,
|
||||
"name": "PHP client update"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1853996288,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
### removeProject
|
||||
|
||||
- Purpose: **Remove a project**
|
||||
- Parameters: **project_id** (integer)
|
||||
- Parameters:
|
||||
**project_id** (integer, required)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "removeProject",
|
||||
"id": 46285125,
|
||||
"params": {
|
||||
"project_id": "2"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 46285125,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
### enableProject
|
||||
|
||||
- Purpose: **Enable a project**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "enableProject",
|
||||
"id": 1775494839,
|
||||
"params": [
|
||||
"1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1775494839,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
### disableProject
|
||||
|
||||
- Purpose: **Disable a project**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "disableProject",
|
||||
"id": 1734202312,
|
||||
"params": [
|
||||
"1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1734202312,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
### enableProjectPublicAccess
|
||||
|
||||
- Purpose: **Enable public access for a given project**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "enableProjectPublicAccess",
|
||||
"id": 103792571,
|
||||
"params": [
|
||||
"1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 103792571,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
### disableProjectPublicAccess
|
||||
|
||||
- Purpose: **Disable public access for a given project**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- Result on success: **true**
|
||||
- Result on failure: **false**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "disableProjectPublicAccess",
|
||||
"id": 942472945,
|
||||
"params": [
|
||||
"1"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
|
||||
"jsonrpc": "2.0",
|
||||
"id": 942472945,
|
||||
"result": true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -213,9 +511,9 @@ Procedures
|
||||
- Purpose: **Create a new task**
|
||||
- Parameters:
|
||||
- **title** (string, required)
|
||||
- **color_id** (string, required)
|
||||
- **project_id** (integer, required)
|
||||
- **column_id** (integer, required)
|
||||
- **color_id** (string, optional)
|
||||
- **column_id** (integer, optional)
|
||||
- **description** (string, optional)
|
||||
- **owner_id** (integer, optional)
|
||||
- **creator_id** (integer, optional)
|
||||
|
||||
Reference in New Issue
Block a user