diff --git a/public/api/wekan.html b/public/api/wekan.html index ae45b8e4b..ecd6a790b 100644 --- a/public/api/wekan.html +++ b/public/api/wekan.html @@ -7,7 +7,7 @@ - Wekan REST API v6.85 + Wekan REST API v6.87 @@ -1558,7 +1558,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc @@ -1772,6 +1777,11 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc +
  • + edit_card_custom_field + +
  • +
  • get_list_cards_count @@ -2161,7 +2171,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
    -

    Wekan REST API v6.85

    +

    Wekan REST API v6.87

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    @@ -6281,6 +6291,279 @@ System.out.println(response.toString()); To perform this operation, you must be authenticated by means of one of the following methods: UserSecurity +

    new_checklist_item

    +

    +
    +

    Code samples

    +
    +
    # You can also use wget
    +curl -X POST /api/boards/{board}/cards/{card}/checklists/{checklist}/items \
    +  -H 'Content-Type: multipart/form-data' \
    +  -H 'Accept: application/json' \
    +  -H 'Authorization: API_KEY'
    +
    +
    +
    POST /api/boards/{board}/cards/{card}/checklists/{checklist}/items HTTP/1.1
    +
    +Content-Type: multipart/form-data
    +Accept: application/json
    +
    +
    +
    const inputBody = '{
    +  "title": "string"
    +}';
    +const headers = {
    +  'Content-Type':'multipart/form-data',
    +  'Accept':'application/json',
    +  'Authorization':'API_KEY'
    +};
    +
    +fetch('/api/boards/{board}/cards/{card}/checklists/{checklist}/items',
    +{
    +  method: 'POST',
    +  body: inputBody,
    +  headers: headers
    +})
    +.then(function(res) {
    +    return res.json();
    +}).then(function(body) {
    +    console.log(body);
    +});
    +
    +
    +
    const fetch = require('node-fetch');
    +const inputBody = {
    +  "title": "string"
    +};
    +const headers = {
    +  'Content-Type':'multipart/form-data',
    +  'Accept':'application/json',
    +  'Authorization':'API_KEY'
    +};
    +
    +fetch('/api/boards/{board}/cards/{card}/checklists/{checklist}/items',
    +{
    +  method: 'POST',
    +  body: JSON.stringify(inputBody),
    +  headers: headers
    +})
    +.then(function(res) {
    +    return res.json();
    +}).then(function(body) {
    +    console.log(body);
    +});
    +
    +
    +
    require 'rest-client'
    +require 'json'
    +
    +headers = {
    +  'Content-Type' => 'multipart/form-data',
    +  'Accept' => 'application/json',
    +  'Authorization' => 'API_KEY'
    +}
    +
    +result = RestClient.post '/api/boards/{board}/cards/{card}/checklists/{checklist}/items',
    +  params: {
    +  }, headers: headers
    +
    +p JSON.parse(result)
    +
    +
    +
    import requests
    +headers = {
    +  'Content-Type': 'multipart/form-data',
    +  'Accept': 'application/json',
    +  'Authorization': 'API_KEY'
    +}
    +
    +r = requests.post('/api/boards/{board}/cards/{card}/checklists/{checklist}/items', headers = headers)
    +
    +print(r.json())
    +
    +
    +
    URL obj = new URL("/api/boards/{board}/cards/{card}/checklists/{checklist}/items");
    +HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    +con.setRequestMethod("POST");
    +int responseCode = con.getResponseCode();
    +BufferedReader in = new BufferedReader(
    +    new InputStreamReader(con.getInputStream()));
    +String inputLine;
    +StringBuffer response = new StringBuffer();
    +while ((inputLine = in.readLine()) != null) {
    +    response.append(inputLine);
    +}
    +in.close();
    +System.out.println(response.toString());
    +
    +
    +
    package main
    +
    +import (
    +       "bytes"
    +       "net/http"
    +)
    +
    +func main() {
    +
    +    headers := map[string][]string{
    +        "Content-Type": []string{"multipart/form-data"},
    +        "Accept": []string{"application/json"},
    +        "Authorization": []string{"API_KEY"},
    +    }
    +
    +    data := bytes.NewBuffer([]byte{jsonReq})
    +    req, err := http.NewRequest("POST", "/api/boards/{board}/cards/{card}/checklists/{checklist}/items", data)
    +    req.Header = headers
    +
    +    client := &http.Client{}
    +    resp, err := client.Do(req)
    +    // ...
    +}
    +
    +
    +
     'multipart/form-data',
    +    'Accept' => 'application/json',
    +    'Authorization' => 'API_KEY',
    +);
    +
    +$client = new \GuzzleHttp\Client();
    +
    +// Define array of request body.
    +$request_body = array();
    +
    +try {
    +    $response = $client->request('POST','/api/boards/{board}/cards/{card}/checklists/{checklist}/items', array(
    +        'headers' => $headers,
    +        'json' => $request_body,
    +       )
    +    );
    +    print_r($response->getBody()->getContents());
    + }
    + catch (\GuzzleHttp\Exception\BadResponseException $e) {
    +    // handle exception or api errors.
    +    print_r($e->getMessage());
    + }
    +
    + // ...
    +
    +
    +

    POST /api/boards/{board}/cards/{card}/checklists/{checklist}/items

    +

    add a new item to a checklist

    +
    +

    Body parameter

    +
    +
    title: string
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameInTypeRequiredDescription
    boardpathstringtruethe board ID
    cardpathstringtruethe card ID
    checklistpathstringtruethe ID of the checklist
    bodybodyobjecttruenone
    » titlebodystringtruethe title of the new item
    +

    Detailed descriptions

    +

    board: the board ID

    +

    card: the card ID

    +

    checklist: the ID of the checklist

    +
    +

    Example responses

    +
    +
    +

    200 Response

    +
    +
    {
    +  "_id": "string"
    +}
    +
    +

    Responses

    + + + + + + + + + + + + + + + + + +
    StatusMeaningDescriptionSchema
    200OK200 responseInline
    +

    Response Schema

    +

    Status Code 200

    + + + + + + + + + + + + + + + + + + + +
    NameTypeRequiredRestrictionsDescription
    » _idstringfalsenonenone
    +

    ChecklistItems

    get_checklist_item

    @@ -6471,7 +6754,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    card: the card ID

    checklist: the checklist ID

    @@ -6746,7 +7029,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    card: the card ID

    checklist: the checklist ID

    @@ -6996,7 +7279,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    card: the card ID

    checklist: the checklist ID

    @@ -7232,7 +7515,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the card

    card: the ID of the card

    @@ -7525,7 +7808,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the card

    card: the ID of the card

    @@ -7765,7 +8048,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the card

    card: the ID of the card

    comment: the ID of the comment to retrieve

    @@ -7989,7 +8272,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the card

    card: the ID of the card

    comment: the ID of the comment to delete

    @@ -8231,7 +8514,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    customField: the list ID

    customFieldValue: the value to look for

    @@ -8492,7 +8775,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    Example responses

    @@ -8724,7 +9007,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    list: the list ID

    @@ -9057,7 +9340,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the new card

    list: the list ID of the new card

    @@ -9297,7 +9580,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    list: the list ID of the card

    card: the card ID

    @@ -9861,7 +10144,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the card

    list: the list ID of the card

    card: the ID of the card

    @@ -10104,7 +10387,7 @@ is not put in the recycle bin.

    -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID of the card

    list: the list ID of the card

    card: the ID of the card

    @@ -10163,6 +10446,296 @@ is not put in the recycle bin.

    To perform this operation, you must be authenticated by means of one of the following methods: UserSecurity +

    edit_card_custom_field

    +

    +
    +

    Code samples

    +
    +
    # You can also use wget
    +curl -X POST /api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField} \
    +  -H 'Content-Type: multipart/form-data' \
    +  -H 'Accept: application/json' \
    +  -H 'Authorization: API_KEY'
    +
    +
    +
    POST /api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField} HTTP/1.1
    +
    +Content-Type: multipart/form-data
    +Accept: application/json
    +
    +
    +
    const inputBody = '{
    +  "value": "string"
    +}';
    +const headers = {
    +  'Content-Type':'multipart/form-data',
    +  'Accept':'application/json',
    +  'Authorization':'API_KEY'
    +};
    +
    +fetch('/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}',
    +{
    +  method: 'POST',
    +  body: inputBody,
    +  headers: headers
    +})
    +.then(function(res) {
    +    return res.json();
    +}).then(function(body) {
    +    console.log(body);
    +});
    +
    +
    +
    const fetch = require('node-fetch');
    +const inputBody = {
    +  "value": "string"
    +};
    +const headers = {
    +  'Content-Type':'multipart/form-data',
    +  'Accept':'application/json',
    +  'Authorization':'API_KEY'
    +};
    +
    +fetch('/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}',
    +{
    +  method: 'POST',
    +  body: JSON.stringify(inputBody),
    +  headers: headers
    +})
    +.then(function(res) {
    +    return res.json();
    +}).then(function(body) {
    +    console.log(body);
    +});
    +
    +
    +
    require 'rest-client'
    +require 'json'
    +
    +headers = {
    +  'Content-Type' => 'multipart/form-data',
    +  'Accept' => 'application/json',
    +  'Authorization' => 'API_KEY'
    +}
    +
    +result = RestClient.post '/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}',
    +  params: {
    +  }, headers: headers
    +
    +p JSON.parse(result)
    +
    +
    +
    import requests
    +headers = {
    +  'Content-Type': 'multipart/form-data',
    +  'Accept': 'application/json',
    +  'Authorization': 'API_KEY'
    +}
    +
    +r = requests.post('/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}', headers = headers)
    +
    +print(r.json())
    +
    +
    +
    URL obj = new URL("/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}");
    +HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    +con.setRequestMethod("POST");
    +int responseCode = con.getResponseCode();
    +BufferedReader in = new BufferedReader(
    +    new InputStreamReader(con.getInputStream()));
    +String inputLine;
    +StringBuffer response = new StringBuffer();
    +while ((inputLine = in.readLine()) != null) {
    +    response.append(inputLine);
    +}
    +in.close();
    +System.out.println(response.toString());
    +
    +
    +
    package main
    +
    +import (
    +       "bytes"
    +       "net/http"
    +)
    +
    +func main() {
    +
    +    headers := map[string][]string{
    +        "Content-Type": []string{"multipart/form-data"},
    +        "Accept": []string{"application/json"},
    +        "Authorization": []string{"API_KEY"},
    +    }
    +
    +    data := bytes.NewBuffer([]byte{jsonReq})
    +    req, err := http.NewRequest("POST", "/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}", data)
    +    req.Header = headers
    +
    +    client := &http.Client{}
    +    resp, err := client.Do(req)
    +    // ...
    +}
    +
    +
    +
     'multipart/form-data',
    +    'Accept' => 'application/json',
    +    'Authorization' => 'API_KEY',
    +);
    +
    +$client = new \GuzzleHttp\Client();
    +
    +// Define array of request body.
    +$request_body = array();
    +
    +try {
    +    $response = $client->request('POST','/api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}', array(
    +        'headers' => $headers,
    +        'json' => $request_body,
    +       )
    +    );
    +    print_r($response->getBody()->getContents());
    + }
    + catch (\GuzzleHttp\Exception\BadResponseException $e) {
    +    // handle exception or api errors.
    +    print_r($e->getMessage());
    + }
    +
    + // ...
    +
    +
    +

    POST /api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}

    +

    Edit Custom Field in a Card

    +

    Edit a custom field value in a card

    +
    +

    Body parameter

    +
    +
    value: string
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameInTypeRequiredDescription
    boardpathstringtruethe board ID of the card
    listpathstringtruethe list ID of the card
    cardpathstringtruethe ID of the card
    customFieldpathstringtruethe ID of the custom field
    bodybodyobjecttruenone
    » valuebodystringtruethe new custom field value
    +

    Detailed descriptions

    +

    board: the board ID of the card

    +

    list: the list ID of the card

    +

    card: the ID of the card

    +

    customField: the ID of the custom field

    +
    +

    Example responses

    +
    +
    +

    200 Response

    +
    +
    {
    +  "_id": "string",
    +  "customFields": {}
    +}
    +
    +

    Responses

    + + + + + + + + + + + + + + + + + +
    StatusMeaningDescriptionSchema
    200OK200 responseInline
    +

    Response Schema

    +

    Status Code 200

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeRequiredRestrictionsDescription
    » _idstringfalsenonenone
    » customFieldsobjectfalsenonenone
    +

    get_list_cards_count

    @@ -10338,7 +10911,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    list: the List ID

    @@ -10571,7 +11144,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    swimlane: the swimlane ID

    @@ -11397,7 +11970,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    customField: the ID of the custom field

    Example responses

    @@ -11972,7 +12545,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    customField: the ID of the custom field

    Example responses

    @@ -12966,7 +13539,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    Example responses

    @@ -13306,7 +13879,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    Example responses

    @@ -13538,7 +14111,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    int: the integration ID

    @@ -13832,7 +14405,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    int: the integration ID

    @@ -14065,7 +14638,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    int: the integration ID

    @@ -14298,7 +14871,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    int: the integration ID

    @@ -14552,7 +15125,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    int: the integration ID

    @@ -14768,7 +15341,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    Example responses

    @@ -15035,7 +15608,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    Example responses

    @@ -15267,7 +15840,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    list: the List ID

    @@ -15498,7 +16071,7 @@ The list is not put in the recycle bin.

    -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    list: the ID of the list to remove

    @@ -15807,7 +16380,7 @@ to later change the permissions.

    -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    user: the user ID

    @@ -16081,7 +16654,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the board ID

    user: the user ID

    @@ -16316,7 +16889,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    user: the ID of the user to create token for.

    Example responses

    @@ -17536,7 +18109,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    user: the user ID or username

    Example responses

    @@ -17851,7 +18424,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    user: the user ID

    Example responses

    @@ -18085,7 +18658,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    user: the ID of the user to delete

    Example responses

    @@ -18311,7 +18884,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the ID of the board

    Example responses

    @@ -18578,7 +19151,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the ID of the board

    Example responses

    @@ -18810,7 +19383,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the ID of the board

    swimlane: the ID of the swimlane

    @@ -19031,7 +19604,7 @@ System.out.println(response.toString()); -

    Detailed descriptions

    +

    Detailed descriptions

    board: the ID of the board

    swimlane: the ID of the swimlane

    diff --git a/public/api/wekan.yml b/public/api/wekan.yml index 8b3620cf4..81c24ca72 100644 --- a/public/api/wekan.yml +++ b/public/api/wekan.yml @@ -1,7 +1,7 @@ swagger: '2.0' info: title: Wekan REST API - version: v6.85 + version: v6.87 description: | The REST API allows you to control and extend Wekan with ease. @@ -534,6 +534,53 @@ paths: properties: _id: type: string + /api/boards/{board}/cards/{card}/checklists/{checklist}/items: + post: + operationId: new_checklist_item + summary: add a new item to a checklist + tags: + - Checklists + consumes: + - multipart/form-data + - application/json + parameters: + - name: title + in: formData + description: | + the title of the new item + type: string + required: true + - name: board + in: path + description: | + the board ID + type: string + required: true + - name: card + in: path + description: | + the card ID + type: string + required: true + - name: checklist + in: path + description: | + the ID of the checklist + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string /api/boards/{board}/cards/{card}/checklists/{checklist}/items/{item}: get: operationId: get_checklist_item @@ -2080,6 +2127,63 @@ paths: properties: _id: type: string + /api/boards/{board}/lists/{list}/cards/{card}/customFields/{customField}: + post: + operationId: edit_card_custom_field + summary: Edit Custom Field in a Card + description: | + Edit a custom field value in a card + tags: + - Cards + consumes: + - multipart/form-data + - application/json + parameters: + - name: value + in: formData + description: | + the new custom field value + type: string + required: true + - name: board + in: path + description: | + the board ID of the card + type: string + required: true + - name: list + in: path + description: | + the list ID of the card + type: string + required: true + - name: card + in: path + description: | + the ID of the card + type: string + required: true + - name: customField + in: path + description: | + the ID of the custom field + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string + customFields: + type: object /api/boards/{board}/lists/{list}/cards_count: get: operationId: get_list_cards_count