Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,108
Community Members
 
Community Events
168
Community Groups

API response: Metadata must be namespaced

Edited

Hello,

I'm using the manage API of Statuspage.

Currently I'm trying to create incidents programmatically. To be able to identify incidents when accessing them in the future, I'm trying to save an ID in the "metadata" key of the incident. However, when I try to do that, I get the following response:

{
"error":[
"Metadata Metadata must be namespaced"
]
}

 My request entity, the incident, looks like this:

{
"incident": {
"name": "Incident title",
"body": "Something is not working.",
"status": "investigating",
"component_ids": [ "abc123def456" ],
"metadata": {
"my_id": "123456789_test:hello"
}
}
}
 

 Does anybody know what this response means? Can't I use the metadata field?

 

Edit: This page of the API documentation suggests that there is a metadata field.

1 answer

1 accepted

0 votes
Answer accepted

As it turns out, I had to wrap"my_id" inside another object, which represents the namespace:

{
"incident": {
"name": "Incident title",
"body": "Something is not working.",
"status": "investigating",
"component_ids": [ "abc123def456" ],
"metadata": {
"my_namespace: {
"my_id": "123456789_test:hello"
}
}
}
}
 

 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events