JsonSimplePost

<< Fare clic per visualizzazione il sommario >>

Percorso:  API di piattaforma > Altri servizi > Rest >

JsonSimplePost

Service

Rest

 

Method

JsonSimplePost

 

Description

Invokes a REST service with the POST method and returns a dataset containing the fields of the Json structure returned by the REST invocation.

 

Input

Name

Description

Type

Optional

baseUrl

The base url of the REST service (ex.: “https://api.twitter.com/1.1/”).

Required, unless specified in the “BaseUrl” configuration field.

String

 

resource

The resource (ex.: “statuses/show.json”).

Required, unless specified in the “Resource” configuration field.

String

 

data

A Key/Value pair collection of parameters to post (ex.: “id”, “210462857140252672”, “trim_user”, “true”).

Dataset

 

contentType

The media type of the request (ex.: “application/x-www-form-urlencoded”, “text/plain”; see http://en.wikipedia.org/wiki/MIME_type).

Defaults to the “ContentType” configuration field, if specified.

String

 

fields

A list containing the names of the first-level fields to return in the Dictionary; a null or empty list implies that all fields are returned.

List of string

 

jsonFieldNames

A list containing the names of fields (regardless of the level) that have to be mapped to the corresponding fields specified in the dictionaryFieldNames list; a null or empty list implies that the field names in the Json structure will be used as keys in the returned dataset.

List of string

 

dictionaryFieldNames

A list containing the names of the dictionary keys corresponding to the field names specified in the jsonFieldNames list; a null or empty list implies that the field names in the Json structure will be used as keys in the returned dataset.

List of string

 

valuesIfNull

A Key/Value pair collection containing values to assign to the specified fields if their returned value is null.

Example: if valuesIfNull contains

“first_name”, “”

“trim_user”, false

the returned Dataset will have

any field named “first_name” (at any level) valued with “” instead of null

and any field named “trim_user” (at any level) valued with false instead of null.

Dataset

 

Output

Name

Description

Type

Optional

returnValue

A Dataset containing the fields of the Json structure returned by the REST invocation.

Dataset

 

 

Remarks

If only the complete url is available (not its baseUrl and resource parts), it can be passed in anyone of the two parameters (baseUrl or resource) leaving the other empty.

The jsonFieldNames and dictionaryFieldNames lists must have the same number of elements. As an example, if jsonFieldNames[0] = "pageid" and dictionaryFieldNames[0] = "PageNumber", the "pageid" field in the Json structure will be returned as the "PageNumber" field in the dataset; fields not present in the jsonFieldNames list will retain their names in the returned dataset.