inputFile (File Filter)
    • PDF

    inputFile (File Filter)

    • PDF

    Article Summary

    概要

    • inputFile APIは、「File Safer」の「File Filter」で提供する機能で、分析のためのファイルを送信する APIです。
    • この APIは NAVERクラウドプラットフォームで使用する IAM認証と API Gatewayを通して使用できます。

    リクエスト

    MethodRequest URI
    POSThttps://filesafer.apigw.ntruss.com/filefilter/v1/inputFile
    FormatMultipart-form

    リクエストヘッダ

    ヘッダ名説明
    x-ncp-apigw-timestamp1970年1月1日 00:00:00協定世界時(UTC)からの経過時間をミリ秒(Millisecond)で表したもの
    API Gatewayサーバとの時間差が5分以上の場合は無効なリクエストとみなす
    x-ncp-apigw-api-keyAPI Gatewayから発行されたキー
    x-ncp-iam-access-keyNAVERクラウドプラットフォームから発行された API Keyまたは IAMから発行された AccessKey
    x-ncp-apigw-signature-v2リクエストパスとヘッダを AccessKeyとマッピングされる SecretKeyで暗号化した署名として
    HMAC暗号化アルゴリズムは HmacSHA256を使用

    IAM認証が必要な APIを呼び出すを参照
    acceptjsonを指定
    application/json
    Content-Typemultipartであることを指定
    multipart/form-data

    リクエストパラメータ

    パラメータ名要否タイプ説明
    fileYesfile分析リクエスト対象ファイル(送信対象ファイル)
    archivePasswordNostring圧縮パスワード

    レスポンス

    レスポンスボディ

    フィールド名要否タイプ説明
    returnCodeYesstringリクエストに対する処理結果コード
    returnMessageYesstringリクエストに対する処理結果メッセージ

    リクエスト例

    curl -X POST "https://filesafer.apigw.ntruss.com/filefilter/v1/inputFile"
       -H "accept: application/json"
       -H "Content-Type: multipart/form-data"
       -H "x-ncp-apigw-api-key: {x-ncp-apigw-api-key}"
       -H "x-ncp-iam-access-key: {x-ncp-iam-access-key}"
       -H "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}"
       -H "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}"
       -d {"archivePassword":{password},"file":{binary}}
    

    レスポンス例

    {
      "returnCode": "0",
      "returnMessage": "success"
    }
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.