Is there a way to get a list of the pages in the current space using a REST API?
Why, you may ask?
My customer wants to be able to create a page using an IFTTT macro using a template. If there's already a page with that same name within that same name, they want to flag an error before the page is created. They use a ConfForm to create the page, then I delete the form once the page is created. However, if a form with that same name exists within that space, the onCreate will fail. They want a way to check the uniqueness within the space before that, so that the onCreate doesn't fail. Is there a way to do that from the IFTTT macro? I was thinking a REST API would do the trick.
Thank you in advance!
-Kathleen J
Guess the search endpoint should do the work. You could just send a CQL filtering for the specified space:
https://docs.atlassian.com/ConfluenceServer/rest/8.6.1/#api/search
Best
Stefan
What is the problem with a failed submit? Why could not they retry providing a new name?
But, as @Stefan Salzl mentioned there is an API endpoint you are asking for
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
They don't want the data from the ConfForm stored. They want to use it to create the page, then delete the entry. I explained that normally I would put a validation rule on the ConfiForm field for uniqueness. However, that won't work because they don't want to keep the entry. Then asked the following:
Can the IFTTT check of the page exists right after the users enters the name, before entering any the other information? And if the page exist, pass an error message. If the user tries to create a new page with the same title as an existing page, do not overwrite the existing. The system should create a hard edit: “This item has already been entered. Please verify the name or make updates to the existing item."
The error occurs with the IFTTT macro onCreate, when the page title already exists in the space. I tried it. The page simply doesn't get created, and the ConfiForm entry is still there. I can remove the entry - that's not a problem. If you know another way to check for the existence of the page name within that space either with a Rule or on the Submit, I'm all ears!
Thank you in advance.
-Kathleen J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can set up a form to remove the entry onError (IFTTT to delete an entry, set onError event with a filtering expression set to something like id:[entry.id] to delete the current record only) - so there is nothing left after the failed try.
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alex,
Thanks for the hint. I think I may have found the solution.
Thank you!
-Kathleen J
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.