Skip to content
Developer home
X3

Other scripts in our use cases

  Less than to read

  • Upload a file - Get presigned URL:

    • Using auto-increment index for filename parameter

      Postman script

    • Using variable to assign the presigned URL for uploading file, this API call does not need an access token

      Postman script

    • Using Tests script (which is executed after API call) to assign the presigned URL for uploading file

      // example using response assertions
      pm.test("response should be okay to process", function () {
          pm.response.to.not.be.error;
          var responseJson = pm.response.json();
          pm.expect(responseJson.uploadUrl).to.not.be.null;
          pm.environment.set('presignedUUrl', responseJson.uploadUrl);
          pm.environment.set('order', 1+Number(pm.environment.get('order')));
      });
      

      Postman script