0

I am trying to send some data to an API.

All information I have is:

ImportUsersFile

Verbs POST

Requires authentication False

Parameters

  • jobName: string
  • token: CancellationToken

The information is given in their site/api.mvc/

Is there any way of knowing, in advance, what format/columns this is expecting?

I wanted to use ImportUsersFile to send some users data to. The API is from the company signinworkspace.

6
  • What' s your question ? Commented Jan 17 at 13:09
  • How to know what it expects... I assume when you send some data through POST to an API, it expects some sort of format, doesnt it? Commented Jan 17 at 13:17
  • 1
    As it is written, i would assume you send the data form-encoded, if you use requests you can easily switch between form-encoded or json Commented Jan 17 at 13:22
  • I read the link. It says “to do this, simply pass a dictionary to the data argument.”. Nice; I can do that. But is is the same true for all POST, regardless of the API?? So I can assume that whatever I send to the API as long as it’s a dictionary it will be received? (I could be wrong; but I was expecting a certain number of key, with specific names) Commented Jan 17 at 13:35
  • 1
    Usually the API defines which format to use, but there are just 2 parameters: jobName, token. The format should be defined somewhere in the API spec or the API can handle both formats form/json. Commented Jan 17 at 13:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.