API Get Keywords by Performance ID

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!

Parents Reply Children
  • 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:

    1) You register the stored procedure in TR_LOCAL_PROCEDURE, the same as for SOAP.
    2) To use, POST to Custom/Execute (that is to say, [your api server]/TessituraService/Custom/Execute).
    3) Say your id in TR_LOCAL_PROCEDURE was 105, and the procedure had two parameters, @perf_no and @include_interests, you would format the Request like this { "ProcedureId":"105", "Parameters":"@perf_no=3307&@include_interests=N" }
     
     
    Does that make sense?
     
    Further documentation can be found here, but parts of it may be out of date.  I don't know where the canonical REST documentation is supposed to live.  Do you have access to the developer site?
     
    https://developer.tessituranetwork.com/display/devportal/REST+API


    [edited by: Gawain Lavers at 6:34 PM (GMT -6) on 12 Sep 2017]
  •  


    [edited by: Gawain Lavers at 6:31 PM (GMT -6) on 12 Sep 2017]
  • 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.



    [edited by: Cody Palmer at 12:33 PM (GMT -6) on 13 Sep 2017]
  • 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.

     



    [edited by: Gawain Lavers at 12:51 PM (GMT -6) on 13 Sep 2017]
  • Got the call working in Postman!

    Ah, good.  I'm afraid my ability to help you likely ends here.