I'm using JSM Asset and trying to create object via REST API
My object has 'Project' type attribute.
When I get this object via REST API, it looks like below :
```
{
"workspaceId": "blahblah",
"globalId": "foo:3127",
"id": "3127",
"objectTypeAttribute": {
"workspaceId": "blahblah",
"globalId": "foo:151",
"id": "151",
"name": "project",
"label": false,
"type": 6,
"description": "JIRA Project",
"editable": true,
"system": false,
"sortable": true,
"summable": false,
"indexed": true,
"minimumCardinality": 0,
"maximumCardinality": 1,
"removable": true,
"hidden": false,
"includeChildObjectTypes": false,
"uniqueAttribute": false,
"options": "",
"position": 4
},
"objectTypeAttributeId": "151",
"objectAttributeValues": [
{
"project": {
"avatarUrl": "https://bar.atlassian.net/rest/api/3/universal_avatar/view/type/project/avatar/10414",
"id": "10224",
"name": "Log Archive Project",
"key": "LOGARC"
},
"displayValue": "Log Archive Project",
"searchValue": "Log Archive Project",
"referencedType": false
}
],
"objectId": "648"
},
```
and I tried to create an object with every possible way
```
{
"objectTypeAttributeId": "151",
"objectAttributeValues": [
{
"value": "LOGARC"
}
]
}
```
```
{
"objectTypeAttributeId": "151",
"objectAttributeValues": [
{
"project":{"key": "LOGARC"}
}
]
},
```
```
{
"objectTypeAttributeId": "151",
"objectAttributeValues": [
{
"searchValue":"Log Archive Project"
}
]
},
```
etc..,
All my attempts were failed.
And I read this article
And I found it didn't mention 'Project' type attribute.
So I wonder how to create the object with 'Project' type attribute via REST API.
Thanks
Wow, I put 'project.id' into the 'objectAttributeValues[].value' then it's succeeded.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.