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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
16 2 3 5

DSS REST API Delect Instrument from a InstrumentList

In DSS REST API Tree, there's no example about how to delete a Instrument from a Instrument List by 'InstrumentListItemKeys' so can you share the sample REST call to delete dummy item key , 'VjF8MHgwOGY3NTQyZTA1ODlmMmU2fDI'?

'0x08f7542e0589f2e6', dummy IL.

Two attempts below but failed.

  1. POST /RestApi/v1/Extractions/InstrumentLists('0x08f7542e0589f2e6')/DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById('VjF8MHgwOGY3NTQyZTA1ODlmMmU2fDI'), with error '{"error":{"code":"45c6ed8d-2484-48be-9a8b-8f0b277e8b11","message":"The request URI is not valid. The segment 'DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById' cannot include key predicates, however it may end with empty parenthesis."}}'
  2. POST /RestApi/v1/Extractions/InstrumentLists('0x08f7542e0589f2e6')/DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById HTTP/1.1

    with body

    {"InstrumentListItemKeys":"VjF8MHgwOGY3NTQyZTA1ODlmMmU2fDI"}, with error '{"error":{"message":"Invalid request parameter InstrumentListItemKeys"}}'

dss-deleteitembyid.png

#technologydss-rest-apidss
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.

1 Answer

· Write an Answer
Upvote
Accepted
315 2 2 4

Hi @Tony.Zhu_R

POST { {BaseURL}}/Extractions/InstrumentLists('{ {ListId}}')/DataScope.Select.Api.Extractions.InstrumentListDeleteItemsById

requestBody example:

{
    "InstrumentListItemKeys": [
        "{
                {InstrumentListItemKey1}}",
        "{
                {InstrumentListItemKey2}}"
    ]
}

Response should be 204 'No Content'

Best regards,

Gareth

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.