Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use WebAPI? #864

Closed
Doboo opened this issue Jul 14, 2023 · 14 comments
Closed

How to use WebAPI? #864

Doboo opened this issue Jul 14, 2023 · 14 comments
Labels

Comments

@Doboo
Copy link

Doboo commented Jul 14, 2023

Hi;
I noticed that the latest released version mentions new features: 'New WebAPI' API/getTagValue 'and' API/setTagValue '.

But how can someone help with using this WebAPI?

@unocelli
Copy link
Member

Hi, I hope it can help you...

Set Tag value API
POST /api/setTagValue
Host: localhost:1881
Content-Type: application/json
Cache-Control: no-cache

{
    "tags":[
        {
            "id": "t_2f47264f-b9e4451d",
            "value": "22"
        },
        {
            "id": "t_ea53ed8d-60c5401c",
            "value": "1"
        }

    ]
}

Get Tag value API
GET /api/getTagValue?ids=["t_2f47264f-b9e4451d"]
Host: localhost:1881
Content-Type: application/json
Cache-Control: no-cache

@Doboo
Copy link
Author

Doboo commented Jul 20, 2023

Thanks a lot!

@Doboo
Copy link
Author

Doboo commented Jul 20, 2023

I have tested and there is no problem with “getTagValue” . But when use "setTagValue", the numerical value has already been written, but the prompt message is: error: "not_found" Message: "tag id not found: t_5588a151-0dbf4300; t_080f5955-0fd54761;
I'm a bit confused.

@Doboo
Copy link
Author

Doboo commented Jul 23, 2023

And another question:
How can I use these api wiht token?

@unocelli unocelli added the bug Something isn't working label Jul 23, 2023
@unocelli
Copy link
Member

Hi, currently is not supported, we have a apiKey planned.

@unocelli
Copy link
Member

unocelli commented Aug 8, 2023

@Doboo about the error that you have reported "not_found" Message: "tag id not found: t_5588a151-0dbf4300; t_080f5955-0fd54761;
I suppose that you are try to write in tags that are not found, please check your code.

@unocelli unocelli added awaiting-feedback and removed bug Something isn't working labels Aug 8, 2023
@Doboo
Copy link
Author

Doboo commented Aug 10, 2023

I tested the simultaneous writing of two points, and the values have been successfully written. But the prompt 'tag id not found' is just a bit strange, but it does not affect the use of the function.

1 similar comment
@Doboo
Copy link
Author

Doboo commented Aug 10, 2023

I tested the simultaneous writing of two points, and the values have been successfully written. But the prompt 'tag id not found' is just a bit strange, but it does not affect the use of the function.

@unocelli unocelli added bug Something isn't working and removed awaiting-feedback labels Aug 17, 2023
@unocelli
Copy link
Member

Hi, thanks for the report, We can reproduce it and we will fix it

@unocelli unocelli added fixed and removed bug Something isn't working labels Aug 18, 2023
@unocelli
Copy link
Member

I’m going to close this as resolved. let me know if you have any issues.

@RajatDas2020
Copy link

Hi I want to get and post tag values, from Rest API testing tool. How to expose this tag id "id": "t_2f47264f-b9e4451d" to the outside fuxa ?

@unocelli
Copy link
Member

unocelli commented Aug 1, 2024

@RajatDas2020 look at #650

@RajatDas2020
Copy link

Thank you, but what is the complete url for post , do we need to specify tag in the url itself like get ?
POST /api/setTagValue

@unocelli
Copy link
Member

No you don't need in the url but as parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants