DESKIE API
Knowledge base
Create a category

POST  |  https://[domain].deskie.io/api/kb_category.json
Create a category.
Parameters
Request

{
  "kb_category" : {
    "category_title" : "Test category"
  }
}

{
  "kb_category" : {
    "category_title" : {
        "1" : "Kategori adı",
        "2" : "Category name"
  }
}
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "kb_category": { "category_title":"Test category" }}' https://[domain].deskie.io/api/kb_category.json
Get a list of categories

GET  |  https://[domain].deskie.io/api/kb_category.json
Get a list of categories.
Parameters
Response

{
    "0" : {
      "kb_category" : {
        "category_id" : 234,
        "category_title" : "Test category 1",
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "kb_category" : {
        "category_id" : 235,
        "category_title" : "Test category 2",
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    },
    "total_count":10
}

{
    "0" : {
      "kb_category" : {
        "category_id" : 234,
        "category_title" : {
            "1" :"Test kategori 1",
            "2" :"Test category 1"
        }
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "kb_category" : {
        "category_id" : 235,
        "category_title" : {
            "1" :"Test kategori 2",
            "2" :"Test category 2"
        }
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    },
    "total_count":10
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/kb_category.json?limit=50&page=2
View a category

GET  |  https://[domain].deskie.io/api/kb_category/[id].json
View a category.
Parameters
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : {
        "1" :"Test kategori 1",
        "2" :"Test category 1"
    }
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/kb_category/234.json
Edit a category

PUT  |  https://[domain].deskie.io/api/kb_category/[id].json
Edit a category.
Parameters
Request

{
  "kb_category" : {
    "category_title" : "Test category 2",
  }
}

{
  "kb_category" : {
    "category_title" : {
        "1" :"Test kategori 2",
        "2" :"Test category 2"
    }
  }
}
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "kb_category": { "category_title":"Test category 2" }}' https://[domain].deskie.io/api/kb_category/234.json
Deactivate a category

PUT  |  https://[domain].deskie.io/api/kb_category/[id]/disable.json
Deactivate a category.
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_category/234/disable.json
 Activate a category

PUT  |  https://[domain].deskie.io/api/kb_category/[id]/enable.json
 Activate a category.
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_category/234/enable.json
Move a category one step up

PUT  |  https://[domain].deskie.io/api/kb_category/[id]/moveup.json
Move a category one step up within the list of categories.
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_category/234/moveup.json
Move a category one step down

PUT  |  https://[domain].deskie.io/api/kb_category/[id]/movedown.json
Move a category one step down within the list of categories.
Response

{
  "kb_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_category/234/movedown.json
Delete a category

DELETE  |  https://[domain].deskie.io/api/kb_category/[id].json
Delete a category.
Response

HTTP Status: 200 OK
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/kb_category/234.json
Create a section

POST  |  https://[domain].deskie.io/api/kb_section.json
Create a section.
Parameters
Request

{
  "kb_section" : {
    "section_title" : "Test section",
    "section_description" : "Test section description",
    "category_id": 1
  }
}

{
  "kb_section" : {
    "section_title" : {
        "1" :"Test bölüm 1",
        "2" :"Test section 1"
    },
    "section_description" : {
        "1" :"Test bölüm açıklaması 1",
        "2" :"Test section description 1"
    },
    "category_id": 1
  }
}
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 1,
    "section_title" : "Test section",
    "section_description" : "Test section description",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "kb_section": { "section_title":"Test section", "section_description":"Test section description", "category_id":1 }}' https://[domain].deskie.io/api/kb_section.json
Get a list of sections

GET  |  https://[domain].deskie.io/api/kb_section.json
Get a list of sections.
Parameters
Response

{
    "0" : {
      "kb_section" : {
        "section_id" : 10,
        "category_id" : 1,
        "section_title" : "Test section",
        "section_description" : "Test section description",
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "kb_section" : {
        "section_id" : 11,
        "category_id" : 1,
        "section_title" : "Test section 2",
        "section_description" : "Test section description 2",
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    },
    "total_count":10
}

{
    "0" : {
      "kb_section" : {
        "section_id" : 10,
        "category_id" : 1,
        "section_title" : {
            "1" :"Test bölüm 1",
            "2" :"Test section 1"
        },
        "section_description" : {
            "1" :"Test bölüm açıklaması 1",
            "2" :"Test section description 1"
        },
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "kb_section" : {
        "section_id" : 11,
        "category_id" : 1,
        "section_title" : {
            "1" :"Test bölüm 2",
            "2" :"Test section 2"
        },
        "section_description" : {
            "1" :"Test bölüm açıklaması 2",
            "2" :"Test section description 2"
        },
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    },
    "total_count":10
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/kb_section.json?category_id=1&limit=50&page=2
View a section

GET  |  https://[domain].deskie.io/api/kb_section/[id].json
View a section.
Parameters
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 1,
    "section_title" : "Test section",
    "section_description" : "Test section description",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 1,
    "section_title" : {
        "1" :"Test bölüm 1",
        "2" :"Test section 1"
    },
    "section_description" : {
        "1" :"Test bölüm açıklaması 1",
        "2" :"Test section description 1"
    },
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/kb_section/10.json
Edit a section

PUT  |  https://[domain].deskie.io/api/kb_section/[id].json
Edit a section.
Parameters
Request

{
  "kb_section" : {
    "section_title" : "Test section 2",
    "section_description" : "Test section 2 description",
    "category_id": 2
  }
}

{
  "kb_section" : {
    "section_title" : {
        "1" :"Test bölüm 2",
        "2" :"Test section 2"
    },
    "section_description" : {
        "1" :"Test bölüm açıklaması 2",
        "2" :"Test section description 2"
    },
    "category_id": 2
  }
}
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 2,
    "section_title" : "Test section 2",
    "section_description" : "Test section description 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "kb_section": { "section_title":"Test section 2", "section_description":"Test section 2 description", "category_id": 2 }}' https://[domain].deskie.io/api/kb_section/10.json
Deactivate a section

PUT  |  https://[domain].deskie.io/api/kb_section/[id]/disable.json
Deactivate a section.
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 2,
    "section_title" : "Test section 2",
    "section_description" : "Test section description 2",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_section/10/disable.json
Activate a section

PUT  |  https://[domain].deskie.io/api/kb_section/[id]/enable.json
Activate a section.
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 2,
    "section_title" : "Test section 2",
    "section_description" : "Test section description 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_section/10/enable.json
Move a section one step up

PUT  |  https://[domain].deskie.io/api/kb_section/[id]/moveup.json
Move a section one step up within the list of sections.
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 2,
    "section_title" : "Test section 2",
    "section_description" : "Test section description 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_section/10/moveup.json
Move a section one step down

PUT  |  https://[domain].deskie.io/api/kb_section/[id]/movedown.json
Move a section one step down within the list of sections.
Response

{
  "kb_section" : {
    "section_id" : 10,
    "category_id" : 2,
    "section_title" : "Test section 2",
    "section_description" : "Test section description 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_section/10/movedown.json
Delete a section

DELETE  |  https://[domain].deskie.io/api/kb_section/[id].json
Delete a section.
Response

HTTP Status: 200 OK
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/kb_section/10.json
Create an article

POST  |  https://[domain].deskie.io/api/kb_article.json
Create an article.
Parameters
Request

{
  "kb_article" : {
    "article_title" : "Test article title",
    "article_content" : "Test article content",
    "article_tags" : "test,article,content",
    "section_id": 10
  }
}

{
  "kb_article" : {
    "article_title" : {
        "1" :"Test makale adı",
        "2" :"Test article title"
    },
    "article_content" : {
        "1" :"Test makale içeriği",
        "2" :"Test article content"
    },
    "article_tags" : {
        "1" :"tag,tag,tag",
        "2" :"tag,tag,tag"
    },
    "section_id": 10
  }
}
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 10,
    "article_title" : "Test article title",
    "article_content" : "Test article content",
    "article_tags" : "tag,tag,tag",
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "kb_article": { "article_title":"Test article title", "article_content":"Test article content", "section_id": 10 }}' https://[domain].deskie.io/api/kb_article.json
Get a list of articles 

GET  |  https://[domain].deskie.io/api/kb_article.json
Get a list of articles .
Parameters
Response

{
    "0" : {
      "kb_article" : {
        "article_id" : 100,
        "section_id" : 10,
        "section_id_arr" : [10, 11], //if the article is in several sections, look at the section_id_arr
        "article_title" : "Test article title 1",
        "article_content" : "Test article content 1",
        "article_tags" : "tag,tag,tag",
        "access_type" : "public",
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "kb_article" : {
        "article_id" : 101,
        "section_id" : 11,
        "article_title" : "Test article title 2",
        "article_content" : "Test article content 2",
        "article_tags" : "tag,tag,tag",
        "access_type" : "public",
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    }
}

{
    "0" : {
      "kb_article" : {
        "article_id" : 100,
        "section_id" : 10, 
        "section_id_arr" : [10, 11], //if the article is in several sections, look at the section_id_arr
         "article_title" : {
            "1" :"Test makale adı 1",
            "2" :"Test article title 1"
        },
        "article_content" : {
            "1" :"Test makale içeriği 1",
            "2" :"Test article content 1"
        },
        "article_tags" : {
            "1" :"tag,tag,tag",
            "2" :"tag,tag,tag"
        },
        "access_type" : "public",
        "active" : true,
        "created_at" : Mon, 05 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
      }
    },
    "1" : {
      "kb_article" : {
        "article_id" : 101,
        "section_id" : 11,
        "article_title" : {
            "1" :"Test makale adı 2",
            "2" :"Test article title 2"
        },
        "article_content" : {
            "1" :"Test makale içeriği 2",
            "2" :"Test article content 2"
        },
        "article_tags" : {
            "1" :"tag,tag,tag",
            "2" :"tag,tag,tag"
        },
        "access_type" : "public",
        "active" : false,
        "created_at" : Mon, 15 May 2014 00:15:17 +0300,
        "updated_at" : Tue, 13 Dec 2014 10:55:23 +0200
      }
    }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/kb_article.json?limit=50&page=2
View an article

GET  |  https://[domain].deskie.io/api/kb_article/[id].json
View an article.
Parameters
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 10,
    "section_id_arr" : [10, 11], //if the article is in several sections, look at the section_id_arr
    "article_title" : "Test article title",
    "article_content" : "Test article content",
    "article_tags" : "tag,tag,tag",
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 10,
    "section_id_arr" : [10, 11], //if the article is in several sections, look at the section_id_arr
    "article_title" : {
        "1" :"Test makale adı",
        "2" :"Test article title"
    },
    "article_content" : {
        "1" :"Test makale içeriği",
        "2" :"Test article content"
    },
    "article_tags" : {
        "1" :"tag,tag,tag",
        "2" :"tag,tag,tag"
    },
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/kb_article/100.json
Edit an article

PUT  |  https://[domain].deskie.io/api/kb_article/[id].json
Edit an article.
Parameters
Request

{
  "kb_article" : {
    "article_title" : "Test article title 2",
    "article_content" : "Test article content 2",
    "article_tags" : "tag,tag_new",
    "section_id": 20
  }
}

{
  "kb_article" : {
    "article_title" : {
        "1" :"Test makale adı 2",
        "2" :"Test article title 2"
    },
    "article_content" : {
        "1" :"Test makale içeriği 2",
        "2" :"Test article content2"
    },
    "article_tags" : {
        "1" :"tag,tag",
        "2" :"tag,tag"
    },
    "section_id": 20
  }
}
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 20,
    "article_title" : "Test article title 2",
    "article_content" : "Test article content 2",
    "article_tags" : "tag,tag_new",
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "kb_article": { "article_title":"Test article title 2", "article_content":"Test article 2 content", "section_id": 20 }}' https://[domain].deskie.io/api/kb_article/100.json
Deactivate an article

PUT  |  https://[domain].deskie.io/api/kb_article/[id]/disable.json
Deactivate an article.
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 20,
    "article_title" : "Test article title 2",
    "article_content" : "Test article content 2",
    "access_type" : "public",
    "active" : false,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_article/100/disable.json
Activate an article

PUT  |  https://[domain].deskie.io/api/kb_article/[id]/enable.json
Activate an article.
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 20,
    "article_title" : "Test article title 2",
    "article_content" : "Test article content 2",
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_article/100/enable.json
Move an article one step up

PUT  |  https://[domain].deskie.io/api/kb_article/[id]/moveup.json
Move an article one step up within the list of articles.
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 20,
    "article_title" : "Test article title 2",
    "article_content" : "Test article content 2",
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_article/100/moveup.json
Move an article one step down

PUT  |  https://[domain].deskie.io/api/kb_article/[id]/movedown.json
Move an article one step down within the list of articles.
Response

{
  "kb_article" : {
    "article_id" : 100,
    "section_id" : 20,
    "article_title" : "Test article title 2",
    "article_content" : "Test article content 2",
    "access_type" : "public",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/kb_article/100/movedown.json
Delete an article

DELETE  |  https://[domain].deskie.io/api/kb_article/[id].json
Delete an article.
Response

HTTP Status: 200 OK
Sample code

curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/kb_article/100.json