@@ -480,11 +480,11 @@ def discovery_handler(self):
480480 response [key ] = self .config .get (key )
481481 default_api_root , api_roots = self .persistence .get_api_roots ()
482482 if default_api_root :
483- response ["default" ] = f"/{ default_api_root .id } /"
484- response ["api_roots" ] = [f"/{ api_root .id } /" for api_root in api_roots ]
483+ response ["default" ] = f"/taxii2/ { default_api_root .id } /"
484+ response ["api_roots" ] = [f"/taxii2/ { api_root .id } /" for api_root in api_roots ]
485485 return make_taxii2_response (response )
486486
487- @register_handler (r"^/(?P<api_root_id>[^/]+)/$" , handles_own_auth = True )
487+ @register_handler (r"^/taxii2/ (?P<api_root_id>[^/]+)/$" , handles_own_auth = True )
488488 def api_root_handler (self , api_root_id ):
489489 try :
490490 api_root = self .persistence .get_api_root (api_root_id = api_root_id )
@@ -503,7 +503,7 @@ def api_root_handler(self, api_root_id):
503503 response ["description" ] = api_root .description
504504 return make_taxii2_response (response )
505505
506- @register_handler (r"^/(?P<api_root_id>[^/]+)/status/(?P<job_id>[^/]+)/$" )
506+ @register_handler (r"^/taxii2/ (?P<api_root_id>[^/]+)/status/(?P<job_id>[^/]+)/$" )
507507 def job_handler (self , api_root_id , job_id ):
508508 try :
509509 job , job_details = self .persistence .get_job_and_details (
@@ -531,7 +531,7 @@ def job_handler(self, api_root_id, job_id):
531531 }
532532 return make_taxii2_response (response )
533533
534- @register_handler (r"^/(?P<api_root_id>[^/]+)/collections/$" , handles_own_auth = True )
534+ @register_handler (r"^/taxii2/ (?P<api_root_id>[^/]+)/collections/$" , handles_own_auth = True )
535535 def collections_handler (self , api_root_id ):
536536 try :
537537 api_root = self .persistence .get_api_root (api_root_id = api_root_id )
@@ -561,7 +561,7 @@ def collections_handler(self, api_root_id):
561561 return make_taxii2_response (response )
562562
563563 @register_handler (
564- r"^/(?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/$" ,
564+ r"^/taxii2/ (?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/$" ,
565565 handles_own_auth = True ,
566566 )
567567 def collection_handler (self , api_root_id , collection_id_or_alias ):
@@ -589,7 +589,7 @@ def collection_handler(self, api_root_id, collection_id_or_alias):
589589 return make_taxii2_response (response )
590590
591591 @register_handler (
592- r"^/(?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/manifest/$" ,
592+ r"^/taxii2/ (?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/manifest/$" ,
593593 handles_own_auth = True ,
594594 )
595595 def manifest_handler (self , api_root_id , collection_id_or_alias ):
@@ -634,7 +634,7 @@ def manifest_handler(self, api_root_id, collection_id_or_alias):
634634 )
635635
636636 @register_handler (
637- r"^/(?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/objects/$" ,
637+ r"^/taxii2/ (?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/objects/$" ,
638638 ("GET" , "POST" ),
639639 valid_content_types = ("application/taxii+json;version=2.1" ,),
640640 handles_own_auth = True ,
@@ -726,7 +726,7 @@ def objects_post_handler(self, api_root_id, collection_id_or_alias):
726726 )
727727
728728 @register_handler (
729- r"^/(?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/objects/(?P<object_id>[^/]+)/$" ,
729+ r"^/taxii2/ (?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)/objects/(?P<object_id>[^/]+)/$" ,
730730 ("GET" , "DELETE" ),
731731 handles_own_auth = True ,
732732 )
@@ -807,7 +807,7 @@ def object_delete_handler(self, api_root_id, collection_id_or_alias, object_id):
807807
808808 @register_handler (
809809 (
810- r"^/(?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)"
810+ r"^/taxii2/ (?P<api_root_id>[^/]+)/collections/(?P<collection_id_or_alias>[^/]+)"
811811 r"/objects/(?P<object_id>[^/]+)/versions/$"
812812 ),
813813 handles_own_auth = True ,
0 commit comments