diff --git a/backoffice/backoffice-domain-service/ballerina/types.bal b/backoffice/backoffice-domain-service/ballerina/types.bal index fb5754b7f4..9042765d5d 100644 --- a/backoffice/backoffice-domain-service/ballerina/types.bal +++ b/backoffice/backoffice-domain-service/ballerina/types.bal @@ -391,7 +391,7 @@ public type APIInfo record { string updatedTime?; boolean hasThumbnail?; # State of the API. Only published APIs are visible on the Developer Portal - string state?; + "CREATED"|"PUBLISHED" state?; }; public type APIExternalStore record { diff --git a/helm-charts/templates/postgres/initdb-conf.yaml b/helm-charts/templates/postgres/initdb-conf.yaml index 68dcfa635c..e94313fc7e 100644 --- a/helm-charts/templates/postgres/initdb-conf.yaml +++ b/helm-charts/templates/postgres/initdb-conf.yaml @@ -403,23 +403,5 @@ data: PRIMARY KEY (CONSUMER_KEY) ); -- End of Non Prod IDP table -- - - -- Insert Backoffice Internal Data -- - INSERT INTO api(uuid, api_name, api_version, context, status, organization, artifact) - VALUES ('01ed75e2-b30b-18c8-wwf2-25da7edd2231', 'Backoffice Test API', '1.0.0', 'test', - 'CREATED', 'a3b58ccf-6ecc-4557-b5bb-0a35cce38256', - '{"id": "01ed75e2-b30b-18c8-wwf2-25da7edd2231", "status": "CREATED", "apiName": "Backoffice Test API", "context": "test", "version": "1.0.0", - "visibility": "PUBLIC", "providerName": "admin", "accessControl": "RESTRICTED", "visibleGroups": null, "accessControlGroups": ["group1"]}'); - - INSERT INTO api_artifact(organization, api_uuid, api_definition, media_type) - VALUES ('a3b58ccf-6ecc-4557-b5bb-0a35cce38256', '01ed75e2-b30b-18c8-wwf2-25da7edd2231', - '\x7b226f70656e617069223a22332e302e30222c22696e666f223a7b227469746c65223a2253616d706c6520415049222c226465736372697074696f6e223a224f7074696f6e616c206d756c74696c696e65206f722073696e676c652d6c696e65206465736372697074696f6e20696e205b436f6d6d6f6e4d61726b5d28687474703a2f2f636f6d6d6f6e6d61726b2e6f72672f68656c702f29206f722048544d4c2e222c2276657273696f6e223a22302e312e39227d2c2273657276657273223a5b7b2275726c223a22687474703a2f2f6170692e6578616d706c652e636f6d2f7631222c226465736372697074696f6e223a224f7074696f6e616c20736572766572206465736372697074696f6e2c20652e672e204d61696e202870726f64756374696f6e2920736572766572227d2c7b2275726c223a22687474703a2f2f73746167696e672d6170692e6578616d706c652e636f6d222c226465736372697074696f6e223a224f7074696f6e616c20736572766572206465736372697074696f6e2c20652e672e20496e7465726e616c2073746167696e672073657276657220666f722074657374696e67227d5d2c227061746873223a7b222f7573657273223a7b22676574223a7b2273756d6d617279223a2252657475726e732061206c697374206f662075736572732e222c226465736372697074696f6e223a224f7074696f6e616c20657874656e646564206465736372697074696f6e20696e20436f6d6d6f6e4d61726b206f722048544d4c2e222c22726573706f6e736573223a7b22323030223a7b226465736372697074696f6e223a2241204a534f4e206172726179206f662075736572206e616d6573222c22636f6e74656e74223a7b226170706c69636174696f6e2f6a736f6e223a7b22736368656d61223a7b2274797065223a226172726179222c226974656d73223a7b2274797065223a22737472696e67227d7d7d7d7d7d7d7d7d7d', - 'HTTP'); - - INSERT INTO api_lc_event (api_uuid,previous_state,new_state,user_uuid,organization,event_date) - VALUES ('01ed75e2-b30b-18c8-wwf2-25da7edd2231', null, 'CREATED', 'apkuser', 'a3b58ccf-6ecc-4557-b5bb-0a35cce38256', - CURRENT_TIMESTAMP AT TIME ZONE 'UTC'); - - -- End of Insert Backoffice Internal Data -- commit; {{ end }} diff --git a/test/cucumber-tests/src/test/resources/tests/api/Visibility.feature b/test/cucumber-tests/src/test/resources/tests/api/Visibility.feature index 2c6d04b8e8..52ebc9563f 100644 --- a/test/cucumber-tests/src/test/resources/tests/api/Visibility.feature +++ b/test/cucumber-tests/src/test/resources/tests/api/Visibility.feature @@ -5,7 +5,7 @@ Feature: API Visibility and Access Control | group1 | When I make the GET APIs call to the backoffice Then the response status code should be 200 - And the response body should contain "\"count\":1" + And the response body should contain "\"count\":0" Scenario: View APIs without a groups claim in the access token Given The system is ready