Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

User of the Rest API caller needs the Browse Asset permission to fetch results.

API Definition

Method

POST
URL/rest/jip-api/1.0/index/query.json

Request Headers:

  • Content-Type: application/json
  • Authorization:  Basic hash of user name and password. Example: Basic YWRtaW46YWRtaW4=

Post parameters

ParameterTypeExampleDescription
searchType

String

basic

Fixed value

listType

String

detail

Fixed value

genericKeyword

String


For advanced manual Lucene Query. Leave it null to use queryIndexSearchParams

queryIndexSearchParams
List of QueryIndexSearchParam

List of search criteria
mandatoryQueryIndexSearchParams
List of QueryIndexSearchParam

These search criteria will be "AND" with queryIndexSearchParams 
orForQueryIndexSearchParams

Boolean

true/falseDecides whether there will be "OR" or "AND" between queryIndexSearchParams.
orForMandatoryQueryIndexSearchParams

Boolean

true/falseDecides whether there will be "OR" or "AND" between mandatoryQueryIndexSearchParams.
pageNumber

Integer

1Page number of the results. Results will return as paged.
pageSize

Integer

15Size of page
sortDirection

String

asc/descasc or desc
sortField

String

asset.name

Field to sort. Use system fields or attribute names.

sortType

String

STRING
Use one of search field types.


QueryIndexSearchParam

ParameterTypeExampleDescription
field
StringExternal System IdField to search. Attribute name or System Fields are valid.
keyword
StringAB001Wildcard search is supported. i.e Tom* or Tom?
keywords
List of String["AB", "XDVl", "DRR"]Use this field for LIST, ALL_ASSETS_REF and ASSETS_REF_BY_FORM field types searches.
minNum
Float1 or 10.5Use this field for LONG and DOUBLE field types. For exact search set range to false and use minNum field.

maxNum
Float1 or 10.5Use this field for LONG and DOUBLE field types. For exact search set range to false and use minNum field and set maxNum to null
minDate
String

2019-05-29T11:49

or

2019-05-29

Use this field for DATE and DATE_TIME field types. Use ISO time format.

For exact search set range to false and use minDate field.

maxDate
String

2019-05-29T11:49

or

2019-05-29

Use this field for DATE and DATE_TIME field types. Use ISO time format.

For exact search set range to false and use minDate field and set maxDate to null

relativeMin
String1d or -2w

Use this field for DATE and DATE_TIME field types. This parameter is for a dynamic search. 

-1w is for 1 week earlier when the search is performed.

Set relative to true.

For exact search set range to false and use minDate field.

relativeMax
String3y or -4m

Use this field for DATE and DATE_TIME field types This parameter is for a dynamic search. 

-1w is for 1 week earlier when the search is performed.

Set relative to true.

For exact search set range to false and use minDate field and set maxDate to null

fieldType
String
STRING
One of Search Field Types
relative
booleantrue/falseFor relative date search set "true".
range
booleantrue/falseFor date and numeric RANGE searches. Set "false" for exact search.
searchEmpty
booleantrue/falseSet this field "true" to make Is empty search.
not
booleantrue/falseSet this field "true" to make Not includes search.


Search Field Types

Field Type (use capital case)
LIST
List type of attributes
LIST_OF_LONG
List of long
STRING
Text field
JIRA_USER
Jira User's user key or $currentUser
DATE
Date field without time
DATE_TIME
Date field with time
LONG
Numeric long value, i.e. 1001
DOUBLE
Numeric Double/Float value, i.e. 100.12
ALL_ASSETS_REF
Asset reference attribute type
ASSETS_REF_BY_FORM
Asset reference filtered with asset type attribute type
URL
URL field


System Fields

These fields are available to search and sort.

System Field NameField TypeDescription
asset.content
STRING
Any field. Search for any field including system fields and attributes.
scheme.id
LONG
Asset type scheme id
scheme.name
LIST
Asset type scheme name
form.id
LONG
Asset type ID (formerly FORM)
form.name
LIST
Asset type name (formerly FORM)
asset.id
LONG
Asset ID
asset.name
STRING
Asset name
asset.attachment
STRING
Attachment filename (not content of the file)
asset.creator
STRING
User name of the user how created asset.
asset.created
DATE_TIME
Create date time of asset
asset.status
STRING
The keyword must be a status key.
asset.substatus
STRING
The keyword must be a substatus key.
asset.assignee
JIRA_USER
The keyword must be a user key.
asset.reservedFor
JIRA_USER
The keyword must be a user key.
asset.owner
JIRA_USER
The keyword must be a user key.
asset.managedBy
JIRA_USER
The keyword must be a user key.
asset.quantity
LONG
The keyword must be a number long(without decimals).
asset.assetTag
STRING
The keyword must be text.
asset.serialNumber
STRING
The keyword must be text.
asset.location
LONG
The keyword must be a location ID.
asset.belongsToGroup
STRING
The keyword must be a List of Jira Group in JSON format.
asset.installDate
DATE
The keyword must be Date(without time) in ISO format.
asset.cost
DOUBLE
The keyword must be a number float(with decimals). 
asset.costCurrency
STRING
The keyword must be one of the currencies.
asset.invoiceNumber
STRING
The keyword must be text.

Attributes

TypeDescriptionExample
Asset ListThe keyword must be "name + #ID" of an asset.

"Laptop 1 #167"

Asset List by Asset TypesThe keyword must be "name + #ID" of an asset."Laptop 1 #167"
Cascading DropdownThe keyword must be text.

"1-2"

CheckboxThe keyword must be text.

"Ada"

Date PickerThe keyword must be Date(without time) in ISO format."2020-05-22"
Date Time PickerThe keyword must be Date-time(with time) in ISO format."2020-05-22T13:18"
Dropdown ListThe keyword must be text."Ada"
IPThe keyword must be text."192.168.1.1"
IPv6The keyword must be text."2607:f0d0:1002:0051:0000:0000:0000:0004"
Jira Organizations

The keyword must be text.

"1"

Jira Project

The keyword must be text.

"10000"

Jira Project Components

The keyword must be text.

"10000-1"

Jira Project Versions

The keyword must be text.

"10000-1"

Jira User PickerThe keyword must be a username."tyler-durden"
List BoxThe keyword must be text."Mer"
List Box - MultipleThe keyword must be text.

"Izm"

Number Float(with decimals)The keyword must be number float(with decimals).14.2

Number Long(without decimals)

The keyword must be number long(without decimals).98
Radio ButtonThe keyword must be text."Can"
TextThe keyword must be text."Lorem ipsum dolor sit amet, consectetur adipiscing elit."
Text AreaThe keyword must be text."Lorem ipsum dolor sit amet, consectetur adipiscing elit."
URLThe keyword must be text."https://snapbytes.com/"

Status and Substatus Keys

Status Keys

Display NameKey

In stock

1

In use

2

In transit

3

On order

4

In maintenance

5

Retired

6

Missing

7

Substatus Keys

Display NameKey

Available

1

Reserved

2

Defective

3

Pending repair

4

Pending install

5

Pending disposal

6

Pending transfer

7

Pre-allocated

8

Lost

9

Stolen

10

Examples:

For more examples, you can use Asset Navigator UI to search on screen and then inspect on page. Locate "query" Network call and see Request and Responses. So first do a screen search and find the real example meeting your system and fields.

...