> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Get all add requests

GET https://api.getpostman.com/network/private/network-entity/request/all

Gets all requests to add workspaces to your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).

Reference: https://learning.postman.com/api-docs/api-reference/private-api-network/list-private-network-add-requests

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /network/private/network-entity/request/all:
    get:
      operationId: listPrivateNetworkAddRequests
      summary: Get all add requests
      description: >-
        Gets all requests to add workspaces to your team's [Private API
        Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).
      tags:
        - privateApiNetwork
      parameters:
        - name: since
          in: query
          description: >-
            Return only results created since the given time, in [ISO
            8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)
            format. This value cannot be later than the `until` value. To use
            `time-numoffset` format, you must use `%2B` URL-encoding for the `+`
            character.
          required: false
          schema:
            $ref: '#/components/schemas/sinceDateTime'
        - name: until
          in: query
          description: >-
            Return only results created until this given time, in [ISO
            8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)
            format. This value cannot be earlier than the `since` value. To use
            `time-numoffset` format, you must use `%2B` URL-encoding for the `+`
            character.
          required: false
          schema:
            $ref: '#/components/schemas/untilDateTime'
        - name: requestedBy
          in: query
          description: Return a user's requests by their user ID.
          required: false
          schema:
            $ref: '#/components/schemas/panRequestedBy'
        - name: type
          in: query
          description: The `workspace` value.
          required: false
          schema:
            $ref: '#/components/schemas/elementTypeQuery'
        - name: status
          in: query
          description: Filter by the request status.
          required: false
          schema:
            $ref: '#/components/schemas/panRequestStatus'
        - name: name
          in: query
          description: >-
            Return only workspaces whose name includes the given value. Matching
            is not case-sensitive.
          required: false
          schema:
            $ref: '#/components/schemas/panElementName'
        - name: sort
          in: query
          description: >-
            Sort the results by the given value. If you use this query
            parameter, you must also use the `direction` parameter.
          required: false
          schema:
            $ref: '#/components/schemas/sortCreatedUpdatedAt'
        - name: direction
          in: query
          description: >-
            Sort in ascending (`asc`) or descending (`desc`) order. Matching is
            not case-sensitive. If you use this query parameter, you must also
            use the `sort` parameter.
          required: false
          schema:
            $ref: '#/components/schemas/ascDesc'
        - name: offset
          in: query
          description: The zero-based offset of the first item to return.
          required: false
          schema:
            $ref: '#/components/schemas/offset'
            default: 0
        - name: limit
          in: query
          description: >-
            The maximum number of results to return. If the value exceeds the
            maximum value of `1000`, then the system uses the `1000` value.
          required: false
          schema:
            $ref: '#/components/schemas/limitDefault1000'
            default: 1000
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getAllPanAddElementRequests'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListPrivateNetworkAddRequestsRequestBadRequestError
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListPrivateNetworkAddRequestsRequestUnauthorizedError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListPrivateNetworkAddRequestsRequestForbiddenError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ListPrivateNetworkAddRequestsRequestInternalServerError
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    sinceDateTime:
      type: string
      format: date-time
      title: sinceDateTime
    untilDateTime:
      type: string
      format: date-time
      title: untilDateTime
    panRequestedBy:
      type: integer
      title: panRequestedBy
    elementTypeQuery:
      type: string
      enum:
        - workspace
      title: elementTypeQuery
    panRequestStatus:
      type: string
      enum:
        - pending
        - denied
      title: panRequestStatus
    panElementName:
      type: string
      title: panElementName
    sortCreatedUpdatedAt:
      type: string
      enum:
        - createdAt
        - updatedAt
      title: sortCreatedUpdatedAt
    ascDesc:
      type: string
      enum:
        - asc
        - desc
      title: ascDesc
    offset:
      type: integer
      default: 0
      title: offset
    limitDefault1000:
      type: integer
      default: 1000
      title: limitDefault1000
    GetAllPanAddElementRequestsRequestsItemsStatus:
      type: string
      enum:
        - pending
        - denied
      description: The request's status.
      title: GetAllPanAddElementRequestsRequestsItemsStatus
    PanRequestElementType:
      type: string
      enum:
        - workspace
      description: The `workspace` element type.
      title: PanRequestElementType
    panRequestElement:
      type: object
      properties:
        id:
          type: string
          description: The element's ID.
        type:
          $ref: '#/components/schemas/PanRequestElementType'
          description: The `workspace` element type.
        name:
          type: string
          description: The element's name.
        summary:
          type:
            - string
            - 'null'
          description: The element's short summary.
        description:
          type:
            - string
            - 'null'
          description: The element's description.
      description: Information about the requested element.
      title: panRequestElement
    panRequestResponse:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          description: The date and time at which request was denied.
        createdBy:
          type: integer
          description: The ID of the user who denied the request.
        message:
          type: string
          description: The request's response message.
      description: >-
        Information about the response to the element's request. This object
        only returns when the request is denied with a message.
      title: panRequestResponse
    GetAllPanAddElementRequestsRequestsItems:
      type: object
      properties:
        id:
          type: integer
          description: The request's ID.
        createdAt:
          type: string
          format: date-time
          description: The date and time at which the request was created.
        createdBy:
          type: integer
          description: The ID of the user who created the request.
        message:
          type: string
          description: The user's optional message included in the request.
        status:
          $ref: '#/components/schemas/GetAllPanAddElementRequestsRequestsItemsStatus'
          description: The request's status.
        element:
          $ref: '#/components/schemas/panRequestElement'
        response:
          $ref: '#/components/schemas/panRequestResponse'
      description: Information about the request.
      title: GetAllPanAddElementRequestsRequestsItems
    panMetadata:
      type: object
      properties:
        limit:
          type: integer
          description: >-
            The maximum number of elements returned. If the value exceeds the
            maximum value of `1000`, then the system uses the `1000` value.
        offset:
          type: integer
          description: The zero-based offset of the first item returned.
        totalCount:
          type: integer
          description: The total number of elements.
      description: The response's non-standard meta information.
      title: panMetadata
    getAllPanAddElementRequests:
      type: object
      properties:
        requests:
          type: array
          items:
            $ref: '#/components/schemas/GetAllPanAddElementRequestsRequestsItems'
          description: A list of requests to add elements to the Private API Network.
        meta:
          $ref: '#/components/schemas/panMetadata'
      title: getAllPanAddElementRequests
    panError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      title: panError
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    ListPrivateNetworkAddRequestsRequestBadRequestError:
      oneOf:
        - $ref: '#/components/schemas/panError'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: ListPrivateNetworkAddRequestsRequestBadRequestError
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    ListPrivateNetworkAddRequestsRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: ListPrivateNetworkAddRequestsRequestUnauthorizedError
    ListPrivateNetworkAddRequestsRequestForbiddenError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: ListPrivateNetworkAddRequestsRequestForbiddenError
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    ListPrivateNetworkAddRequestsRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: ListPrivateNetworkAddRequestsRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples



