-
1. Re: Management API For Domain add-content, add Operations
ctomc Jan 23, 2020 7:55 AM (in response to walkerca)1 of 1 people found this helpful -
2. Re: Management API For Domain add-content, add Operations
walkerca Jan 23, 2020 11:04 AM (in response to ctomc)Thanks Tomaz. I don't see in the list of attributes where I would specify the server-groups. When I use the "enabled" and "content" attributes from you link, I'm able to add a JAR to the content repository. But unlike STANADLONE, the JAR isn't deployed anywhere. Is there a follow-up command I need to issue to go from Content Repository -> server-group ?
-
3. Re: Management API For Domain add-content, add Operations
walkerca Jan 23, 2020 11:30 AM (in response to walkerca)Here's my request. It's called after a previous /add-content returns the BYTES_VALUE. Everything works if I remove the server-group field and deploy to STANDALONE.
{
"content":[{"hash": {"BYTES_VALUE" : "Dp7LYVNS/qQhtArfdceQzGhEtLI="}}],
"address": [{"server-group":"main-server-group"},{"deployment":"bitbucket-demo-1.0.jar"}],
"operation":"add",
"enabled":"true"
}
This is the 500 error I get back when using the above request in DOMAIN mode{
"outcome" : "failed",
"failure-description" : {
"domain-failure-description" : "WFLYCTL0216: Management resource '[(\"deployment\" => \"bitbucket-demo-1.0.jar\")]' not found"
},
"rolled-back" : true
}
-
4. Re: Management API For Domain add-content, add Operations
walkerca Jan 23, 2020 11:53 AM (in response to walkerca)This post answers my question: failure to deploy using the http json management api?
You have to do three things to deploy to a domain's server-group
1. Add the content
POST to /add-content
2. Using the BYTES_VALUE from 1, deploy it globally
{
"content":[{"hash": {"BYTES_VALUE" : "Dp7LYVNS/qQhtArfdceQzGhEtLI="}}],
"address": [{"deployment":"bitbucket-demo-1.0.jar"}],
"operation":"add"
}
3. Assign it to a server-group
{
"address": [{"server-group": "main-server-group"}, {"deployment":bitbucket-demo-1.0.jar"}],
"operation":"add",
"enabled":"true"
}