{"type":"api","title":"Add one or more static routes","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/d1c072e8-3151-3b90-a574-d773df736b16","info":{"title":"Crosswork ZTP Service API","description":"Crosswork ZTP Service API for devices, profiles, serial numbers, and static routes. These APIs permit users to add, update, delete, query, and perform bulk CSV import/export of devices and device onboarding operations using ZTP services.","version":"7.1.0","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/EMF/ztp-service-api-overview.md"}},"openapi":"3.0.1","servers":[{"url":"/crosswork/ztp/v1"}],"securitySchemes":{"bearerAuth":{"description":"Security definitions details.","in":"header","name":"Authorization","type":"apiKey"}}},"spec":{"operationId":"AddStaticRoute","requestBody":{"content":{"application/json":{"schema":{"description":"Static Route list add request object.","properties":{"staticroutes":{"description":"List of Static Route objects.","items":{"description":"Static Route add request object.","properties":{"mask":{"description":"Static Route network mask.","type":"string"},"subnet":{"description":"Static Route subnet.","type":"string"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpStaticRoutePostRequest"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpStaticRoutePostList"},"example":{"staticroutes":[{"subnet":"10.3.2.0","mask":"24"}]}}},"description":"The information used to add a static route for ZTP device subnet","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Static Route response object.","properties":{"code":{"description":"Response code. Indicates success/failure.","format":"int32","type":"integer"},"message":{"description":"Response message. Indicates success/failure reason.","type":"string"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpStaticRoutePostResponse"},"examples":{"Success Response":{"value":{"code":201,"message":"Add static route is initiated. Updating the status."}},"Invalid Input":{"value":{"code":400,"message":"Add Multiple Routes Not Supported"}},"Invalid Request Body":{"summary":"Invalid Request Body","value":{"code":422,"message":"invalid character '}' looking for beginning of value"},"$$ref":"#/components/examples/Invalid_Request_Body"},"Service Unavailable":{"value":{"code":503,"message":"Sorry, ztp service is in maintenance mode. Only read operations are supported."}}}}},"description":"OK. The request was successful. The result is contained in the response body."},"401":{"description":"Unauthorized. The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"description":"Forbidden. The server recognizes the authentication credentials, but the client is not authorized to perform this request."},"404":{"description":"Not Found. The client made a request for a resource that does not exist."}},"summary":"Add one or more static routes","description":"This API adds one or more static routes for a ZTP device subnet. Request Body: ZtpStaticRoutePostList. Response Body is ZtpStaticRoutePostResponse.","tags":["Static Route APIs"],"__originalOperationId":"AddStaticRoute","security":[{"bearerAuth":[]}],"method":"post","path":"/staticroute"}}