Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Rest API Item Duplicate Check

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Naveed
768 Views, 2 Replies

Rest API Item Duplicate Check

How can we check with REST API using .net if item already exist in selected workspace. I tried using the search call to find specific item in a workspace but it always return empty no result. here is my request url and jason. can you please help. thanks https://mytenant.autodeskplm360.net/api/rest/v1/workspaces/8/items/search var Jason = @"{ 'pageNo': 1, 'pageSize': 10, 'logicClause': 'OR', 'fields': [ { 'fieldID':'NUMBER', 'fieldTypeID':0 } ], 'sort': [ { 'fieldID':'NUMBER', 'fieldTypeID':0, 'sortDescending':false } ], 'filter': [ { 'fieldID':'NUMBER', 'fieldTypeID':0, 'filterType' : { 'filterID' : 2 }, 'filterValue':'P2' } ] }";
2 REPLIES 2
Message 2 of 3
tony.mandatori
in reply to: Naveed

The URL and the payload look correct.

 

I tried a similar request through postman using the following:

 

{
  "pageNo": 1,
  "pageSize": 100,
  "logicClause": "AND",
  "fields": [
    {
      "fieldID": "NUMBER",
      "fieldTypeID": 0
    }
  ],
  "sort": [
    {
      "fieldID": "NUMBER",
      "fieldTypeID": 0,
      "sortDescending": true
    }
  ],
  "filter": [
    {
      "fieldID": "NUMBER",
      "fieldTypeID": 0,
      "filterType": {
        "filterID": 2
      },
      "filterValue": "001"
    }
  ]
}

 

The only difference i see is the following:

  1. Use of double quotes vs single quotes.
  2. the variable wraps the Json data in @"..";

 

Note that you need to provide headers to the server doing this post. 

  • Content-Type = application/json

 

Have you tried this in Postman to see if it reveals any other issues?

Message 3 of 3
Naveed
in reply to: tony.mandatori

thanks for your reply mange to fix it. as you mentioned it was double quote issue.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report