SOLAPI
Search…
이미지 삭제
더 이상 지원하지 않는 API입니다. 스토리지 API를 사용해주세요.

Request

1
DELETE https://api.solapi.com/images/v4/images/:imageId
Copied!
계정의 이미지를 삭제합니다.

Authorization 인증 필요 [?]

계정 권한
회원 권한
계정 상태
회원 상태
계정 인증
images:write
role-images:write
ACTIVE

Path Parameters

Name
Description
:imageId
이미지 ID

Samples

isAdmin 인 경우

Sample Request
1
{}
Copied!
Sample Response
1
{
2
"result": "SUCCESS"
3
}
Copied!
Sample Code
NODE
JQUERY
PHP
PYTHON
CURL
RUBY
GO
JAVA
1
var request = require('request');
2
3
var options = {
4
headers: {
5
Authorization:
6
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4'
7
},
8
method: 'DELETE',
9
json: true,
10
url: 'http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7'
11
};
12
13
request(options, function(error, response, body) {
14
if (error) throw error;
15
console.log('result :', body);
16
});
Copied!
1
var options = {
2
headers: {
3
Authorization:
4
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4'
5
},
6
method: 'DELETE',
7
url: 'http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7'
8
};
9
10
$.ajax(options).done(function(response) {
11
console.log(response);
12
});
Copied!
1
<?php
2
$url = "http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7";
3
4
$options = array(
5
'http' => array(
6
'header' => "Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4\r\n",
7
'method' => 'DELETE'
8
)
9
);
10
11
$context = stream_context_create($options);
12
$result = file_get_contents($url, false, $context);
13
14
var_dump($result);
Copied!
1
import requests
2
3
url = "http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7"
4
headers = {
5
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4"
6
}
7
8
response = requests.delete(url, headers=headers)
9
print(response.status_code)
10
print(response.text)
Copied!
1
#!/bin/bash
2
curl -X DELETE \
3
-H 'Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4' \
4
http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7
Copied!
1
require 'net/http'
2
require 'uri'
3
require 'json'
4
5
uri = URI.parse("http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7")
6
7
headers = {
8
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4"
9
}
10
http = Net::HTTP.new(uri.host, uri.port)
11
request = Net::HTTP::Delete.new(uri.request_uri, headers)
12
13
response = http.request(request)
14
puts response.code
15
puts response.body
Copied!
1
package main
2
3
import (
4
"fmt"
5
"io/ioutil"
6
"net/http"
7
"strings"
8
)
9
10
func main() {
11
uri := "http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7"
12
13
req, err := http.NewRequest("DELETE", uri, nil)
14
if err != nil { panic(err) }
15
16
req.Header.Set("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4")
17
18
client := &http.Client{}
19
resp, err := client.Do(req)
20
if err != nil { panic(err) }
21
defer resp.Body.Close()
22
23
bytes, _ := ioutil.ReadAll(resp.Body)
24
str := string(bytes)
25
fmt.Println(str)
26
}
Copied!
1
package solapi;
2
3
import java.io.BufferedReader;
4
import java.io.DataOutputStream;
5
import java.io.InputStreamReader;
6
import java.net.HttpURLConnection;
7
import java.net.URL;
8
9
public class Request {
10
public static void main(String[] args) throws Exception {
11
String targetUrl = "http://api.solapi.com/images/v4/images/M4V20190820120902K9YFQV2C33JKIV7";
12
13
URL url = new URL(targetUrl);
14
HttpURLConnection con = (HttpURLConnection) url.openConnection();
15
16
con.setRequestMethod("DELETE");
17
18
con.setRequestProperty("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4");
19
20
con.setDoOutput(true);
21
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
22
wr.writeBytes(parameters);
23
wr.flush();
24
wr.close();
25
26
int responseCode = con.getResponseCode();
27
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
28
String line;
29
StringBuffer response = new StringBuffer();
30
while ((line = in.readLine()) != null) {
31
response.append(line);
32
}
33
in.close();
34
35
System.out.println("HTTP response code : " + responseCode);
36
System.out.println("HTTP body : " + response.toString());
37
}
38
}
Copied!

