-
Notifications
You must be signed in to change notification settings - Fork 10
/
swagger.json
1 lines (1 loc) · 16.7 KB
/
swagger.json
1
{"swagger":"2.0","info":{"version":"Alpha","title":"BC Gov Hub API service","description":"The .Net Core API for the Hub"},"paths":{"/api/Activities/Forecast/{numDays}":{"get":{"tags":["Activities"],"operationId":"GetActivityForecast","consumes":[],"produces":[],"parameters":[{"name":"numDays","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Activity"}}},"304":{"description":"Redirect"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]}},"/api/Activities/{id}":{"get":{"tags":["Activities"],"operationId":"GetActivity","consumes":[],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Activity"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]},"put":{"tags":["Activities"],"operationId":"UpdateActivity","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"},{"name":"activity","in":"body","required":false,"schema":{"$ref":"#/definitions/Activity"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Activity"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/Activities":{"post":{"tags":["Activities"],"operationId":"AddActivity","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["application/json"],"parameters":[{"name":"activity","in":"body","required":false,"schema":{"$ref":"#/definitions/Activity"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/Activity"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/":{"get":{"tags":["Home"],"operationId":"Index","consumes":[],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Success"}}}},"/api/Messages":{"get":{"tags":["Messages"],"operationId":"GetAllMessages","consumes":[],"produces":[],"parameters":[{"name":"IsPublished","in":"query","required":false,"type":"boolean","default":true}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}}},"304":{"description":"Redirect"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]},"post":{"tags":["Messages"],"operationId":"AddMessage","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["application/json"],"parameters":[{"name":"message","in":"body","required":false,"schema":{"$ref":"#/definitions/Message"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/Message"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/Messages/{id}":{"get":{"tags":["Messages"],"operationId":"GetMessage","consumes":[],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"string","format":"uuid"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Message"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]},"put":{"tags":["Messages"],"operationId":"UpdateMessage","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"string","format":"uuid"},{"name":"message","in":"body","required":false,"schema":{"$ref":"#/definitions/Message"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Message"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]},"delete":{"tags":["Messages"],"operationId":"DeleteMessage","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"string","format":"uuid"}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/Ministries":{"get":{"tags":["Ministries"],"operationId":"GetAllMinistries","consumes":[],"produces":[],"parameters":[],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Ministry"}}},"304":{"description":"Redirect"},"400":{"description":"Bad Request"}}}},"/api/Posts/{newsreleaseid}/logs/{postKey}":{"get":{"tags":["PostLogs"],"operationId":"GetPostLogs","consumes":[],"produces":[],"parameters":[{"name":"postKey","in":"path","required":true,"type":"string"},{"name":"newsreleaseid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/PostLog"}}}}}},"/api/Posts/{newsreleaseid}/logs":{"post":{"tags":["PostLogs"],"operationId":"AddPostLog","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":[],"parameters":[{"name":"logEntry","in":"body","required":false,"schema":{"$ref":"#/definitions/PostLog"}},{"name":"newsreleaseid","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Success"}}}},"/api/Posts":{"get":{"tags":["Posts"],"operationId":"GetAllPosts","consumes":[],"produces":[],"parameters":[{"name":"PageNumber","in":"query","required":false,"type":"integer","format":"int32"},{"name":"PageSize","in":"query","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Post"}}},"400":{"description":"Bad Request"}}},"post":{"tags":["Posts"],"operationId":"AddPost","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["application/json"],"parameters":[{"name":"post","in":"body","required":false,"schema":{"$ref":"#/definitions/Post"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/Post"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/Posts/Latest/{numDays}":{"get":{"tags":["Posts"],"operationId":"GetLatestPosts","consumes":[],"produces":[],"parameters":[{"name":"numDays","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Post"}}},"304":{"description":"Redirect"},"400":{"description":"Bad Request"}}}},"/api/Posts/{key}":{"get":{"tags":["Posts"],"operationId":"GetPost","consumes":[],"produces":[],"parameters":[{"name":"key","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Post"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}}},"put":{"tags":["Posts"],"operationId":"UpdatePost","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":[],"parameters":[{"name":"key","in":"path","required":true,"type":"string"},{"name":"post","in":"body","required":false,"schema":{"$ref":"#/definitions/Post"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Post"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/SocialMediaPosts":{"get":{"tags":["SocialMediaPosts"],"operationId":"GetAllSocialMediaPosts","consumes":[],"produces":[],"parameters":[],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/SocialMediaPost"}}},"304":{"description":"Redirect"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]},"post":{"tags":["SocialMediaPosts"],"operationId":"AddSocialMediaPost","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["application/json"],"parameters":[{"name":"socialMediaPost","in":"body","required":false,"schema":{"$ref":"#/definitions/SocialMediaPost"}}],"responses":{"201":{"description":"Success","schema":{"$ref":"#/definitions/SocialMediaPost"}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/SocialMediaPosts/{id}":{"get":{"tags":["SocialMediaPosts"],"operationId":"GetSocialMediaPost","consumes":[],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"string","format":"uuid"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/SocialMediaPost"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]},"put":{"tags":["SocialMediaPosts"],"operationId":"UpdateSocialMediaPost","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"string","format":"uuid"},{"name":"socialMediaPost","in":"body","required":false,"schema":{"$ref":"#/definitions/SocialMediaPost"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/SocialMediaPost"}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]},"delete":{"tags":["SocialMediaPosts"],"operationId":"DeleteSocialMediaPost","consumes":[],"produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"string","format":"uuid"}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["WriteAccess"]}]}},"/api/UserPreferences":{"get":{"tags":["UserPreferences"],"operationId":"GetUserMinistryPreferences","consumes":[],"produces":[],"parameters":[],"responses":{"200":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"type":"string"}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]},"post":{"tags":["UserPreferences"],"operationId":"AddUserMinistryPreference","consumes":[],"produces":["application/json"],"parameters":[{"name":"ministryKeys","in":"query","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi","uniqueItems":false}],"responses":{"201":{"description":"Success","schema":{"uniqueItems":false,"type":"array","items":{"type":"string"}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"oauth2":["ReadAccess"]}]}}},"definitions":{"Activity":{"required":["details","schedule","significance"],"type":"object","properties":{"id":{"format":"int32","type":"integer"},"startDateTime":{"format":"date-time","type":"string"},"endDateTime":{"format":"date-time","type":"string"},"potentialDates":{"type":"string"},"title":{"type":"string"},"details":{"maxLength":500,"minLength":0,"type":"string"},"hqComments":{"maxLength":2000,"minLength":0,"type":"string"},"schedule":{"maxLength":500,"minLength":0,"type":"string"},"significance":{"maxLength":500,"minLength":0,"type":"string"},"strategy":{"maxLength":500,"minLength":0,"type":"string"},"comments":{"maxLength":4000,"minLength":0,"type":"string"},"leadOrganization":{"maxLength":2000,"minLength":0,"type":"string"},"contactMinistryAbbreviation":{"type":"string"},"contactMinistryKey":{"type":"string"},"venue":{"maxLength":150,"minLength":0,"type":"string"},"cityName":{"type":"string"},"otherCity":{"maxLength":150,"minLength":0,"type":"string"},"isActive":{"type":"boolean"},"isConfirmed":{"type":"boolean"},"isConfidential":{"type":"boolean"},"isIssue":{"type":"boolean"},"isAllDay":{"type":"boolean"},"hqSection":{"format":"int32","type":"integer"},"nrDateTime":{"format":"date-time","type":"string"},"lastUpdatedDateTime":{"format":"date-time","type":"string"},"categories":{"uniqueItems":false,"type":"array","items":{"type":"string"}},"ministriesSharedWith":{"uniqueItems":false,"type":"array","items":{"type":"string"}}}},"Message":{"required":["title"],"type":"object","properties":{"id":{"format":"uuid","type":"string"},"title":{"type":"string"},"description":{"type":"string"},"sortOrder":{"format":"int32","type":"integer"},"isHighlighted":{"type":"boolean"},"isPublished":{"type":"boolean"},"timestamp":{"format":"date-time","type":"string"}}},"Ministry":{"type":"object","properties":{"id":{"format":"uuid","type":"string"},"key":{"type":"string"},"sortOrder":{"format":"int32","type":"integer"},"displayName":{"type":"string"},"abbreviation":{"type":"string"},"isActive":{"type":"boolean"},"ministerEmail":{"type":"string"},"ministerPhotoUrl":{"type":"string"},"ministerPageHtml":{"type":"string"},"timestamp":{"format":"date-time","type":"string"},"miscHtml":{"type":"string"},"miscRightHtml":{"type":"string"},"twitterUsername":{"type":"string"},"flickrUrl":{"type":"string"},"youtubeUrl":{"type":"string"},"audioUrl":{"type":"string"},"facebookEmbedHtml":{"type":"string"},"youtubeEmbedHtml":{"type":"string"},"audioEmbedHtml":{"type":"string"},"topReleaseId":{"format":"uuid","type":"string"},"featureReleaseId":{"format":"uuid","type":"string"},"ministerAddress":{"type":"string"},"ministerName":{"type":"string"},"ministerSummary":{"type":"string"},"parentId":{"format":"uuid","type":"string"},"ministryUrl":{"type":"string"},"contactUserId":{"format":"int32","type":"integer"},"secondContactUserId":{"format":"int32","type":"integer"},"weekendContactNumber":{"type":"string"},"eodFinalizedDateTime":{"format":"date-time","type":"string"},"eodLastRunUserId":{"format":"int32","type":"integer"},"eodLastRunDateTime":{"format":"date-time","type":"string"},"displayAdditionalName":{"type":"string"}}},"PostLog":{"required":["description"],"type":"object","properties":{"dateTime":{"format":"date-time","type":"string"},"description":{"maxLength":255,"type":"string"},"postKey":{"type":"string"},"userName":{"type":"string"}}},"Post":{"required":["key"],"type":"object","properties":{"kind":{"type":"string"},"timestamp":{"format":"date-time","type":"string"},"key":{"maxLength":255,"type":"string"},"reference":{"type":"string"},"summary":{"type":"string"},"location":{"type":"string"},"leadMinistryKey":{"type":"string"},"leadMinistryName":{"type":"string"},"ministryKeys":{"uniqueItems":false,"type":"array","items":{"type":"string"}},"ministries":{"uniqueItems":false,"type":"array","items":{"type":"string"}},"publishDateTime":{"format":"date-time","type":"string"},"isCommitted":{"type":"boolean"},"assetUrl":{"type":"string"},"documents":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Document"}}}},"Document":{"type":"object","properties":{"pageTitle":{"type":"string"},"languageId":{"format":"int32","type":"integer"},"headline":{"type":"string"},"subheadline":{"type":"string"},"bodyHtml":{"type":"string"},"byline":{"type":"string"},"contacts":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/DocumentContact"}}}},"DocumentContact":{"type":"object","properties":{"title":{"type":"string"},"details":{"type":"string"}}},"SocialMediaPost":{"required":["url"],"type":"object","properties":{"id":{"format":"uuid","type":"string"},"url":{"type":"string"},"sortOrder":{"format":"int32","type":"integer"},"timestamp":{"format":"date-time","type":"string"}}}},"securityDefinitions":{"oauth2":{"flow":"implicit","authorizationUrl":"https://login.microsoftonline.com/6fdb5200-3d0d-4a8a-b036-d3685e359adc/oauth2/v2.0/authorize","scopes":{"openid":"openid login scope","profile":"profile scope","email":"email scope"},"type":"oauth2"}}}