Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Api end point for create new object in asset for JSM server

Suseendran Rajkumar February 5, 2024

we need end point for JSM server for create abjects.

2 answers

1 accepted

0 votes
Answer accepted
Manne Kjærby - ProProces
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2024

Hi Suseendran.

You can do it like this

POST /rest/assets/1.0/object/create

{

    "objectTypeId": 1,

    "attributes": [

        {

            "objectTypeAttributeId": 2,

            "objectAttributeValues": [

                {

                    "value": "Hello"

                }

            ]

        }

    ]

}

 

The objectTypeId you can find by looking in browser when you are on a object or by clicking configure on at objecttype.

The objectTypeAttributeId you can find when you go to a objecttype and click on the Attributes tab, then the first column will show you the id.

Beaware if you are on a older version of assets then the api might look like this instead:

/rest/insight/1.0/object/create

You can find full overview of assets rest api here and what precise api to use depending on your version.

https://confluence.atlassian.com/servicemanagementserver/assets-rest-api-documentation-1044101761.html

Suseendran Rajkumar February 6, 2024

Hi Manne,

{

    "objectTypeId": 1,

    "attributes": [

        {

            "objectTypeAttributeId": 2,

            "objectAttributeValues": [

                {

                    "value": "Hello"

                }

            ]

        }

    ]

}

But payload i used got error, need exmple payload for create object can you help me for this.

0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2024

[deleted]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events