I'm using GitLab 15.3.1 version and I'd like to obtain, using GitLab API, the label added date for a project issue.
This information is available from GitLab web browser interface as shown below
Is there any way to obtain that "11/10/2022 2.44pm" via API for that issue?
Thank you in advance
You can get Label events for a single Issue with the List project issue label events API.
Here's an example using this Issue:
curl --header 'Authorization: Bearer xxxTOKENxxx' https://gitlab.com/api/v4/projects/278964/issues/378378/resource_label_events | jq '.'
Response:
[
{
"id": 192875035,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:51:15.420Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 17963221,
"name": "application performance::active",
"description": " Any issues that group::application performance has scheduled and is working on. They are in the build phase of the product development flow.",
"description_html": " Any issues that group::application performance has scheduled and is working on. They are in the build phase of the product development flow.",
"text_color": "#FFFFFF",
"color": "#69D100"
},
"action": "add"
},
{
"id": 192875036,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:51:15.420Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 10690783,
"name": "group::application performance",
"description": "Issues belonging to the Application Performance group (formerly known as Memory) of the Enablement stage of the DevOps lifecycle. See https://about.gitlab.com/handbook/product/categories/#application-performance-group",
"description_html": "Issues belonging to the Application Performance group (formerly known as Memory) of the Enablement stage of the DevOps lifecycle. See https://about.gitlab.com/handbook/product/categories/#application-performance-group",
"text_color": "#333333",
"color": "#A8D695"
},
"action": "add"
},
{
"id": 192875037,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:51:15.420Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 15119514,
"name": "type::maintenance",
"description": "Upkeeping efforts and catch-up corrective improvements that are not Feature nor Bugs. Read more at https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification",
"description_html": "Upkeeping efforts and catch-up corrective improvements that are not Feature nor Bugs. Read more at https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification",
"text_color": "#FFFFFF",
"color": "#330066"
},
"action": "add"
},
{
"id": 192875043,
"user": {
"id": 1786152,
"username": "gitlab-bot",
"name": "🤖 GitLab Bot 🤖",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/1786152/avatar.png",
"web_url": "https://gitlab.com/gitlab-bot"
},
"created_at": "2022-10-19T08:51:16.579Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 25316145,
"name": "devops::data_stores",
"description": "Issues for the Systems stage of the DevOps lifecycle (Memory, Database, Global Search, Sharding)",
"description_html": "Issues for the Systems stage of the DevOps lifecycle (Memory, Database, Global Search, Sharding)",
"text_color": "#FFFFFF",
"color": "#E44D2A"
},
"action": "add"
},
{
"id": 192875044,
"user": {
"id": 1786152,
"username": "gitlab-bot",
"name": "🤖 GitLab Bot 🤖",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/1786152/avatar.png",
"web_url": "https://gitlab.com/gitlab-bot"
},
"created_at": "2022-10-19T08:51:16.579Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 14918396,
"name": "section::enablement",
"description": "Issues related to the Enablement section",
"description_html": "Issues related to the Enablement section",
"text_color": "#FFFFFF",
"color": "#F0AD4E"
},
"action": "add"
},
{
"id": 192875250,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:52:13.714Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 2526320,
"name": "workflow::in dev",
"description": "Issues that are actively being worked on by a developer",
"description_html": "Issues that are actively being worked on by a developer",
"text_color": "#FFFFFF",
"color": "#428BCA"
},
"action": "add"
},
{
"id": 192875320,
"user": {
"id": 9671578,
"username": "rzwambag",
"name": "Roy Zwambag",
"state": "active",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/9671578/avatar.png",
"web_url": "https://gitlab.com/rzwambag"
},
"created_at": "2022-10-19T08:52:28.908Z",
"resource_type": "Issue",
"resource_id": 117155410,
"label": {
"id": 2526320,
"name": "workflow::in dev",
"description": "Issues that are actively being worked on by a developer",
"description_html": "Issues that are actively being worked on by a developer",
"text_color": "#FFFFFF",
"color": "#428BCA"
},
"action": "remove"
}
]
Related
I am using STRAPI with custom rich text editor. I setup from this docs
Now If I write more than 234 word I gives ValidationError in console.
I am trying to increase max text limit but I am not sure it is possible or not and from where we can increase word limit.
Here is I am using STRAPI version v3.6.2
{
"name": "ValidationError",
"value": {
"id": 1,
"title": "news1 edited",
"description": "<p>asssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddDDSDSFd</p>",
"published_at": "2021-11-17T07:19:43.837Z",
"created_by": {
"registrationToken": null,
"lastname": "user",
"preferedLanguage": null,
"blocked": null,
"resetPasswordToken": null,
"isActive": true,
"username": "username",
"id": 1,
"firstname": "user",
"email": "user#email.com"
},
"updated_by": {
"registrationToken": null,
"lastname": "user",
"preferedLanguage": null,
"blocked": null,
"resetPasswordToken": null,
"isActive": true,
"username": "username",
"id": 1,
"firstname": "user",
"email": "user#email.com"
},
"created_at": "2021-11-17T07:09:34.551Z",
"updated_at": "2021-12-06T03:22:38.714Z"
},
"errors": [
"components.Input.error.validation.maxLength"
],
"inner": [
{
"name": "ValidationError",
"value": "<p>asssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddDDSDSFd</p>",
"path": "description",
"type": "max",
"errors": [
"components.Input.error.validation.maxLength"
],
"inner": [],
"message": "components.Input.error.validation.maxLength",
"params": {
"path": "description",
"value": "<p>asssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddDDSDSFd</p>",
"originalValue": "<p>asssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddsdsdsdsdsdsdsdsdsdasssadsdsdsdsdsddDDSDSFd</p>",
"max": 240
}
}
],
"message": "components.Input.error.validation.maxLength"
}
I'm using
Microsoft Teams
Adaptive Cards 1.4
Node.js Bot Framework SDK 4.14.1
I tried the following URL sample with the full-width property.
https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#example-of-a-carousel-collection
But, the property doesn't work.
Is this possible?
My code:
await context.sendActivity({
attachmentLayout: "carousel",
attachments: [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.4",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"size": "extraLarge",
"weight": "bolder",
"text": "Welcome to Employee Connect",
"height": "stretch"
},
{
"type": "TextBlock",
"size": "medium",
"weight": "bolder",
"text": "Add events to your calendar",
"height": "stretch"
},
{
"type": "TextBlock",
"weight": "bolder",
"text": "The bot can send \r\rnotification to remind \r\ryou about the latest \r\revents and trainings.",
"wrap": true,
"height": "stretch"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [],
"height": "stretch"
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [],
"height": "stretch"
}
]
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Let's get started"
}
]
}
},
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.4",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"size": "large",
"weight": "bolder",
"text": "Employee connect"
},
{
"type": "TextBlock",
"text": "The bot can send notifications \r\rto remind you about the latest \r\r events and training",
"wrap": true,
"maxWidth": 2
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [],
"height": "stretch"
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [],
"height": "stretch"
}
]
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Let's get started"
}
]
}
},
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.4",
"msteams": {
"width": "Full"
},
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"size": "large",
"weight": "bolder",
"text": "Employee Connect final"
},
{
"type": "TextBlock",
"weight": "bolder",
"text": "Create and manage your tasks",
"wrap": true
},
{
"type": "TextBlock",
"text": "The app identifies all your pending tasks \r\r and helps you manage everything at \r\r one place.",
"wrap": true
},
{
"type": "TextBlock",
"weight": "bolder",
"text": "Try these commands \r\r- Pending Submissions \r\r- Pending Approvals- My Tools",
"wrap": true,
"height": "stretch"
}
]
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Let's get started"
}
]
}
}
],
});
Result:
We tried to repro this at our end on web client and we were able to use full width adaptive cards in a carousel.
However we see the above issue is repro'ing on desktop, adaptive card is not shown in full width. We have raised it internally.
Desktop :
Web client:
I've reported this issue a while ago to Microsoft, something about the same time this topic was created. They've done a hotfix to have it aligned with an older version (?) but will fix the actual issue later on. You can track it on the following URL where they keep us updated:
https://github.com/MicrosoftDocs/msteams-docs/issues/4394
(I couldn't just add a reply because my reputation is not high enough yet.)
I have a scenario in Gitlab where I would like to ping a particular Slack channel when an MR is opened up for the first time in Gitlab. I've attempted to use rules for triggering when the source is merge_request_event but, unfortunately, this also triggers my job when a new commit is pushed to the open MR.
Is it possible to run a Gitlab CI job once when the MR is initially opened, and never again after that point, even when new commits are added to the MR?
ping:
stage: .pre
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
- 'curl to slack url'
For your use case, you wouldn't be able to use GitLab CI/CD because a Merge Request Pipeline is started when a Merge Request is opened, a commit is pushed to the source branch of the Merge Request, or if someone hits the Run Pipeline button from the Pipelines tab on a Merge Request.
Those are the only ways to start a Merge Request pipeline, but any of those will always start a pipeline.
Instead of doing this in CI/CD, your best bet is to create a small application that can listen for GitLab Webhooks, and specifically react to Merge Request events where the action field is open. Here's an example Merge Request Open event from the docs.
{
"object_kind": "merge_request",
"user": {
"id": 1,
"name": "Administrator",
"username": "root",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "admin#example.com"
},
"project": {
"id": 1,
"name":"Gitlab Test",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/gitlabhq/gitlab-test",
"avatar_url":null,
"git_ssh_url":"git#example.com:gitlabhq/gitlab-test.git",
"git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
"namespace":"GitlabHQ",
"visibility_level":20,
"path_with_namespace":"gitlabhq/gitlab-test",
"default_branch":"master",
"homepage":"http://example.com/gitlabhq/gitlab-test",
"url":"http://example.com/gitlabhq/gitlab-test.git",
"ssh_url":"git#example.com:gitlabhq/gitlab-test.git",
"http_url":"http://example.com/gitlabhq/gitlab-test.git"
},
"repository": {
"name": "Gitlab Test",
"url": "http://example.com/gitlabhq/gitlab-test.git",
"description": "Aut reprehenderit ut est.",
"homepage": "http://example.com/gitlabhq/gitlab-test"
},
"object_attributes": {
"id": 99,
"target_branch": "master",
"source_branch": "ms-viewport",
"source_project_id": 14,
"author_id": 51,
"assignee_id": 6,
"title": "MS-Viewport",
"created_at": "2013-12-03T17:23:34Z",
"updated_at": "2013-12-03T17:23:34Z",
"milestone_id": null,
"state": "opened",
"merge_status": "unchecked",
"target_project_id": 14,
"iid": 1,
"description": "",
"source": {
"name":"Awesome Project",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/awesome_space/awesome_project",
"avatar_url":null,
"git_ssh_url":"git#example.com:awesome_space/awesome_project.git",
"git_http_url":"http://example.com/awesome_space/awesome_project.git",
"namespace":"Awesome Space",
"visibility_level":20,
"path_with_namespace":"awesome_space/awesome_project",
"default_branch":"master",
"homepage":"http://example.com/awesome_space/awesome_project",
"url":"http://example.com/awesome_space/awesome_project.git",
"ssh_url":"git#example.com:awesome_space/awesome_project.git",
"http_url":"http://example.com/awesome_space/awesome_project.git"
},
"target": {
"name":"Awesome Project",
"description":"Aut reprehenderit ut est.",
"web_url":"http://example.com/awesome_space/awesome_project",
"avatar_url":null,
"git_ssh_url":"git#example.com:awesome_space/awesome_project.git",
"git_http_url":"http://example.com/awesome_space/awesome_project.git",
"namespace":"Awesome Space",
"visibility_level":20,
"path_with_namespace":"awesome_space/awesome_project",
"default_branch":"master",
"homepage":"http://example.com/awesome_space/awesome_project",
"url":"http://example.com/awesome_space/awesome_project.git",
"ssh_url":"git#example.com:awesome_space/awesome_project.git",
"http_url":"http://example.com/awesome_space/awesome_project.git"
},
"last_commit": {
"id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"message": "fixed readme",
"timestamp": "2012-01-03T23:36:29+02:00",
"url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"author": {
"name": "GitLab dev user",
"email": "gitlabdev#dv6700.(none)"
}
},
"work_in_progress": false,
"url": "http://example.com/diaspora/merge_requests/1",
"action": "open",
"assignee": {
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
}
},
"labels": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"changes": {
"updated_by_id": {
"previous": null,
"current": 1
},
"updated_at": {
"previous": "2017-09-15 16:50:55 UTC",
"current":"2017-09-15 16:52:00 UTC"
},
"labels": {
"previous": [{
"id": 206,
"title": "API",
"color": "#ffffff",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "API related issues",
"type": "ProjectLabel",
"group_id": 41
}],
"current": [{
"id": 205,
"title": "Platform",
"color": "#123123",
"project_id": 14,
"created_at": "2013-12-03T17:15:43Z",
"updated_at": "2013-12-03T17:15:43Z",
"template": false,
"description": "Platform related issues",
"type": "ProjectLabel",
"group_id": 41
}]
}
}
}
The key things here for you are the object_kind field at the top since this will be issue, merge_request, push, tag_push, etc. and we can filter on merge_request. Next, the action field will tell us what happened with the Merge Request. In this example the value is open which means the Merge Request was opened. Other values are close, reopen, update, approved, unapproved, and merge.
Currently, this is the only way to find out if a Merge Request was opened without the other events that start a Merge Request Pipeline.
Okay I am setting up Partial Payments via the Authorize.net API in order to enable multiple cards to be used to cover a single balance/charge.
I'm assuming thier Partial Auth feature covers my use case, but in testing, there is an issue I can show you using the API live console here: https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-credit-card
Go to the link above and authorize partial payments with the request I edited below and you will notice when you press submit you get a splitTenderId:
{
"createTransactionRequest": {
"merchantAuthentication": {
"name": "5KP3u95bQpv",
"transactionKey": "346HZ32z3fP4hTG2"
},
"refId": "123456",
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": "462.25",
"payment": {
"creditCard": {
"cardNumber": "5424000000000015",
"expirationDate": "2020-12",
"cardCode": "999"
}
},
"lineItems": {
"lineItem": {
"itemId": "1",
"name": "vase",
"description": "Cannes logo",
"quantity": "18",
"unitPrice": "45.00"
}
},
"tax": {
"amount": "4.26",
"name": "level2 tax name",
"description": "level2 tax"
},
"duty": {
"amount": "8.55",
"name": "duty name",
"description": "duty description"
},
"shipping": {
"amount": "4.26",
"name": "level2 tax name",
"description": "level2 tax"
},
"poNumber": "456654",
"customer": {
"id": "99999456654"
},
"billTo": {
"firstName": "Ellen",
"lastName": "Johnson",
"company": "Souveniropolis",
"address": "14 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
},
"shipTo": {
"firstName": "China",
"lastName": "Bayles",
"company": "Thyme for Tea",
"address": "12 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
},
"customerIP": "192.168.1.1",
"transactionSettings": {
"setting": [
{
"settingName": "emailCustomer",
"settingValue": "true"
}, {
"settingName": "allowPartialAuth",
"settingValue": "true"
},
]
},
"userFields": {
"userField": [
{
"name": "MerchantDefinedFieldName1",
"value": "MerchantDefinedFieldValue1"
},
{
"name": "favorite_color",
"value": "blue"
}
]
}
}
}
}
This is only successful because the amount is 462.25 as the docs say to use for testing, if I use any other (real) amount the splitTenderId is not there.
Here is a new example request, you can post this again on the link above:
{
"createTransactionRequest": {
"merchantAuthentication": {
"name": "5KP3u95bQpv",
"transactionKey": "346HZ32z3fP4hTG2"
},
"refId": "123456",
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": "462",
"payment": {
"creditCard": {
"cardNumber": "5424000000000015",
"expirationDate": "2020-12",
"cardCode": "999"
}
},
"lineItems": {
"lineItem": {
"itemId": "1",
"name": "vase",
"description": "Cannes logo",
"quantity": "18",
"unitPrice": "45.00"
}
},
"tax": {
"amount": "4.26",
"name": "level2 tax name",
"description": "level2 tax"
},
"duty": {
"amount": "8.55",
"name": "duty name",
"description": "duty description"
},
"shipping": {
"amount": "4.26",
"name": "level2 tax name",
"description": "level2 tax"
},
"poNumber": "456654",
"customer": {
"id": "99999456654"
},
"billTo": {
"firstName": "Ellen",
"lastName": "Johnson",
"company": "Souveniropolis",
"address": "14 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
},
"shipTo": {
"firstName": "China",
"lastName": "Bayles",
"company": "Thyme for Tea",
"address": "12 Main Street",
"city": "Pecan Springs",
"state": "TX",
"zip": "44628",
"country": "USA"
},
"customerIP": "192.168.1.1",
"transactionSettings": {
"setting": [
{
"settingName": "emailCustomer",
"settingValue": "true"
}, {
"settingName": "allowPartialAuth",
"settingValue": "true"
},
]
},
"userFields": {
"userField": [
{
"name": "MerchantDefinedFieldName1",
"value": "MerchantDefinedFieldValue1"
},
{
"name": "favorite_color",
"value": "blue"
}
]
}
}
}
}
And with the 462 amount entered this is no longer a partial auth payment and I no longer get a splitTenderId.
Can someone please help me figure out what is going on?
I have this endpoint with powerState and connectivity properties both retrievable:
{
"endpointId": "123",
"manufacturerName": "abc",
"friendlyName": "lamp",
"description": "lamp",
"displayCategories": [
"LIGHT"
],
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [{
"name": "connectivity"
}],
"retrievable": true
}
}
],
"cookie": {}
}
I respond to ReportState request by sending the state of both properties:
{
"context": {
"properties": [
{
"namespace": "Alexa.PowerController",
"name": "powerState",
"value": "ON",
"timeOfSample": "2019-01-10T10:17:19.99Z",
"uncertaintyInMilliseconds": 50
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2019-01-10T10:17:19.90Z",
"uncertaintyInMilliseconds": 50
}
]
},
"event": {
"header": {
"namespace": "Alexa",
"name": "StateReport",
"payloadVersion": "3",
"messageId": "cde",
"correlationToken": "efg123"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "ab123"
},
"endpointId": "123",
"cookie": {}
},
"payload": {}
}
}
And I send the same context in the PowerController response.
In the Alexa app I can see my device, turn it on and off and view its state rightly. I can ask Alexa to turn on and off my device and the response in "OK", but if I try to ask:** "Is my device turned on?" ** Alexa answers that this device doesn't support that.
The skill language is Italian and PowerController documentation https://developer.amazon.com/it/docs/device-apis/alexa-powercontroller.html says that query is supported.
What am I missing?