Hi,
After searching through the forums, I couldn't find a reliable answer to this question. I am trying to find an API call (or series of calls), be it SOAP or REST, which returns the Keywords assigned to a Performance when given a performance ID.
I know the REST API does not have full parity with the SOAP API currently, but I am comfortable using an intermediary solution in the meantime. I am also aware there are a few calls which allow for a Keyword Filter, but that is not the solution, unless it involves using Keywords as the base controller for displaying performances, which doesn't sound very ingegrated or reasonable.
Any suggestions are welcome.
Thanks!
When I wanted that data, I had to build my own using a "Local Table". (/Custom in REST). Just remember that your view needs to pull in inherited values from higher production elements.
Previous iterations of the site I was working on had literally done filter searches for each performance keyword being used and then spooled through the results to find out if the performance in question was one of them! Blech.
Oh, forgot. For REST you'll have to use Custom/Execute and a stored procedure. The REST API, alas, doesn't support views.
Ah, that's a shame.
Theoretically.. could you just build a custom prodecure and run that on the Custom call rather than building a table? Or does the API require a table?
Cheers
Yes, that's what you will have to do: create a stored procedure and access it with Custom/Execute.
You can use views with the SOAP API, but I think it's best to build anything new in REST where possible.
Great!
Do you have the link to the documentation for setting up a custom stored procedure for use with the API (SOAP or REST)? I vaguely remember having to register the procedure but I'm having some trouble calling it through REST.
Any resrouces are much appriciated, thank ya.
Documentation for REST Custom/Execute is spotty, so I hope this will cover it:
Yeah, thankfully I have access to the developer site. This helps, I wish I could remember where I saw the documentation for your Steps 1-3, as it went into a little more detail how to structure those things. But, like you said, the API documentation seems to kind of be all over the place.
I haven't developed a way to issue POST requests through my current iteration of code (only GET is working at the moment), and I'm a little confused on how to format the "Body" content in JSON for the request.
I appriciate the help, Gawain.
Because the Request is not called in the URI, would this be an example of the correct URI call to invoke a POST?
BTW, I am using some of the code from the PHP API Wrapper.
$args = array( 'request_method' => 'POST', 'ProcedureId' => '56', 'Parameters' => '@sessionKey=123456&@perf_id=5994' ); $var = tessitura_rest_call('Custom/Execute', $args);
Edit:
Got the call working in Postman!
However, something wrong on my PHP code, getting a error in response.
Unexpected end of file.
I'm thinking something wrong with the JSON encoding in curl, will post an update.
That was my next question: "how you were going to consume it?" You might look into cURL if PHP is your thing, but perhaps someone from the network can help you with this API Wrapper thing.
I haven't done any PHP in ages, but if I'm reading the first few lines correctly it's actually setting the request method to GET regardless of what you pass in.
Ah, good. I'm afraid my ability to help you likely ends here.