For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 1 2

Getting error while appending identifer to instrument using Http Request

Hi,

When I try to append identifiers through http request, Im getting below error:

{'error': {'message': 'Invalid request parameter Identifiers'}}

Im using below code:

OrderedDict([('Identifiers',OrderedDict([('Identifier','US8180971074'),('IdentifierType','Isin')])),('KeepDuplicates',True)]);

Can anyone help?

pythondss-rest-apidatascope-selectdsshttp
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
11.3k 25 9 14

The value of "Identifiers" needs to be JSON array. Please verify if your HTTP request.

Below is the sample of format. If the value is not JSON array, I get the same error.

{
    "Identifiers": [
        {
            "Identifier": "US8180971074",
            "IdentifierType": "Isin"
        }
    ],
    "KeepDuplicates": true
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

The code should be modified to be JSON arrays as follows.

OrderedDict([('Identifiers',[OrderedDict([('Identifier','US8180971074'),('IdentifierType','Isin')])]),('KeepDuplicates',True)]);

Upvotes
1.1k 5 3 5

One to many OrderedDict()'s I think.

Do you have the JSON that turns into: From the Sample App, this should work:

{
"Identifiers": [{
"Identifier": "IBM.N",
"IdentifierType": "Ric",
"UserDefinedIdentifier": "UserIdent4A"
}],
"KeepDuplicates": false
}

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.