API Documentation
AISpectra
<GET> Job Metadata
2 min
get api/ais/v1 5/job detail tab examples url https api aws boschaishield com prod api ais v1 5 job detail name job metadata method get request pathparameters name job id kind required type string description enter uniquely created job id received during model analysis children queryparameters headerparameters kind required name x api key type string children description enter your api key kind required name org id type string children description enter your organization key bodydataparameters formdataparameters results languages id kc2y4qjqrpau4tyk2ivhe code 200 ok returns a json object containing the job details for every stage of vulnerability analysis defense generation language 200 customlabel id wtbayihuwetawq1mkfitv code 400 bad request error returns an error message if the application cannot or will not process the request due to something that is perceived to be a client error for example malformed request syntax invalid request message framing etc language 400 customlabel id y3j22yktojdz ruvvp0se language 403 code 403 forbidden returns an error message if access to the target resource has been denied for example if x api key value is incorrect or not given customlabel id lzcztbzdxv2ti7qffrgk4 language 412 code 412 precondition failed returns an error message if access to the target resource has been denied for example if any of the parameter value is incorrect or license has expired customlabel id ae4qrpxxn2sc 4wsmvz4l language 429 code 429 too many requests returns an error message if the user has sent too many requests example 15 20 requests in 1 seconds in a given amount of time customlabel selectedlanguageid ae4qrpxxn2sc 4wsmvz4l examples languages id kbsebk47rc8esswkphsw language python code import requests n njobid enter job id nurl https api aws boschaishield com prod api ais v1 5 job detail?job id jobid n npayload nheaders n x api key n org id n n nresponse requests request get url headers headers data payload n nprint response text customlabel id taxcr4mbz18akgldje0ce language curl code jobid enter job id ncurl location request get https api aws boschaishield com prod api ais v1 5 job detail?job id jobid n header accept application json n header x api key n header org id n customlabel id ty5lakndu2drinqjy2zjx language nodejs code var request require request ; n njobid enter job id nvar options n method get n url https api aws boschaishield com prod api ais v1 5 job detail?job id jobid n headers n x api key n org id n n ; nrequest options function error response n if error throw new error error ; n console log response body ; n ; n customlabel id irx lvpaol0wybdgrpqf language javascript code var myheaders new headers ; nmyheaders append x api key ; nmyheaders append org id ; n nvar requestoptions n method get n headers myheaders n redirect follow n ; n njobid enter job id n nfetch https api aws boschaishield com prod api ais v1 5 job detail?job id jobid requestoptions n then response response text n then result console log result n catch error console log error error ; customlabel selectedlanguageid kbsebk47rc8esswkphsw description the job status api allows you to fetch metadata for a given job id currentnewparameter label path parameter value pathparameters job id to get the job meta data, enter the job id you recevied during model analysis for example, response for image classification job meta data contains e g , attack type, encryption strategy, input dimensions, model information, data normalization, number of attack queries, vulnerability threshold, etc for using nodejs sample code, install npm package request given ample code for python is tested for python version 3 7 given sample code for nodejs and javascript is tested for node v20lts