Delete user idea
Delete User Idea
To remove an Idea. Execute this by making a DELETE request to endpoint /api/v0.9/ideas/{id}.
Request Header
Request Headers
Name |
Description |
Type |
Example |
Authorization |
Access token of user. In the format ‘Bearer xxxxxxxxxxx’ |
String |
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImQ1ZjQzYWEwNjFiZGM5NzYwMTQ2ZGY4ZjE2NWMzZTE0NGQ1ZjM0N2Y0OTYyYzEyNzA2OGYzYzlmYzM1N2E5NDNiMWNmNWY4NjZhNTVjMzMzIn0.eyJhdWQiOiIxNjc4NCIsImp0aSI6ImQ1ZjQzYWEwNjFiZGM5NzYwMTQ2ZGY4ZjE2NWMzZTE0NGQ1ZjM0N2Y0OTYyYzEyNzA2OGYzYzlmYzM1N2E5NDNiMWNmNWY4NjZhNTVjMzMzIiwiaWF0IjoxNTAwMzc0MTc4LCJuYmYiOjE1MDAzNzQxNzgsImV4cCI6MTUzMTkxMDE3OCwic3ViIjoiNDg1Iiwic2NvcGVzIjpbXX0.qE5_mShXUftne7i2YHkjiu_LvN626_YYk7dnTfhm7H8VMcDyYvf-a4lw5XZBvXEeMLXsPkyxwXT0XDr9BzR1zZaQf9WU8CuOu_98cBeOIwgrviVtHFPDwo68go9AgI3QNIof6CM37QO_wDkeXQQHF8StG03bzMURvH_eMBmO9GoRexwVsanxtROJWlEuvDgvG9fK28d1376Ff5fkpMMvGWyGLW5EZinpXzhF7UObKTFRQJHHjuTPElKJfiA0eEeQOhCsU5dl5riKjJaAO7248OwXvAXSHZfshrRKb_aQs03OWu2Hq2tWhav8x6_tVKCZmpTlvR6-DAKQJf6_YDF5w3f5Som2yn8kR8lCpB6s2vp9nFnI2TXHCWdUxDvRYm9Vf_bd0qd4fXrSVb2_SYiARC-Tda2yDT4pPRv_6P-30fesB9dU9A3QqeIX47N7iHpIN1stu3MrgFKcZDbhy9ZZqb6a6qjPz2YOvkoWscBDdiBm1TqwTFfREYlUUxJReyjIs4DokuDXUEO60P6F97LbYitjYwd5DaqR94vMPuzcN8sU2Oc9Bpd6iGOc29CCxjdySw1JxdWcZUjzGEE00vuuggXNUNI5W5h0xI1S3OPGXlXNhYEZ1zCDiiIj5YYPU_P4j9xqLKusjrlRBUuJWsLVRy25cb2hX00GJfW7kIr3-rE9xqLKusjrlRBUuJWsLVRy25cb2hX00GJfW7kIr3-rE9xqLKusjrlRBUuJWsLVRy25cb2hX00GJfW7kIr3-rE |
X-Benlly-Request-Device |
Type of the device in use. Available options included
- ios
- android
- web
- infoboard
- windows
|
String |
android |
X-Benlly-Udid |
Unique ID for each device. Could be generated by using SDK. |
String |
7f0abbcd-fb03-4484-aaba-a0211d9c14e2 |
URL Parameters
URL Parameters
Name |
Description |
Type |
Example |
id |
ID of the UserIdea |
Integer |
1 |
Request Parameters
There are no required request parameters.
Response Format
In case of successful, the server will return an UserIdea Object. Response will be of following format :
Sample Response
{
data: {
id: 123,
oauth_client_idea: {
id: 1,
name: 'My Idea',
icon: '/img/default.png',
used: true,
}
trigger: {
id: 22,
schema: {
id: 2,
identifier: "post_with_hashtag",
title: "あなたが特定のハッシュタグつきのツイートをしたら"
items: [
{
"name": "hashtag",
"label"; "ハッシュタグ"
"type": "text",
"max": 128
}
],
keywords: [
{
"name": "id",
"label": "ツイートID",
"type": "text",
},
{
"name": "contents",
"label": "ツイート内容",
"type": "text",
},
{
"name": "posted_at",
"label": "ツイート日時",
"type": "datetime",
}
]
},
title: "あなたが #海 のツイートをしたら",
items: [
{
"name": "hashtag",
"label"; "ハッシュタグ"
"type": "text",
"value": "海",
"max": 128
}
]
},
actions: [
{
id: 12,
title: "ツイートする",
schema: {
id: 1,
identifier: "post",
title: "ツイートする"
items: [
{
"name": "message",
"label"; "ツイート内容"
"type": "text",
"max": 140
}
]
},
items: [
{
"name": "message",
"label"; "ツイート内容"
"type": "text",
"value": "{{投稿内容}}"
"max": 140
}
]
}
],
used: false,
status: "available",
last_executed_at: "2016-10-02T12:15:00+09:00",
last_manual_executed_at: null,
created_at: "2016-10-01T12:30:31+09:00",
updated_at: "2016-10-01T12:30:31+09:00"
}
}
Using SDKs
Delete User Idea with Android SDK
BFChannelModel mBFChannelModel = new BFChannelModel(this);
if (mBFChannelModel.getDeviceType().equals("all")) {
channel.deauthorize(new BFJsonCallback<BFApiResponse>() {
@Override
public void onError(String s) {
}
@Override
public void onSuccess(BFApiResponse response) {
}
});
}
Delete User Idea with Android SDK
// Delete User Idea
// Select Idea
let idea = BFIdeaModel()
// ...
// Delete Idea
idea.delete(success: { (header, response) in
// Handle success
}, fail: { (header, error) in
// Handle error
})
Components of an Idea
Get list Trigger
Getting the list of all available Trigger of a particular Channel. Execute this by making a GET request to endpoint /api/v0.9/channel/{id}/triggers.
Request Header
Request Headers
Name |
Description |
Type |
Example |
Authorization |
Access token of user. In the format ‘Bearer xxxxxxxxxxx’ |
String |
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImQ1ZjQzYWEwNjFiZGM5NzYwMTQ2ZGY4ZjE2NWMzZTE0NGQ1ZjM0N2Y0OTYyYzEyNzA2OGYzYzlmYzM1N2E5NDNiMWNmNWY4NjZhNTVjMzMzIn0.eyJhdWQiOiIxNjc4NCIsImp0aSI6ImQ1ZjQzYWEwNjFiZGM5NzYwMTQ2ZGY4ZjE2NWMzZTE0NGQ1ZjM0N2Y0OTYyYzEyNzA2OGYzYzlmYzM1N2E5NDNiMWNmNWY4NjZhNTVjMzMzIiwiaWF0IjoxNTAwMzc0MTc4LCJuYmYiOjE1MDAzNzQxNzgsImV4cCI6MTUzMTkxMDE3OCwic3ViIjoiNDg1Iiwic2NvcGVzIjpbXX0.qE5_mShXUftne7i2YHkjiu_LvN626_YYk7dnTfhm7H8VMcDyYvf-a4lw5XZBvXEeMLXsPkyxwXT0XDr9BzR1zZaQf9WU8CuOu_98cBeOIwgrviVtHFPDwo68go9AgI3QNIof6CM37QO_wDkeXQQHF8StG03bzMURvH_eMBmO9GoRexwVsanxtROJWlEuvDgvG9fK28d1376Ff5fkpMMvGWyGLW5EZinpXzhF7UObKTFRQJHHjuTPElKJfiA0eEeQOhCsU5dl5riKjJaAO7248OwXvAXSHZfshrRKb_aQs03OWu2Hq2tWhav8x6_tVKCZmpTlvR6-DAKQJf6_YDF5w3f5Som2yn8kR8lCpB6s2vp9nFnI2TXHCWdUxDvRYm9Vf_bd0qd4fXrSVb2_SYiARC-Tda2yDT4pPRv_6P-30fesB9dU9A3QqeIX47N7iHpIN1stu3MrgFKcZDbhy9ZZqb6a6qjPz2YOvkoWscBDdiBm1TqwTFfREYlUUxJReyjIs4DokuDXUEO60P6F97LbYitjYwd5DaqR94vMPuzcN8sU2Oc9Bpd6iGOc29CCxjdySw1JxdWcZUjzGEE00vuuggXNUNI5W5h0xI1S3OPGXlXNhYEZ1zCDiiIj5YYPU_P4j9xqLKusjrlRBUuJWsLVRy25cb2hX00GJfW7kIr3-rE9xqLKusjrlRBUuJWsLVRy25cb2hX00GJfW7kIr3-rE9xqLKusjrlRBUuJWsLVRy25cb2hX00GJfW7kIr3-rE |
X-Benlly-Request-Device |
Type of the device in use. Available options included
- ios
- android
- web
- infoboard
- windows
|
String |
android |
X-Benlly-Udid |
Unique ID for each device. Could be generated by using SDK. |
String |
7f0abbcd-fb03-4484-aaba-a0211d9c14e2 |
URL Parameters
URL Parameters
Name |
Description |
Type |
Example |
id |
ID of the Channel |
Integer |
1 |
Request Parameters
There are no required request parameters.
Response Format
In case of successful, the server will return data, is an array of Trigger Object. Response will be of following format :
Sample Response
{
data: [{
id: 2,
identifier: "post_with_hashtag",
title: "あなたが特定のハッシュタグつきのツイートをしたら"
items: [
{
"name": "hashtag",
"label"; "ハッシュタグ"
"type": "text",
"max": 128
}
],
keywords: [
{
"name": "id",
"label": "ツイートID",
"type": "text",
},
{
"name": "contents",
"label": "ツイート内容",
"type": "text",
},
{
"name": "posted_at",
"label": "ツイート日時",
"type": "datetime",
}
]
}]
}