# List Publications GET /api/v2/publications/ List publications accessible to the user, filtered by workspace permissions. Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/publications/standalone-publications-list-2 ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v2/publications/: get: operationId: standalone-publications-list-2 summary: List Publications description: >- List publications accessible to the user, filtered by workspace permissions. tags: - subpackage_publications parameters: - name: created_at in: query required: false schema: type: string format: date - name: description in: query required: false schema: type: string - name: logged_in in: query required: false schema: type: boolean - name: name in: query required: false schema: type: string - name: ordering in: query description: >- Comma separated list of ordering fields. Prefix with - for descending. required: false schema: type: string - name: owner in: query required: false schema: type: string - name: page in: query description: A page number within the paginated result set. required: false schema: type: integer - name: page_size in: query description: Number of results to return per page. required: false schema: type: integer - name: q in: query description: Full-text search across key fields required: false schema: type: string - name: search in: query description: A search term. required: false schema: type: string - name: selected_studio in: query description: ID of a specific studio to prioritize at the top of the list. required: false schema: type: integer - name: username in: query required: false schema: type: string - name: visibility in: query description: |- * `public` - Public * `private` - Private * `team` - Team * `org` - Organization required: false schema: $ref: '#/components/schemas/ApiV2PublicationsGetParametersVisibility' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/PaginatedPublicationListList' components: schemas: ApiV2PublicationsGetParametersVisibility: type: string enum: - org - private - public - team title: ApiV2PublicationsGetParametersVisibility MinimalOwnerDetail: type: object properties: profile_picture: type: - string - 'null' format: uri bio: type: - string - 'null' country: type: - string - 'null' phone: type: - string - 'null' linkedin_url: type: - string - 'null' format: uri github_url: type: - string - 'null' format: uri twitter_url: type: - string - 'null' format: uri website_url: type: - string - 'null' format: uri top_domain_elo: type: number format: double top_domain_rank: type: integer title: MinimalOwnerDetail MinimalOwner: type: object properties: id: type: integer username: type: string description: >- Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. email: type: string format: email full_name: type: string is_verified: type: boolean followers_count: type: integer details: type: array items: $ref: '#/components/schemas/MinimalOwnerDetail' required: - id - username - email - followers_count - details description: >- Minimal user serializer for use in PublicationSerializers owner details field. Replicates v1 MinimalUserPublicSerializer. title: MinimalOwner GlobalVisibilityEnum: type: string enum: - public - private - team - org description: |- * `public` - Public * `private` - Private * `team` - Team * `org` - Organization title: GlobalVisibilityEnum PublicationList: type: object properties: id: type: integer uid: type: string format: uuid name: type: string description: type: string owner: type: string description: >- Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. owner_name: type: string owner_details: $ref: '#/components/schemas/MinimalOwner' custom_url: type: string logo: type: - string - 'null' format: uri cover_image: type: - string - 'null' format: uri visibility: $ref: '#/components/schemas/GlobalVisibilityEnum' is_default: type: boolean description: Whether this is the user's default publication is_premium: type: boolean description: Whether this is a premium publication is_verified: type: boolean description: Whether this publication has been verified allow_bookings: type: boolean workspace: type: - integer - 'null' description: >- Workspace (DGM Group) this publication belongs to. Null for legacy publications. workspace_id: type: integer creator_cal_username: type: - string - 'null' experiences_count: type: integer experiences_by_type: type: object additionalProperties: type: integer subscribed: type: boolean logged_in_user_is_cocreator: type: boolean theme: type: string subscribers_count: type: integer created_at: type: string format: date-time updated_at: type: string format: date-time deleted_at: type: - string - 'null' format: date-time required: - id - uid - name - owner - owner_name - owner_details - custom_url - workspace - workspace_id - creator_cal_username - experiences_count - experiences_by_type - subscribed - logged_in_user_is_cocreator - theme - subscribers_count - created_at - updated_at - deleted_at title: PublicationList PaginatedPublicationListList: type: object properties: count: type: integer next: type: - string - 'null' format: uri previous: type: - string - 'null' format: uri results: type: array items: $ref: '#/components/schemas/PublicationList' required: - count - results title: PaginatedPublicationListList ``` ## SDK Code Examples ```python import requests url = "https://api.example.com/api/v2/publications/" payload = {} headers = {"Content-Type": "application/json"} response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/api/v2/publications/'; const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v2/publications/" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.example.com/api/v2/publications/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.example.com/api/v2/publications/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://api.example.com/api/v2/publications/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/api/v2/publications/"); var request = new RestRequest(Method.GET); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v2/publications/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```