API Integration With Http Request using Datasetkey

Hi Team,

i try to get the data using http request activity

how to pass DatasetKey in UiPath.

I have check and key are working in postman software…

suggest me.

Thanks
Shyam

To pass a DatasetKey in UiPath using the HTTP Request activity, you need to add it as a parameter in the request. Here’s a step-by-step guide on how to do that:

  1. First, make sure you have the UiPath.Web.Activities package installed. If you haven’t already, go to the “Manage Packages” section in UiPath Studio and install the UiPath.Web.Activities package.
  2. Drag and drop an HTTP Request activity into your sequence.
  3. Set the EndPoint, Method, ContentType, and any other required properties for the HTTP request.
  4. To pass the DatasetKey, select the appropriate method:

a. HTTP Headers: If the DatasetKey is part of an authorization header:

  1. In UiPath, click on the “Headers” property of the HTTP Request activity.
  2. Click on the three dots “…” to open the “String Dictionary Editor.”
  3. Set the “Name” as “Authorization” (or the appropriate header name) and the “Value” as the authorization format followed by your DatasetKey (i.e., “Bearer <your_dataset_key>”). Click “OK” to save.

b. URL Parameters: If the DatasetKey is passed as a URL parameter:

  1. In UiPath, click on the “Parameters” property of the HTTP Request activity.
  2. Click on the three dots “…” to open the “String Dictionary Editor.”
  3. Set the “Name” as the parameter name (i.e., “datasetkey”) and the “Value” as your DatasetKey. Click “OK” to save.

c. Request Body: If the DatasetKey is part of the request body:

  1. Create a JSON object string that includes the DatasetKey (e.g., "{""DatasetKey"": ""your_dataset_key""}").
  2. Set the “Body” property of the HTTP Request activity to the JSON object string.

5.Give a variable to the “Result” property of the HTTP Request activity to store the response.
6.Execute the workflow, and the HTTP Request activity should now work with your DatasetKey.

If you are still having issues, verify if the API you are consuming requires any additional headers, parameters, or values in the request body. Also, double-check if the API URL, request method, and content type are correct.

Hi @marian.platonov

Thanks for the response.

Do you have any demo xmal file for this?

Thanks
Shyam

No, I don’t have one.

In Postman, you can check how it is looking the HTTP code snippet, then you need to adapt it in your HTTP Request activity.

Okey, i will try

if any issue i will ping u.

Thanks
Shyam

Can you help me to create sample file xmal file in above methods

error:
image

Thanks
Shyam

If you are an Enterprise customer, raise a ticket with support.

i am community user…

In that case, provide all the details of the working Postman request in this thread and somebody will try to help.

Hi,

Refer the screenshot attached. in the postman software i can able to get data.

image

Plz tell me how to do in Http request to get the data using UiPath.

Thanks
Shyam

As I already mentioned, check your Postman code snippet for hints.

Choose your UiPath project language in the Postman, and see how should look all the needed parameters (especially the Headers, Body, Method, Body Type, etc.). Then adapt the same in UiPath Studio HTTP Request.

Can you share xaml file…I am confused.

For a C# project.

Body:

@"{
" + "\n" +
      @"""api_key"": ""my_API_KEY"",
" + "\n" +
      @"""dataSetKey"": ""my_DATASET_KEY""
" + "\n" +
      @"}"

1 Like

Hi @marian.platonov

Thanks :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.