| 66 | } |
| 67 | |
| 68 | func GetAPIByID(operatorConfig OperatorConfig, apiName string, apiID string) ([]schema.APIResponse, error) { |
| 69 | httpRes, err := HTTPGet(operatorConfig, "/get/"+apiName+"/"+apiID) |
| 70 | if err != nil { |
| 71 | return nil, err |
| 72 | } |
| 73 | |
| 74 | var apiRes []schema.APIResponse |
| 75 | if err = json.Unmarshal(httpRes, &apiRes); err != nil { |
| 76 | return nil, errors.Wrap(err, "/get/"+apiName+"/"+apiID, string(httpRes)) |
| 77 | } |
| 78 | |
| 79 | return apiRes, nil |
| 80 | } |
| 81 | |
| 82 | func GetBatchJob(operatorConfig OperatorConfig, apiName string, jobID string) (schema.BatchJobResponse, error) { |
| 83 | endpoint := path.Join("/batch", apiName) |