**Response**

```json
{
  "requests": [
    {
      "id": 1,
      "createdAt": "2024-06-01T08:32:31.000Z",
      "createdBy": 87654321,
      "status": "pending",
      "element": {
        "id": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
        "type": "workspace",
        "name": "Billing Team Workspace",
        "summary": "The Billing team's workspace."
      }
    },
    {
      "id": 2,
      "createdAt": "2024-06-09T14:48:45.000Z",
      "createdBy": 56781234,
      "message": "Please approve this workspace",
      "status": "denied",
      "element": {
        "id": "360b75f-447e-467c-9299-12fd3c92450d",
        "type": "workspace",
        "name": "Test Workspace",
        "summary": "This is a test workspace."
      },
      "response": {
        "createdAt": "2024-06-01T08:32:31.000Z",
        "createdBy": 12345678,
        "message": "Too many errors, please fix and resubmit"
      }
    }
  ],
  "meta": {
    "limit": 2,
    "offset": 0,
    "totalCount": 10
  }
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.getpostman.com/network/private/network-entity/request/all"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.getpostman.com/network/private/network-entity/request/all';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/network/private/network-entity/request/all"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/network/private/network-entity/request/all")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getpostman.com/network/private/network-entity/request/all")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getpostman.com/network/private/network-entity/request/all', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.getpostman.com/network/private/network-entity/request/all");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/network/private/network-entity/request/all")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```