isAdmin 이 아닌 경우

Sample Request
1
{}
Copied!
Sample Response
1
{
2
"result": "SUCCESS"
3
}
Copied!
Sample Code
NODE
JQUERY
PHP
PYTHON
CURL
RUBY
GO
JAVA
1
var request = require('request');
2
3
var options = {
4
headers: {
5
Authorization:
6
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4'
7
},
8
method: 'DELETE',
9
json: true,
10
url: 'http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6'
11
};
12
13
request(options, function(error, response, body) {
14
if (error) throw error;
15
console.log('result :', body);
16
});
Copied!
1
var options = {
2
headers: {
3
Authorization:
4
'HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4'
5
},
6
method: 'DELETE',
7
url: 'http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6'
8
};
9
10
$.ajax(options).done(function(response) {
11
console.log(response);
12
});
Copied!
1
<?php
2
$url = "http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6";
3
4
$options = array(
5
'http' => array(
6
'header' => "Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4\r\n",
7
'method' => 'DELETE'
8
)
9
);
10
11
$context = stream_context_create($options);
12
$result = file_get_contents($url, false, $context);
13
14
var_dump($result);
Copied!
1
import requests
2
3
url = "http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6"
4
headers = {
5
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4"
6
}
7
8
response = requests.delete(url, headers=headers)
9
print(response.status_code)
10
print(response.text)
Copied!
1
#!/bin/bash
2
curl -X DELETE \
3
-H 'Authorization: HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4' \
4
http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6
Copied!
1
require 'net/http'
2
require 'uri'
3
require 'json'
4
5
uri = URI.parse("http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6")
6
7
headers = {
8
"Authorization": "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4"
9
}
10
http = Net::HTTP.new(uri.host, uri.port)
11
request = Net::HTTP::Delete.new(uri.request_uri, headers)
12
13
response = http.request(request)
14
puts response.code
15
puts response.body
Copied!
1
package main
2
3
import (
4
"fmt"
5
"io/ioutil"
6
"net/http"
7
"strings"
8
)
9
10
func main() {
11
uri := "http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6"
12
13
req, err := http.NewRequest("DELETE", uri, nil)
14
if err != nil { panic(err) }
15
16
req.Header.Set("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4")
17
18
client := &http.Client{}
19
resp, err := client.Do(req)
20
if err != nil { panic(err) }
21
defer resp.Body.Close()
22
23
bytes, _ := ioutil.ReadAll(resp.Body)
24
str := string(bytes)
25
fmt.Println(str)
26
}
Copied!
1
package solapi;
2
3
import java.io.BufferedReader;
4
import java.io.DataOutputStream;
5
import java.io.InputStreamReader;
6
import java.net.HttpURLConnection;
7
import java.net.URL;
8
9
public class Request {
10
public static void main(String[] args) throws Exception {
11
String targetUrl = "http://api.solapi.com/images/v4/images/M4V20190820120902JZK6UZ2P5MO0UK6";
12
13
URL url = new URL(targetUrl);
14
HttpURLConnection con = (HttpURLConnection) url.openConnection();
15
16
con.setRequestMethod("DELETE");
17
18
con.setRequestProperty("Authorization", "HMAC-SHA256 apiKey=NCSAYU7YDBXYORXC, date=2019-07-01T00:41:48Z, salt=jqsba2jxjnrjor, signature=1779eac71a24cbeeadfa7263cb84b7ea0af1714f5c0270aa30ffd34600e363b4");
19
20
con.setDoOutput(true);
21
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
22
wr.writeBytes(parameters);
23
wr.flush();
24
wr.close();
25
26
int responseCode = con.getResponseCode();
27
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
28
String line;
29
StringBuffer response = new StringBuffer();
30
while ((line = in.readLine()) != null) {
31
response.append(line);
32
}
33
in.close();
34
35
System.out.println("HTTP response code : " + responseCode);
36
System.out.println("HTTP body : " + response.toString());
37
}
38
}
Copied!
문서 생성일 : 2019-08-20
Last modified 1yr ago